# OffSet7: Dumping of Sensitive Hives Via Reg.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:Dumping of Sensitive Hives Via Reg EXE:selection_img (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: `\reg.exe`
- when **Filename** is equal to (case-insensitive): `reg.exe`

### BB:OffSet7:Dumping of Sensitive Hives Via Reg EXE:selection_cli_flag (match)
All test lines must match (AND).
- when **Command** contains: ` save`, ` export`, ` ˢave`, ` eˣport`

### BB:OffSet7:Dumping of Sensitive Hives Via Reg EXE:selection_cli_hive (match)
All test lines must match (AND).
- when **Command** matches the regular expression: `(hk[l˪]m|hkey_[l˪]oca[l˪]_machine)"?\\[sˢ](y[sˢ]tem|am|ecurity)(\\|"|\s|$)`

## 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: `(ALL of [BB:OffSet7:Dumping of Sensitive Hives Via Reg EXE:selection_img, BB:OffSet7:Dumping of Sensitive Hives Via Reg EXE:selection_cli_flag, BB:OffSet7:Dumping of Sensitive Hives Via Reg EXE:selection_cli_hive])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND ((LOWER("Process Path") LIKE '%\reg.exe' OR LOWER("Process Name") LIKE '%\reg.exe') OR Filename='reg.exe') AND (LOWER(Command) LIKE '% save %' OR LOWER(Command) LIKE '% export %' OR LOWER(Command) LIKE '% ˢave %' OR LOWER(Command) LIKE '% eˣport %') AND Command MATCHES '(?i)(hk[l˪]m|hkey_[l˪]oca[l˪]_machine)"?\\[sˢ](y[sˢ]tem|am|ecurity)(\\|"|\s|$)'`

## 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.
- Regular expressions (|re) use Java regex in QRadar; verify syntax in the Rule Wizard.

Source rule: Dumping of Sensitive Hives Via Reg.EXE (fd877b94-9bb5-4191-bb25-d79cbd93c167). Author: Teymur Kheirkhabarov, Endgame, JHasenbusch, Daniil Yugoslavskiy, oscd.community, frack113. Licence: DRL-1.1.
