Tomcat - Server errors after multiple requests from same IP
Id | 875da588-4875-11ec-81d3-0242ac130003 |
Rulename | Tomcat - Server errors after multiple requests from same IP |
Description | Detects server errors after multiple requests from same IP address. |
Severity | Medium |
Tactics | Impact InitialAccess |
Techniques | T1498 T1190 T1133 |
Required data connectors | ApacheTomcat 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/Tomcat/Analytic Rules/TomcatServerErrorsAfterMultipleRequestsFromSameIP.yaml |
Version | 1.0.1 |
Arm template | 875da588-4875-11ec-81d3-0242ac130003.json |
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
relevantTechniques:
- T1498
- T1190
- T1133
name: Tomcat - Server errors after multiple requests from same IP
requiredDataConnectors:
- dataTypes:
- TomcatEvent
connectorId: ApacheTomcat
- datatypes:
- Tomcat_CL
connectorId: CustomLogsAma
entityMappings:
- fieldMappings:
- identifier: Address
columnName: IPCustomEntity
entityType: IP
triggerThreshold: 0
id: 875da588-4875-11ec-81d3-0242ac130003
tactics:
- Impact
- InitialAccess
version: 1.0.1
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Tomcat/Analytic Rules/TomcatServerErrorsAfterMultipleRequestsFromSameIP.yaml
queryPeriod: 1h
kind: Scheduled
queryFrequency: 1h
severity: Medium
status: Available
description: |
'Detects server errors after multiple requests from same IP address.'
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
triggerOperator: gt
{
"$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/875da588-4875-11ec-81d3-0242ac130003')]",
"kind": "Scheduled",
"name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/875da588-4875-11ec-81d3-0242ac130003')]",
"properties": {
"alertRuleTemplateName": "875da588-4875-11ec-81d3-0242ac130003",
"customDetails": null,
"description": "'Detects server errors after multiple requests from same IP address.'\n",
"displayName": "Tomcat - Server errors after multiple requests from same IP",
"enabled": true,
"entityMappings": [
{
"entityType": "IP",
"fieldMappings": [
{
"columnName": "IPCustomEntity",
"identifier": "Address"
}
]
}
],
"OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Tomcat/Analytic Rules/TomcatServerErrorsAfterMultipleRequestsFromSameIP.yaml",
"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",
"severity": "Medium",
"status": "Available",
"subTechniques": [],
"suppressionDuration": "PT1H",
"suppressionEnabled": false,
"tactics": [
"Impact",
"InitialAccess"
],
"techniques": [
"T1133",
"T1190",
"T1498"
],
"templateVersion": "1.0.1",
"triggerOperator": "GreaterThan",
"triggerThreshold": 0
},
"type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
}
]
}