# OffSet7: Suspicious Process Patterns NTDS.DIT Exfil

> 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:Suspicious Process Patterns NTDS DIT Exfil:selection_tool (match)
Any of the groups matches (OR): build one BB per group and a parent BB "when an event matches any of" them.
- when **Process Path / Process Name** ends with: `\NTDSDump.exe`, `\NTDSDumpEx.exe`
- when **Command** contains: `ntds.dit`, `system.hiv`
- when **Command** contains: `NTDSgrab.ps1`

### BB:OffSet7:Suspicious Process Patterns NTDS DIT Exfil:selection_oneliner_1 (match)
All test lines must match (AND).
- when **Command** contains: `ac i ntds`, `create full`

### BB:OffSet7:Suspicious Process Patterns NTDS DIT Exfil:selection_onliner_2 (match)
All test lines must match (AND).
- when **Command** contains: `/c copy`, `\windows\ntds\ntds.dit`

### BB:OffSet7:Suspicious Process Patterns NTDS DIT Exfil:selection_onliner_3 (match)
All test lines must match (AND).
- when **Command** contains: `activate instance ntds`, `create full`

### BB:OffSet7:Suspicious Process Patterns NTDS DIT Exfil:selection_powershell (match)
All test lines must match (AND).
- when **Command** contains: `powershell`, `ntds.dit`

### BB:OffSet7:Suspicious Process Patterns NTDS DIT Exfil:set1_selection_ntds_dit (match)
All test lines must match (AND).
- when **Command** contains: `ntds.dit`

### BB:OffSet7:Suspicious Process Patterns NTDS DIT Exfil:set1_selection_image_folder (match)
Any of the groups matches (OR): build one BB per group and a parent BB "when an event matches any of" them.
- when **Parent Process Path** contains: `\apache`, `\tomcat`, `\AppData\`, `\Temp\`, `\Public\`, `\PerfLogs\`
- when **Process Path / Process Name** contains: `\apache`, `\tomcat`, `\AppData\`, `\Temp\`, `\Public\`, `\PerfLogs\`

## 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:Suspicious Process Patterns NTDS DIT Exfil:selection_tool, BB:OffSet7:Suspicious Process Patterns NTDS DIT Exfil:selection_oneliner_1, BB:OffSet7:Suspicious Process Patterns NTDS DIT Exfil:selection_onliner_2, BB:OffSet7:Suspicious Process Patterns NTDS DIT Exfil:selection_onliner_3, BB:OffSet7:Suspicious Process Patterns NTDS DIT Exfil:selection_powershell]) OR (ALL of [BB:OffSet7:Suspicious Process Patterns NTDS DIT Exfil:set1_selection_ntds_dit, BB:OffSet7:Suspicious Process Patterns NTDS DIT Exfil:set1_selection_image_folder])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND (((((LOWER("Process Path") LIKE '%\ntdsdump.exe' OR LOWER("Process Path") LIKE '%\ntdsdumpex.exe') OR (LOWER("Process Name") LIKE '%\ntdsdump.exe' OR LOWER("Process Name") LIKE '%\ntdsdumpex.exe')) OR (LOWER(Command) LIKE '%ntds.dit%' AND LOWER(Command) LIKE '%system.hiv%') OR LOWER(Command) LIKE '%ntdsgrab.ps1%') OR (LOWER(Command) LIKE '%ac i ntds%' AND LOWER(Command) LIKE '%create full%') OR (LOWER(Command) LIKE '%/c copy %' AND LOWER(Command) LIKE '%\windows\ntds\ntds.dit%') OR (LOWER(Command) LIKE '%activate instance ntds%' AND LOWER(Command) LIKE '%create full%') OR (LOWER(Command) LIKE '%powershell%' AND LOWER(Command) LIKE '%ntds.dit%')) OR (LOWER(Command) LIKE '%ntds.dit%' AND ((LOWER("Parent Process Path") LIKE '%\apache%' OR LOWER("Parent Process Path") LIKE '%\tomcat%' OR LOWER("Parent Process Path") LIKE '%\appdata\%' OR LOWER("Parent Process Path") LIKE '%\temp\%' OR LOWER("Parent Process Path") LIKE '%\public\%' OR LOWER("Parent Process Path") LIKE '%\perflogs\%') OR ((LOWER("Process Path") LIKE '%\apache%' OR LOWER("Process Path") LIKE '%\tomcat%' OR LOWER("Process Path") LIKE '%\appdata\%' OR LOWER("Process Path") LIKE '%\temp\%' OR LOWER("Process Path") LIKE '%\public\%' OR LOWER("Process Path") LIKE '%\perflogs\%') OR (LOWER("Process Name") LIKE '%\apache%' OR LOWER("Process Name") LIKE '%\tomcat%' OR LOWER("Process Name") LIKE '%\appdata\%' OR LOWER("Process Name") LIKE '%\temp\%' OR LOWER("Process Name") LIKE '%\public\%' OR LOWER("Process Name") LIKE '%\perflogs\%')))))`

## 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: Suspicious Process Patterns NTDS.DIT Exfil (8bc64091-6875-4881-aaf9-7bd25b5dda08). Author: Florian Roth (Nextron Systems). Licence: DRL-1.1.
