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
Version1.0.0
Arm templatef3245aa1-1ca1-471c-a0b7-97ea6b791d5d.json
Deploy To Azure
Corelight
| where EventType =~ 'http'
| where HttpRequestMethod in~ ('POST', 'PUT')
| where toint(HttpStatusCode) between (200 .. 299)
| where HttpRequestBodyBytes != 0 or HttpResponseBodyBytes != 0
| extend fe = extract(@'.*(\.\w+)$', 1, UrlOriginal)
| where fe in~ ('.jpg', '.jpeg', '.gif', '.png', '.icon', '.ico', '.xml', '.swf', '.svg', '.ppt', '.pttx', '.doc', '.docx', '.rtf', '.pdf', '.tif', '.zip', '.mov')
| extend IPCustomEntity = SrcIpAddr
version: 1.0.0
status: Available
queryFrequency: 1h
requiredDataConnectors:
- connectorId: Corelight
  dataTypes:
  - Corelight
entityMappings:
- fieldMappings:
  - columnName: IPCustomEntity
    identifier: Address
  entityType: IP
kind: Scheduled
queryPeriod: 1h
severity: Medium
query: |
  Corelight
  | where EventType =~ 'http'
  | where HttpRequestMethod in~ ('POST', 'PUT')
  | where toint(HttpStatusCode) between (200 .. 299)
  | where HttpRequestBodyBytes != 0 or HttpResponseBodyBytes != 0
  | extend fe = extract(@'.*(\.\w+)$', 1, UrlOriginal)
  | where fe in~ ('.jpg', '.jpeg', '.gif', '.png', '.icon', '.ico', '.xml', '.swf', '.svg', '.ppt', '.pttx', '.doc', '.docx', '.rtf', '.pdf', '.tif', '.zip', '.mov')
  | extend IPCustomEntity = SrcIpAddr  
triggerOperator: gt
id: f3245aa1-1ca1-471c-a0b7-97ea6b791d5d
description: |
    'Detects post requests to unusual extensions.'
triggerThreshold: 0
name: Corelight - Possible Webshell
relevantTechniques:
- T1505
tactics:
- Persistence
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Corelight/Analytic Rules/CorelightPossibleWebshell.yaml
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/f3245aa1-1ca1-471c-a0b7-97ea6b791d5d')]",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/f3245aa1-1ca1-471c-a0b7-97ea6b791d5d')]",
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
      "kind": "Scheduled",
      "apiVersion": "2022-11-01",
      "properties": {
        "displayName": "Corelight - Possible Webshell",
        "description": "'Detects post requests to unusual extensions.'\n",
        "severity": "Medium",
        "enabled": true,
        "query": "Corelight\n| where EventType =~ 'http'\n| where HttpRequestMethod in~ ('POST', 'PUT')\n| where toint(HttpStatusCode) between (200 .. 299)\n| where HttpRequestBodyBytes != 0 or HttpResponseBodyBytes != 0\n| extend fe = extract(@'.*(\\.\\w+)$', 1, UrlOriginal)\n| where fe in~ ('.jpg', '.jpeg', '.gif', '.png', '.icon', '.ico', '.xml', '.swf', '.svg', '.ppt', '.pttx', '.doc', '.docx', '.rtf', '.pdf', '.tif', '.zip', '.mov')\n| extend IPCustomEntity = SrcIpAddr\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0,
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Persistence"
        ],
        "techniques": [
          "T1505"
        ],
        "alertRuleTemplateName": "f3245aa1-1ca1-471c-a0b7-97ea6b791d5d",
        "customDetails": null,
        "entityMappings": [
          {
            "entityType": "IP",
            "fieldMappings": [
              {
                "identifier": "Address",
                "columnName": "IPCustomEntity"
              }
            ]
          }
        ],
        "status": "Available",
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Corelight/Analytic Rules/CorelightPossibleWebshell.yaml",
        "templateVersion": "1.0.0"
      }
    }
  ]
}