Detection rules › Sigma
Addition of SID History to Active Directory Object
An attacker can use the SID history attribute to gain additional privileges.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | T1134.005 Access Token Manipulation: SID-History Injection |
| Stealth | T1134.005 Access Token Manipulation: SID-History Injection |
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4738 | A user account was changed. |
| Security-Auditing | Event ID 4765 | SID History was added to an account. |
| Security-Auditing | Event ID 4766 | An attempt to add SID History to an account failed. |
Rule body yaml
title: Addition of SID History to Active Directory Object
id: 2632954e-db1c-49cb-9936-67d1ef1d17d2
status: stable
description: An attacker can use the SID history attribute to gain additional privileges.
references:
- https://adsecurity.org/?p=1772
author: Thomas Patzke, @atc_project (improvements)
date: 2017-02-19
tags:
- attack.persistence
- attack.privilege-escalation
- attack.stealth
- attack.t1134.005
logsource:
product: windows
service: security
detection:
selection1:
EventID:
- 4765
- 4766
selection2:
EventID: 4738
selection3:
SidHistory:
- '-'
- '%%1793'
filter_null:
SidHistory:
condition: selection1 or (selection2 and not selection3 and not filter_null)
falsepositives:
- Migration of an account into a new domain
level: medium
Stages and Predicates
Stage 0: condition
selection1 or (selection2 and not selection3 and not filter_null)Stage 1: selection1
selection1:
EventID:
- 4765
- 4766
Stage 2: selection2
selection2:
EventID: 4738
Stage 3: not selection3
selection3:
SidHistory:
- '-'
- '%%1793'
Stage 4: not filter_null
filter_null:
SidHistory:
Exclusions
Top-level NOT(...) conjuncts: predicates this rule actively suppresses.
| Field | Kind | Excluded values |
|---|---|---|
SidHistory | eq | %%1793 |
SidHistory | eq | - |
SidHistory | is_null |