Get-ADUser Enumeration Using UserAccountControl Flags

Detects AS-REP roasting is an attack that is often-overlooked. It is not very common as you have to explicitly set accounts that do not require pre-authentication.

Sigma rule (View on GitHub)

 1title: Get-ADUser Enumeration Using UserAccountControl Flags
 2id: 96c982fe-3d08-4df4-bed2-eb14e02f21c8
 3status: test
 4description: Detects AS-REP roasting is an attack that is often-overlooked. It is not very common as you have to explicitly set accounts that do not require pre-authentication.
 5references:
 6    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1069.002/T1069.002.md#atomic-test-11---get-aduser-enumeration-using-useraccountcontrol-flags-as-rep-roasting
 7    - https://shellgeek.com/useraccountcontrol-flags-to-manipulate-properties/
 8author: frack113
 9date: 2022-03-17
10tags:
11    - attack.discovery
12    - attack.t1033
13logsource:
14    product: windows
15    category: ps_script
16    definition: 'Requirements: Script Block Logging must be enabled'
17detection:
18    selection:
19        # 4194304 DONT_REQ_PREAUTH
20        ScriptBlockText|contains|all:
21            - 'Get-ADUser'
22            - '-Filter'
23            - 'useraccountcontrol'
24            - '-band'
25            - '4194304'
26    condition: selection
27falsepositives:
28    - Legitimate PowerShell scripts
29level: medium

References

Related rules

to-top