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

Corelight - Possible Webshell

Back
Idf3245aa1-1ca1-471c-a0b7-97ea6b791d5d
RulenameCorelight - Possible Webshell
DescriptionDetects post requests to unusual extensions.
SeverityMedium
TacticsPersistence
TechniquesT1505
Required data connectorsCorelight
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Corelight/Analytic Rules/CorelightPossibleWebshell.yaml
Version2.1.0
Arm templatef3245aa1-1ca1-471c-a0b7-97ea6b791d5d.json
Deploy To Azure
corelight_http
| where method in~ ('POST', 'PUT')
| where toint(status_code) between (200 .. 299)
| where request_body_len != 0 or response_body_len != 0
| extend fe = extract(@'.*(\.\w+)$', 1, uri)
| where fe in~ ('.jpg', '.jpeg', '.gif', '.png', '.icon', '.ico', '.xml', '.swf', '.svg', '.ppt', '.pttx', '.doc', '.docx', '.rtf', '.pdf', '.tif', '.zip', '.mov')
status: Available
description: |
    'Detects post requests to unusual extensions.'
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Corelight/Analytic Rules/CorelightPossibleWebshell.yaml
version: 2.1.0
triggerThreshold: 0
kind: Scheduled
queryPeriod: 1h
entityMappings:
- entityType: IP
  fieldMappings:
  - columnName: id_orig_h
    identifier: Address
requiredDataConnectors:
- connectorId: Corelight
  dataTypes:
  - Corelight_v2_http
  - corelight_http
triggerOperator: gt
id: f3245aa1-1ca1-471c-a0b7-97ea6b791d5d
name: Corelight - Possible Webshell
query: |
  corelight_http
  | where method in~ ('POST', 'PUT')
  | where toint(status_code) between (200 .. 299)
  | where request_body_len != 0 or response_body_len != 0
  | extend fe = extract(@'.*(\.\w+)$', 1, uri)
  | where fe in~ ('.jpg', '.jpeg', '.gif', '.png', '.icon', '.ico', '.xml', '.swf', '.svg', '.ppt', '.pttx', '.doc', '.docx', '.rtf', '.pdf', '.tif', '.zip', '.mov')  
tactics:
- Persistence
queryFrequency: 1h
relevantTechniques:
- T1505
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": "2023-02-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/f3245aa1-1ca1-471c-a0b7-97ea6b791d5d')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/f3245aa1-1ca1-471c-a0b7-97ea6b791d5d')]",
      "properties": {
        "alertRuleTemplateName": "f3245aa1-1ca1-471c-a0b7-97ea6b791d5d",
        "customDetails": null,
        "description": "'Detects post requests to unusual extensions.'\n",
        "displayName": "Corelight - Possible Webshell",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "columnName": "id_orig_h",
                "identifier": "Address"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Corelight/Analytic Rules/CorelightPossibleWebshell.yaml",
        "query": "corelight_http\n| where method in~ ('POST', 'PUT')\n| where toint(status_code) between (200 .. 299)\n| where request_body_len != 0 or response_body_len != 0\n| extend fe = extract(@'.*(\\.\\w+)$', 1, uri)\n| where fe in~ ('.jpg', '.jpeg', '.gif', '.png', '.icon', '.ico', '.xml', '.swf', '.svg', '.ppt', '.pttx', '.doc', '.docx', '.rtf', '.pdf', '.tif', '.zip', '.mov')\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Persistence"
        ],
        "techniques": [
          "T1505"
        ],
        "templateVersion": "2.1.0",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}