# OffSet7: Renamed AdFind Execution

> 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:Renamed AdFind Execution:selection_1 (match)
All test lines must match (AND).
- when **Command** contains: `domainlist`, `trustdmp`, `dcmodes`, `adinfo`, ` dclist`, `computer_pwdnotreqd`, `objectcategory=`, `-subnets -f`, `name="Domain Admins"`, `-sc u:`, `domainncs`, `dompol`, ` oudmp`, `subnetdmp`, `gpodmp`, `fspdmp`, `users_noexpire`, `computers_active`, `computers_pwdnotreqd`

### BB:OffSet7:Renamed AdFind Execution:selection_2 (match)
All test lines must match (AND).
- when **CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')** contains: `IMPHASH=BCA5675746D13A1F246E2DA3C2217492`, `IMPHASH=53E117A96057EAF19C41380D0E87F1C2`, `IMPHASH=d144de8117df2beceaba2201ad304764`, `IMPHASH=12ce1c0f3f5837ecc18a3782408fa975`, `IMPHASH=4fbf3f084fbbb2470b80b2013134df35`, `IMPHASH=49b639b4acbecc49d72a01f357aa4930`, `IMPHASH=680dad9e300346e05a85023965867201`, `IMPHASH=21aa085d54992511b9f115355e468782`

### BB:OffSet7:Renamed AdFind Execution:selection_3 (match)
All test lines must match (AND).
- when **Filename** is equal to (case-insensitive): `AdFind.exe`

### BB:OffSet7:Renamed AdFind Execution:filter (exclusion)
All test lines must match (AND).
- when **Process Path / Process Name** ends with: `\AdFind.exe`

## 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:Renamed AdFind Execution:selection_1, BB:OffSet7:Renamed AdFind Execution:selection_2, BB:OffSet7:Renamed AdFind Execution:selection_3]) AND NOT BB:OffSet7:Renamed AdFind Execution:filter`

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

1. when the event matches this AQL filter query: `devicetype=12 AND ((LOWER(Command) LIKE '%domainlist%' OR LOWER(Command) LIKE '%trustdmp%' OR LOWER(Command) LIKE '%dcmodes%' OR LOWER(Command) LIKE '%adinfo%' OR LOWER(Command) LIKE '% dclist %' OR LOWER(Command) LIKE '%computer_pwdnotreqd%' OR LOWER(Command) LIKE '%objectcategory=%' OR LOWER(Command) LIKE '%-subnets -f%' OR LOWER(Command) LIKE '%name="domain admins"%' OR LOWER(Command) LIKE '%-sc u:%' OR LOWER(Command) LIKE '%domainncs%' OR LOWER(Command) LIKE '%dompol%' OR LOWER(Command) LIKE '% oudmp %' OR LOWER(Command) LIKE '%subnetdmp%' OR LOWER(Command) LIKE '%gpodmp%' OR LOWER(Command) LIKE '%fspdmp%' OR LOWER(Command) LIKE '%users_noexpire%' OR LOWER(Command) LIKE '%computers_active%' OR LOWER(Command) LIKE '%computers_pwdnotreqd%') OR (LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%imphash=bca5675746d13a1f246e2da3c2217492%' OR LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%imphash=53e117a96057eaf19c41380d0e87f1c2%' OR LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%imphash=d144de8117df2beceaba2201ad304764%' OR LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%imphash=12ce1c0f3f5837ecc18a3782408fa975%' OR LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%imphash=4fbf3f084fbbb2470b80b2013134df35%' OR LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%imphash=49b639b4acbecc49d72a01f357aa4930%' OR LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%imphash=680dad9e300346e05a85023965867201%' OR LOWER(CONCAT('MD5=', 'MD5 Hash ', 'SHA1=', 'SHA1 Hash ', 'SHA256=', 'SHA256 Hash ', 'IMPHASH=', 'IMP HASH')) LIKE '%imphash=21aa085d54992511b9f115355e468782%') OR Filename='AdFind.exe') AND (NOT((LOWER("Process Path") LIKE '%\adfind.exe' OR LOWER("Process Name") LIKE '%\adfind.exe')))`

## 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: Renamed AdFind Execution (df55196f-f105-44d3-a675-e9dfb6cc2f2b). Author: Florian Roth (Nextron Systems). Licence: DRL-1.1.
