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

Apache - Requests to rare files

Back
Id14d7e15e-3afb-11ec-8d3d-0242ac130003
RulenameApache - Requests to rare files
DescriptionShows requests to rare files
SeverityMedium
TacticsInitialAccess
TechniquesT1190
T1133
Required data connectorsApacheHTTPServer
KindScheduled
Query frequency1h
Query period14d
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ApacheHTTPServer/Analytic Rules/ApacheRequestToRareFile.yaml
Version1.0.0
Arm template14d7e15e-3afb-11ec-8d3d-0242ac130003.json
Deploy To Azure
let lb_period_start = 14d;
let lb_period_end = 1d;
let known_files = ApacheHTTPServer
| where TimeGenerated between (ago(lb_period_start) .. ago(lb_period_end))
| extend File = extract(@"(.*\/)?(.*)", 2, tostring(UrlOriginal))
| summarize makeset(File);
ApacheHTTPServer
| where TimeGenerated > ago(24h)
| extend File = extract(@"(.*\/)?(.*)", 2, tostring(UrlOriginal))
| where File in~ (known_files)
| extend FileCustomEntity = File, UrlCustomEntity = UrlOriginal
name: Apache - Requests to rare files
status: Available
triggerThreshold: 0
severity: Medium
tactics:
- InitialAccess
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/ApacheHTTPServer/Analytic Rules/ApacheRequestToRareFile.yaml
entityMappings:
- entityType: File
  fieldMappings:
  - columnName: FileCustomEntity
    identifier: Name
- entityType: URL
  fieldMappings:
  - columnName: UrlCustomEntity
    identifier: Url
queryPeriod: 14d
queryFrequency: 1h
version: 1.0.0
triggerOperator: gt
description: |
    'Shows requests to rare files'
query: |
  let lb_period_start = 14d;
  let lb_period_end = 1d;
  let known_files = ApacheHTTPServer
  | where TimeGenerated between (ago(lb_period_start) .. ago(lb_period_end))
  | extend File = extract(@"(.*\/)?(.*)", 2, tostring(UrlOriginal))
  | summarize makeset(File);
  ApacheHTTPServer
  | where TimeGenerated > ago(24h)
  | extend File = extract(@"(.*\/)?(.*)", 2, tostring(UrlOriginal))
  | where File in~ (known_files)
  | extend FileCustomEntity = File, UrlCustomEntity = UrlOriginal  
relevantTechniques:
- T1190
- T1133
id: 14d7e15e-3afb-11ec-8d3d-0242ac130003
requiredDataConnectors:
- dataTypes:
  - ApacheHTTPServer
  connectorId: ApacheHTTPServer
kind: Scheduled
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2023-02-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/14d7e15e-3afb-11ec-8d3d-0242ac130003')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/14d7e15e-3afb-11ec-8d3d-0242ac130003')]",
      "properties": {
        "alertRuleTemplateName": "14d7e15e-3afb-11ec-8d3d-0242ac130003",
        "customDetails": null,
        "description": "'Shows requests to rare files'\n",
        "displayName": "Apache - Requests to rare 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/ApacheRequestToRareFile.yaml",
        "query": "let lb_period_start = 14d;\nlet lb_period_end = 1d;\nlet known_files = ApacheHTTPServer\n| where TimeGenerated between (ago(lb_period_start) .. ago(lb_period_end))\n| extend File = extract(@\"(.*\\/)?(.*)\", 2, tostring(UrlOriginal))\n| summarize makeset(File);\nApacheHTTPServer\n| where TimeGenerated > ago(24h)\n| extend File = extract(@\"(.*\\/)?(.*)\", 2, tostring(UrlOriginal))\n| where File in~ (known_files)\n| extend FileCustomEntity = File, UrlCustomEntity = UrlOriginal\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "P14D",
        "severity": "Medium",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1133",
          "T1190"
        ],
        "templateVersion": "1.0.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}