# OffSet7: Security Service Disabled 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:Security Service Disabled Via Reg EXE:selection_reg_add (match)
All test lines must match (AND).
- when **Command** contains: `reg`, `add`

### BB:OffSet7:Security Service Disabled Via Reg EXE:selection_cli_reg_start (match)
All test lines must match (AND).
- when **Command** contains: `d 4`, `v Start`
- when **Command** contains: `\AppIDSvc`, `\MsMpSvc`, `\NisSrv`, `\SecurityHealthService`, `\Sense`, `\UsoSvc`, `\WdBoot`, `\WdFilter`, `\WdNisDrv`, `\WdNisSvc`, `\WinDefend`, `\wscsvc`, `\wuauserv`

## 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:Security Service Disabled Via Reg EXE:selection_reg_add, BB:OffSet7:Security Service Disabled Via Reg EXE:selection_cli_reg_start])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND (LOWER(Command) LIKE '%reg%' AND LOWER(Command) LIKE '%add%') AND ((LOWER(Command) LIKE '%d 4%' AND LOWER(Command) LIKE '%v start%') AND (LOWER(Command) LIKE '%\appidsvc%' OR LOWER(Command) LIKE '%\msmpsvc%' OR LOWER(Command) LIKE '%\nissrv%' OR LOWER(Command) LIKE '%\securityhealthservice%' OR LOWER(Command) LIKE '%\sense%' OR LOWER(Command) LIKE '%\usosvc%' OR LOWER(Command) LIKE '%\wdboot%' OR LOWER(Command) LIKE '%\wdfilter%' OR LOWER(Command) LIKE '%\wdnisdrv%' OR LOWER(Command) LIKE '%\wdnissvc%' OR LOWER(Command) LIKE '%\windefend%' OR LOWER(Command) LIKE '%\wscsvc%' OR LOWER(Command) LIKE '%\wuauserv%'))`

## 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: Security Service Disabled Via Reg.EXE (5e95028c-5229-4214-afae-d653d573d0ec). Author: Florian Roth (Nextron Systems), John Lambert (idea), elhoim. Licence: DRL-1.1.
