Microsoft Sentinel Analytic Rules
cloudbrothers.infoAzure Sentinel RepoToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Apache - Request to sensitive files

Back
Idd1c52578-3afc-11ec-8d3d-0242ac130003
RulenameApache - Request to sensitive files
DescriptionDetects request to sensitive files.
SeverityMedium
TacticsInitialAccess
TechniquesT1189
Required data connectorsApacheHTTPServer
CustomLogsAma
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ApacheHTTPServer/Analytic Rules/ApacheRequestToSensitiveFiles.yaml
Version1.0.1
Arm templated1c52578-3afc-11ec-8d3d-0242ac130003.json
Deploy To Azure
let forbidden_files = dynamic(['shadow', 'passwd', 'id_rsa']);
ApacheHTTPServer
| where isnotempty(UrlOriginal)
| extend File = extract(@'(.*\/)?(.*)', 2, tostring(UrlOriginal))
| where File in~ (forbidden_files)
| extend FileCustomEntity = File, UrlCustomEntity = UrlOriginal
kind: Scheduled
relevantTechniques:
- T1189
description: |
    'Detects request to sensitive files.'
queryPeriod: 1h
queryFrequency: 1h
tactics:
- InitialAccess
name: Apache - Request to sensitive files
requiredDataConnectors:
- connectorId: ApacheHTTPServer
  dataTypes:
  - ApacheHTTPServer
- connectorId: CustomLogsAma
  datatypes:
  - ApacheHTTPServer_CL
entityMappings:
- entityType: File
  fieldMappings:
  - identifier: Name
    columnName: FileCustomEntity
- entityType: URL
  fieldMappings:
  - identifier: Url
    columnName: UrlCustomEntity
triggerThreshold: 0
version: 1.0.1
id: d1c52578-3afc-11ec-8d3d-0242ac130003
query: |
  let forbidden_files = dynamic(['shadow', 'passwd', 'id_rsa']);
  ApacheHTTPServer
  | where isnotempty(UrlOriginal)
  | extend File = extract(@'(.*\/)?(.*)', 2, tostring(UrlOriginal))
  | where File in~ (forbidden_files)
  | extend FileCustomEntity = File, UrlCustomEntity = UrlOriginal  
status: Available
triggerOperator: gt
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ApacheHTTPServer/Analytic Rules/ApacheRequestToSensitiveFiles.yaml
severity: Medium
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/d1c52578-3afc-11ec-8d3d-0242ac130003')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/d1c52578-3afc-11ec-8d3d-0242ac130003')]",
      "properties": {
        "alertRuleTemplateName": "d1c52578-3afc-11ec-8d3d-0242ac130003",
        "customDetails": null,
        "description": "'Detects request to sensitive files.'\n",
        "displayName": "Apache - Request to sensitive files",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "File",
            "fieldMappings": [
              {
                "columnName": "FileCustomEntity",
                "identifier": "Name"
              }
            ]
          },
          {
            "entityType": "URL",
            "fieldMappings": [
              {
                "columnName": "UrlCustomEntity",
                "identifier": "Url"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ApacheHTTPServer/Analytic Rules/ApacheRequestToSensitiveFiles.yaml",
        "query": "let forbidden_files = dynamic(['shadow', 'passwd', 'id_rsa']);\nApacheHTTPServer\n| where isnotempty(UrlOriginal)\n| extend File = extract(@'(.*\\/)?(.*)', 2, tostring(UrlOriginal))\n| where File in~ (forbidden_files)\n| extend FileCustomEntity = File, UrlCustomEntity = UrlOriginal\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1189"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}