VeriKQL by Kaushik Saha

T1134.005 SID-History Injection

Privilege EscalationStealthon attack.mitre.org

ATT&CK Enterprise 20.0 · 20.1 released, update in review

How MITRE detects it

DET0136 Behavior-chain detection for T1134.005 Access Token Manipulation: SID-History Injection (Windows)

AN0383 Windows

Detection of unauthorized modification of Active Directory SID-History attributes to escalate privileges. This chain involves: (1) privileged operations or API calls to DsAddSidHistory or related AD modification functions, (2) observed attribute changes in SID-History (Event ID 5136), (3) new logon sessions where the token includes unexpected or privileged SID-History values, and (4) follow-on resource access using elevated privileges derived from SID-History injection.

MITRE log sourceIn Microsoft Sentinel
WinEventLog:SecurityEventCode=5136
  • Windows Security Events via AMA → SecurityEvent
    SecurityEvent | where EventID in (5136)
  • Security Events via Legacy Agent → SecurityEvent
    SecurityEvent | where EventID in (5136)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel == "Security" | where EventID in (5136)

The same events land in SecurityEvent (Windows Security Events connectors) or WindowsEvent (Windows Event Forwarding); many built-in rules read SecurityEvent only.

WinEventLog:SecurityEventCode=4720, 4738
  • Windows Security Events via AMA → SecurityEvent
    SecurityEvent | where EventID in (4720, 4738)
  • Security Events via Legacy Agent → SecurityEvent
    SecurityEvent | where EventID in (4720, 4738)
  • Windows Forwarded Events → WindowsEvent
    WindowsEvent | where Channel == "Security" | where EventID in (4720, 4738)

The same events land in SecurityEvent (Windows Security Events connectors) or WindowsEvent (Windows Event Forwarding); many built-in rules read SecurityEvent only.

etw:Microsoft-Windows-Directory-Services-SAMapi_call: Calls to DsAddSidHistory or related RPC operationsNot mapped to Sentinel yet.

Content Hub rules tagged with it (1)

Rules tagged with this technique (or a sub-technique) in their metadata. Whether one fits your connectors is the coverage view (M2).

How the Content Hub rules for T1134.005 are built: their tables, filters, joins, schedules and windows.

In Sigma rules

1 SigmaHQ community rule name it in their tags.

Community rules, not Microsoft's, and not checked by VeriKQL (Sigma is not KQL). From SigmaHQ/sigma at f083329, under the Detection Rule License (DRL) 1.1; each rule is credited to its author.

Mitigations

MITRE ATT&CK® is a registered trademark of The MITRE Corporation. VeriKQL is not affiliated with or endorsed by MITRE. ATT&CK data © The MITRE Corporation, used under its terms of use.