Sigma rule: Get-ADUser Enumeration Using UserAccountControl Flags

A detection rule from the SigmaHQ repository, shown as its author published it. Dataset version ref-1b530f54f588, updated 2022-03-17T00:00:00.000Z.

Rule

Title
Get-ADUser Enumeration Using UserAccountControl Flags
Status
test
Level
medium
Author
frack113
Date
2022-03-17
File
rules/windows/powershell/powershell_script/posh_ps_as_rep_roasting.yml
Commit
ccbb0369507f796db0b0ae6854c8a2be471b9d84

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.

Log source

product
windows
category
ps_script
definition
Requirements: Script Block Logging must be enabled

Detection

selection:
    # 4194304 DONT_REQ_PREAUTH
    ScriptBlockText|contains|all:
        - 'Get-ADUser'
        - '-Filter'
        - 'useraccountcontrol'
        - '-band'
        - '4194304'
condition: selection

False positives (as the rule lists them)

  • Legitimate PowerShell scripts

Tags

  • attack.discovery
  • attack.t1033

MITRE ATT&CK ids this rule names

References

Read on 2026-11-03T00:58:21.399Z under licence sigma-drl-1.1@d5f4c36a from https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_as_rep_roasting.yml

Sources and licences

  • SigmaHQ

    "Get-ADUser Enumeration Using UserAccountControl Flags" by frack113 (SigmaHQ). Rule: https://github.com/SigmaHQ/sigma/blob/ccbb0369507f796db0b0ae6854c8a2be471b9d84/rules/windows/powershell/powershell_script/posh_ps_as_rep_roasting.yml.
    Licensed under the Detection Rule License (DRL) 1.1: https://github.com/SigmaHQ/Detection-Rule-License

    Detection Rule License (DRL) 1.1

Cite this page

Dragons Eye Ransomware Tracker, "Sigma rule: Get-ADUser Enumeration Using UserAccountControl Flags",
entity page, dataset version ref-1b530f54f588, updated 2022-03-17T00:00:00.000Z,
https://ransomware-tracker.com/detections/sigma/96c982fe-3d08-4df4-bed2-eb14e02f21c8 (accessed 2026-11-03).
Underlying source: SigmaHQ rule 96c982fe-3d08-4df4-bed2-eb14e02f21c8, commit ccbb0369507f796db0b0ae6854c8a2be471b9d84.

Pages change. The dataset version identifies the data, but no archive of old versions is kept, so this citation cannot be replayed later.