Detect instances of multiple server errors occurring within a brief period of time ASIM Web Session
| Id | a59ba76c-0205-4966-948e-3d5640140688 |
| Rulename | Detect instances of multiple server errors occurring within a brief period of time (ASIM Web Session) |
| Description | This detection mechanism identifies situations where multiple server errors originate from a single source within a limited time frame. |
| Severity | Medium |
| Tactics | InitialAccess Impact |
| Techniques | T1190 T1133 T1498 |
| 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/Web Session Essentials/Analytic Rules/MultipleServerErrorsWithinShortTime.yaml |
| Version | 1.0.0 |
| Arm template | a59ba76c-0205-4966-948e-3d5640140688.json |
// HTTP response status codes indicate whether a specific HTTP request has been successfully completed.
// Please refer this for more details: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
let threshold = 100; // You can update threshold value as per your environment
_Im_WebSession(starttime=ago(1h))
| where toint(EventResultDetails) between (500 .. 599)
| summarize
TotalErrorCount = count(),
URLs=make_set(Url, 100),
EventStartTime = min(TimeGenerated),
EventEndTime = max(TimeGenerated),
EventResultDetailsSet=make_set(EventResultDetails,10)
by SrcIpAddr, bin(TimeGenerated, 5m), SrcUsername, SrcHostname
| where TotalErrorCount > threshold
| extend
Name = iif(SrcUsername contains "@", tostring(split(SrcUsername, '@', 0)[0]), SrcUsername),
UPNSuffix = iif(SrcUsername contains "@", tostring(split(SrcUsername, '@', 1)[0]), ""), Threshold=threshold
eventGroupingSettings:
aggregationKind: AlertPerResult
requiredDataConnectors: []
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Web Session Essentials/Analytic Rules/MultipleServerErrorsWithinShortTime.yaml
triggerThreshold: 0
status: Available
tags:
- Schema: WebSession
SchemaVersion: 0.2.6
relevantTechniques:
- T1190
- T1133
- T1498
queryPeriod: 1h
name: Detect instances of multiple server errors occurring within a brief period of time (ASIM Web Session)
entityMappings:
- entityType: IP
fieldMappings:
- columnName: SrcIpAddr
identifier: Address
- entityType: Account
fieldMappings:
- columnName: Name
identifier: Name
- columnName: UPNSuffix
identifier: UPNSuffix
- entityType: Host
fieldMappings:
- columnName: SrcHostname
identifier: HostName
alertDetailsOverride:
alertDisplayNameFormat: High number of server errors originated by user '{{SrcUsername}}' from IP address '{{SrcIpAddr}}'
alertDescriptionFormat: "The client has made a total of '{{TotalErrorCount}}' requests to URLs '{{URLs}}', which have resulted in server errors. It is recommended to thoroughly investigate this alert to determine the underlying cause behind this significant number of errors. For detailed information regarding the specific errors encountered, please refer to the following link: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status."
customDetails:
TotalErrorCount: TotalErrorCount
EventEndTime: EventEndTime
EventResultSet: EventResultDetailsSet
ErrorThreshold: Threshold
RequestURLs: URLs
EventStartTime: EventStartTime
queryFrequency: 1h
triggerOperator: gt
kind: Scheduled
description: |
'This detection mechanism identifies situations where multiple server errors originate from a single source within a limited time frame.'
tactics:
- InitialAccess
- Impact
severity: Medium
version: 1.0.0
query: |
// HTTP response status codes indicate whether a specific HTTP request has been successfully completed.
// Please refer this for more details: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
let threshold = 100; // You can update threshold value as per your environment
_Im_WebSession(starttime=ago(1h))
| where toint(EventResultDetails) between (500 .. 599)
| summarize
TotalErrorCount = count(),
URLs=make_set(Url, 100),
EventStartTime = min(TimeGenerated),
EventEndTime = max(TimeGenerated),
EventResultDetailsSet=make_set(EventResultDetails,10)
by SrcIpAddr, bin(TimeGenerated, 5m), SrcUsername, SrcHostname
| where TotalErrorCount > threshold
| extend
Name = iif(SrcUsername contains "@", tostring(split(SrcUsername, '@', 0)[0]), SrcUsername),
UPNSuffix = iif(SrcUsername contains "@", tostring(split(SrcUsername, '@', 1)[0]), ""), Threshold=threshold
id: a59ba76c-0205-4966-948e-3d5640140688