# OffSet7: PUA - Suspicious ActiveDirectory Enumeration Via AdFind.EXE

> Design for the QRadar Rule Wizard. Not an importable rule and not tested in QRadar.

- Rule type: Event rule (Local), create disabled
- Log source types: Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1

## Building blocks

### BB:OffSet7:PUA Suspicious ActiveDirectory Enumeration Via A:selection_password (match)
All test lines must match (AND).
- when **Command** contains: `lockoutduration`, `lockoutthreshold`, `lockoutobservationwindow`, `maxpwdage`, `minpwdage`, `minpwdlength`, `pwdhistorylength`, `pwdproperties`

### BB:OffSet7:PUA Suspicious ActiveDirectory Enumeration Via A:selection_enum_ad (match)
All test lines must match (AND).
- when **Command** contains: `-sc admincountdmp`

### BB:OffSet7:PUA Suspicious ActiveDirectory Enumeration Via A:selection_enum_exchange (match)
All test lines must match (AND).
- when **Command** contains: `-sc exchaddresses`

## Main rule — option A (building blocks)

1. when the event(s) were detected by one or more of these log source types: `Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1`
2. when an event matches the condition built from these building blocks: `(ANY of [BB:OffSet7:PUA Suspicious ActiveDirectory Enumeration Via A:selection_password, BB:OffSet7:PUA Suspicious ActiveDirectory Enumeration Via A:selection_enum_ad, BB:OffSet7:PUA Suspicious ActiveDirectory Enumeration Via A:selection_enum_exchange])`

## Main rule — option B (AQL filter test)

1. when the event matches this AQL filter query: `devicetype=12 AND ((LOWER(Command) LIKE '%lockoutduration%' OR LOWER(Command) LIKE '%lockoutthreshold%' OR LOWER(Command) LIKE '%lockoutobservationwindow%' OR LOWER(Command) LIKE '%maxpwdage%' OR LOWER(Command) LIKE '%minpwdage%' OR LOWER(Command) LIKE '%minpwdlength%' OR LOWER(Command) LIKE '%pwdhistorylength%' OR LOWER(Command) LIKE '%pwdproperties%') OR LOWER(Command) LIKE '%-sc admincountdmp%' OR LOWER(Command) LIKE '%-sc exchaddresses%')`

## Rule response

- Severity 7, credibility 6, relevance 7
- Ensure the detected event is part of an offense; index offense on Log Source (host) and annotate with the rule title and OffSet7 rule id
- Respond no more than once per 30 minutes per Log Source (tune per environment)

## Limitations

- QRadar AQL LIKE / CRE string tests are case-sensitive unless the property is lower-cased; the AQL option uses LOWER() where the backend applied it.

Source rule: PUA - Suspicious ActiveDirectory Enumeration Via AdFind.EXE (455b9d50-15a1-4b99-853f-8d37655a4c1b). Author: frack113. Licence: DRL-1.1.
