Detect instances of multiple client errors occurring within a brief period of time ASIM Web Session
| Id | faa40333-1e8b-40cc-a003-51ae41fa886f |
| Rulename | Detect instances of multiple client errors occurring within a brief period of time (ASIM Web Session) |
| Description | This detection mechanism identifies situations where multiple client errors originate from a single source within a limited time frame. |
| Severity | Medium |
| Tactics | InitialAccess CommandAndControl |
| Techniques | T1190 T1133 T1071 |
| 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/MultipleClientErrorsWithinShortTime.yaml |
| Version | 1.0.0 |
| Arm template | faa40333-1e8b-40cc-a003-51ae41fa886f.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 set threshold value that suits your environment
_Im_WebSession(starttime=ago(1h))
| where toint(EventResultDetails) between (400 .. 499)
| summarize
TotalErrorCount = count(),
EventStartTime = min(TimeGenerated),
EventEndTime = max(TimeGenerated),
URLs=make_set(Url, 100),
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
alertDetailsOverride:
alertDescriptionFormat: "The client has made a total of '{{TotalErrorCount}}' requests to URLs '{{URLs}}', which have resulted in client errors. A sudden surge in HTTP code errors, especially in the form of client-side errors like 400 or 401, could indicate malicious activity, such as attackers attempting to exploit vulnerabilities or perform unauthorized actions. For detailed information regarding the specific errors encountered, please refer to the following link: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status."
alertDisplayNameFormat: High number of client errors originated by user '{{SrcUsername}}' from IP address '{{SrcIpAddr}}'
description: |
'This detection mechanism identifies situations where multiple client errors originate from a single source within a limited time frame.'
kind: Scheduled
tactics:
- InitialAccess
- CommandAndControl
requiredDataConnectors: []
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Web Session Essentials/Analytic Rules/MultipleClientErrorsWithinShortTime.yaml
severity: Medium
name: Detect instances of multiple client errors occurring within a brief period of time (ASIM Web Session)
customDetails:
RequestURLs: URLs
ErrorThreshold: Threshold
EventStartTime: EventStartTime
TotalErrorCount: TotalErrorCount
EventResultSet: EventResultDetailsSet
EventEndTime: EventEndTime
triggerThreshold: 0
queryPeriod: 1h
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 set threshold value that suits your environment
_Im_WebSession(starttime=ago(1h))
| where toint(EventResultDetails) between (400 .. 499)
| summarize
TotalErrorCount = count(),
EventStartTime = min(TimeGenerated),
EventEndTime = max(TimeGenerated),
URLs=make_set(Url, 100),
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
relevantTechniques:
- T1190
- T1133
- T1071
id: faa40333-1e8b-40cc-a003-51ae41fa886f
queryFrequency: 1h
status: Available
version: 1.0.0
triggerOperator: gt
eventGroupingSettings:
aggregationKind: AlertPerResult
tags:
- Schema: WebSession
SchemaVersion: 0.2.6
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