Apache - Request to sensitive files
Id | d1c52578-3afc-11ec-8d3d-0242ac130003 |
Rulename | Apache - Request to sensitive files |
Description | Detects request to sensitive files. |
Severity | Medium |
Tactics | InitialAccess |
Techniques | T1189 |
Required data connectors | ApacheHTTPServer CustomLogsAma |
Kind | Scheduled |
Query frequency | 1h |
Query period | 1h |
Trigger threshold | 0 |
Trigger operator | gt |
Source Uri | https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ApacheHTTPServer/Analytic Rules/ApacheRequestToSensitiveFiles.yaml |
Version | 1.0.1 |
Arm template | d1c52578-3afc-11ec-8d3d-0242ac130003.json |
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"
}
]
}