Detection rules › Kusto
Detect entra token request via specific BOF (IOC based)
This might be one of the silliest detections I have created. But since there is a Beacon Object File out there which can be used to directly request Entra ID access tokens from an active beacon on a device using a specific User Agent, we can easily detect this beacon file by flagging the funny user agent and / or scope identifier that is used.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Execution | |
| Credential Access |
References
Telemetry coverage
| Platform | Record / event type |
|---|---|
| Azure | Target application: Sign-in naming a target application |
Rule body
AADNonInteractiveUserSignInLogs
| where TimeGenerated > ago(5m)
| where UserAgent contains "ur mum"
| where ResourceIdentity == "797f4846-ba00-4fd7-ba43-dac1f8f63013"
Stages and Predicates
Stage 1: source
AADNonInteractiveUserSignInLogs
Stage 2: where
| where TimeGenerated > ago(5m)
Stage 3: where
| where UserAgent contains "ur mum"
Stage 4: where
| where ResourceIdentity == "797f4846-ba00-4fd7-ba43-dac1f8f63013"
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
ResourceIdentity | eq |
| field:"ResourceIdentity" kind:eq value:"797f4846-ba00-4fd7-ba43-dac1f8f63013" |
UserAgent | contains |
| field:"aws::userAgent" kind:contains value:"ur mum" |