# OffSet7: Potentially Suspicious Execution Of PDQDeployRunner

> 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:Potentially Suspicious Execution Of PDQDeployRun:selection_parent (match)
All test lines must match (AND).
- when **Parent Process Path** contains: `\PDQDeployRunner-`

### BB:OffSet7:Potentially Suspicious Execution Of PDQDeployRun:selection_child (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: `\bash.exe`, `\certutil.exe`, `\cmd.exe`, `\csc.exe`, `\cscript.exe`, `\dllhost.exe`, `\mshta.exe`, `\msiexec.exe`, `\regsvr32.exe`, `\rundll32.exe`, `\scriptrunner.exe`, `\wmic.exe`, `\wscript.exe`, `\wsl.exe`
- when **Process Path / Process Name** contains: `:\ProgramData\`, `:\Users\Public\`, `:\Windows\TEMP\`, `\AppData\Local\Temp`
- when **Command** contains: ` -decode`, ` -enc`, ` -encodedcommand`, ` -w hidden`, `DownloadString`, `FromBase64String`, `http`, `iex`, `Invoke-`

## 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:Potentially Suspicious Execution Of PDQDeployRun:selection_parent, BB:OffSet7:Potentially Suspicious Execution Of PDQDeployRun:selection_child])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND LOWER("Parent Process Path") LIKE '%\pdqdeployrunner-%' AND (((LOWER("Process Path") LIKE '%\bash.exe' OR LOWER("Process Path") LIKE '%\certutil.exe' OR LOWER("Process Path") LIKE '%\cmd.exe' OR LOWER("Process Path") LIKE '%\csc.exe' OR LOWER("Process Path") LIKE '%\cscript.exe' OR LOWER("Process Path") LIKE '%\dllhost.exe' OR LOWER("Process Path") LIKE '%\mshta.exe' OR LOWER("Process Path") LIKE '%\msiexec.exe' OR LOWER("Process Path") LIKE '%\regsvr32.exe' OR LOWER("Process Path") LIKE '%\rundll32.exe' OR LOWER("Process Path") LIKE '%\scriptrunner.exe' OR LOWER("Process Path") LIKE '%\wmic.exe' OR LOWER("Process Path") LIKE '%\wscript.exe' OR LOWER("Process Path") LIKE '%\wsl.exe') OR (LOWER("Process Name") LIKE '%\bash.exe' OR LOWER("Process Name") LIKE '%\certutil.exe' OR LOWER("Process Name") LIKE '%\cmd.exe' OR LOWER("Process Name") LIKE '%\csc.exe' OR LOWER("Process Name") LIKE '%\cscript.exe' OR LOWER("Process Name") LIKE '%\dllhost.exe' OR LOWER("Process Name") LIKE '%\mshta.exe' OR LOWER("Process Name") LIKE '%\msiexec.exe' OR LOWER("Process Name") LIKE '%\regsvr32.exe' OR LOWER("Process Name") LIKE '%\rundll32.exe' OR LOWER("Process Name") LIKE '%\scriptrunner.exe' OR LOWER("Process Name") LIKE '%\wmic.exe' OR LOWER("Process Name") LIKE '%\wscript.exe' OR LOWER("Process Name") LIKE '%\wsl.exe')) OR ((LOWER("Process Path") LIKE '%:\programdata\%' OR LOWER("Process Path") LIKE '%:\users\public\%' OR LOWER("Process Path") LIKE '%:\windows\temp\%' OR LOWER("Process Path") LIKE '%\appdata\local\temp%') OR (LOWER("Process Name") LIKE '%:\programdata\%' OR LOWER("Process Name") LIKE '%:\users\public\%' OR LOWER("Process Name") LIKE '%:\windows\temp\%' OR LOWER("Process Name") LIKE '%\appdata\local\temp%')) OR (LOWER(Command) LIKE '% -decode %' OR LOWER(Command) LIKE '% -enc %' OR LOWER(Command) LIKE '% -encodedcommand %' OR LOWER(Command) LIKE '% -w hidden%' OR LOWER(Command) LIKE '%downloadstring%' OR LOWER(Command) LIKE '%frombase64string%' OR LOWER(Command) LIKE '%http%' OR LOWER(Command) LIKE '%iex %' OR LOWER(Command) LIKE '%invoke-%'))`

## Rule response

- Severity 5, 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: Potentially Suspicious Execution Of PDQDeployRunner (12b8e9f5-96b2-41e1-9a42-8c6779a5c184). Author: Nasreddine Bencherchali (Nextron Systems). Licence: DRL-1.1.
