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

Tomcat - Server errors after multiple requests from same IP

Back
Id875da588-4875-11ec-81d3-0242ac130003
RulenameTomcat - Server errors after multiple requests from same IP
DescriptionDetects server errors after multiple requests from same IP address.
SeverityMedium
TacticsImpact
InitialAccess
TechniquesT1498
T1190
T1133
Required data connectorsApacheTomcat
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Tomcat/Analytic Rules/TomcatServerErrorsAfterMultipleRequestsFromSameIP.yaml
Version1.0.0
Arm template875da588-4875-11ec-81d3-0242ac130003.json
Deploy To Azure
let multi_errors = TomcatEvent
| where toint(HttpStatusCode) >= 500 and toint(HttpStatusCode) <= 599
| sort by EventStartTime asc
| summarize MultipleServerErrors = count() by SrcIpAddr, bin(EventStartTime, 5m)
| where MultipleServerErrors > 10;
let error_time_table = TomcatEvent
| where toint(HttpStatusCode) >= 500 and toint(HttpStatusCode) <= 599
| summarize error_time=min(EventStartTime) by SrcIpAddr
| join kind=innerunique (multi_errors) on SrcIpAddr;
TomcatEvent
| where toint(HttpStatusCode) >= 100 and toint(HttpStatusCode) <= 399
| summarize success_time=max(EventStartTime) by SrcIpAddr
| join kind=innerunique (error_time_table) on SrcIpAddr
| extend time_between_error_and_success = datetime_diff('second', error_time, success_time)
| where time_between_error_and_success between (1 .. 300)
| project time_between_error_and_success, error_time, success_time, SrcIpAddr
| extend IPCustomEntity = SrcIpAddr
queryPeriod: 1h
version: 1.0.0
relevantTechniques:
- T1498
- T1190
- T1133
queryFrequency: 1h
kind: Scheduled
name: Tomcat - Server errors after multiple requests from same IP
id: 875da588-4875-11ec-81d3-0242ac130003
entityMappings:
- fieldMappings:
  - columnName: IPCustomEntity
    identifier: Address
  entityType: IP
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Tomcat/Analytic Rules/TomcatServerErrorsAfterMultipleRequestsFromSameIP.yaml
severity: Medium
query: |
  let multi_errors = TomcatEvent
  | where toint(HttpStatusCode) >= 500 and toint(HttpStatusCode) <= 599
  | sort by EventStartTime asc
  | summarize MultipleServerErrors = count() by SrcIpAddr, bin(EventStartTime, 5m)
  | where MultipleServerErrors > 10;
  let error_time_table = TomcatEvent
  | where toint(HttpStatusCode) >= 500 and toint(HttpStatusCode) <= 599
  | summarize error_time=min(EventStartTime) by SrcIpAddr
  | join kind=innerunique (multi_errors) on SrcIpAddr;
  TomcatEvent
  | where toint(HttpStatusCode) >= 100 and toint(HttpStatusCode) <= 399
  | summarize success_time=max(EventStartTime) by SrcIpAddr
  | join kind=innerunique (error_time_table) on SrcIpAddr
  | extend time_between_error_and_success = datetime_diff('second', error_time, success_time)
  | where time_between_error_and_success between (1 .. 300)
  | project time_between_error_and_success, error_time, success_time, SrcIpAddr
  | extend IPCustomEntity = SrcIpAddr  
tactics:
- Impact
- InitialAccess
description: |
    'Detects server errors after multiple requests from same IP address.'
requiredDataConnectors:
- connectorId: ApacheTomcat
  dataTypes:
  - TomcatEvent
status: Available
triggerThreshold: 0
triggerOperator: gt
{
  "$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/875da588-4875-11ec-81d3-0242ac130003')]",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/875da588-4875-11ec-81d3-0242ac130003')]",
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules",
      "kind": "Scheduled",
      "apiVersion": "2022-11-01",
      "properties": {
        "displayName": "Tomcat - Server errors after multiple requests from same IP",
        "description": "'Detects server errors after multiple requests from same IP address.'\n",
        "severity": "Medium",
        "enabled": true,
        "query": "let multi_errors = TomcatEvent\n| where toint(HttpStatusCode) >= 500 and toint(HttpStatusCode) <= 599\n| sort by EventStartTime asc\n| summarize MultipleServerErrors = count() by SrcIpAddr, bin(EventStartTime, 5m)\n| where MultipleServerErrors > 10;\nlet error_time_table = TomcatEvent\n| where toint(HttpStatusCode) >= 500 and toint(HttpStatusCode) <= 599\n| summarize error_time=min(EventStartTime) by SrcIpAddr\n| join kind=innerunique (multi_errors) on SrcIpAddr;\nTomcatEvent\n| where toint(HttpStatusCode) >= 100 and toint(HttpStatusCode) <= 399\n| summarize success_time=max(EventStartTime) by SrcIpAddr\n| join kind=innerunique (error_time_table) on SrcIpAddr\n| extend time_between_error_and_success = datetime_diff('second', error_time, success_time)\n| where time_between_error_and_success between (1 .. 300)\n| project time_between_error_and_success, error_time, success_time, SrcIpAddr\n| extend IPCustomEntity = SrcIpAddr\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0,
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Impact",
          "InitialAccess"
        ],
        "techniques": [
          "T1498",
          "T1190",
          "T1133"
        ],
        "alertRuleTemplateName": "875da588-4875-11ec-81d3-0242ac130003",
        "customDetails": null,
        "entityMappings": [
          {
            "fieldMappings": [
              {
                "identifier": "Address",
                "columnName": "IPCustomEntity"
              }
            ],
            "entityType": "IP"
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Tomcat/Analytic Rules/TomcatServerErrorsAfterMultipleRequestsFromSameIP.yaml",
        "status": "Available",
        "templateVersion": "1.0.0"
      }
    }
  ]
}