# OffSet7: Suspicious Child Process Of SQL Server

> 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 Child Process Of SQL Server:selection (match)
All test lines must match (AND).
- when **Parent Process Path** ends with: `\sqlservr.exe`
- when **Process Path / Process Name** ends with: `\bash.exe`, `\bitsadmin.exe`, `\cmd.exe`, `\netstat.exe`, `\nltest.exe`, `\ping.exe`, `\powershell.exe`, `\pwsh.exe`, `\regsvr32.exe`, `\rundll32.exe`, `\sh.exe`, `\systeminfo.exe`, `\tasklist.exe`, `\wsl.exe`

### BB:OffSet7:Suspicious Child Process Of SQL Server:filter_optional_datev (exclusion)
All test lines must match (AND).
- when **Parent Process Path** starts with: `C:\Program Files\Microsoft SQL Server\`
- when **Parent Process Path** ends with: `DATEV_DBENGINE\MSSQL\Binn\sqlservr.exe`
- when **Process Path / Process Name** is equal to (case-insensitive): `C:\Windows\System32\cmd.exe`
- when **Command** starts with: `"C:\Windows\system32\cmd.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: `BB:OffSet7:Suspicious Child Process Of SQL Server:selection AND NOT (ANY of [BB:OffSet7:Suspicious Child Process Of SQL Server:filter_optional_datev])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND (LOWER("Parent Process Path") LIKE '%\sqlservr.exe' AND ((LOWER("Process Path") LIKE '%\bash.exe' OR LOWER("Process Path") LIKE '%\bitsadmin.exe' OR LOWER("Process Path") LIKE '%\cmd.exe' OR LOWER("Process Path") LIKE '%\netstat.exe' OR LOWER("Process Path") LIKE '%\nltest.exe' OR LOWER("Process Path") LIKE '%\ping.exe' OR LOWER("Process Path") LIKE '%\powershell.exe' OR LOWER("Process Path") LIKE '%\pwsh.exe' OR LOWER("Process Path") LIKE '%\regsvr32.exe' OR LOWER("Process Path") LIKE '%\rundll32.exe' OR LOWER("Process Path") LIKE '%\sh.exe' OR LOWER("Process Path") LIKE '%\systeminfo.exe' OR LOWER("Process Path") LIKE '%\tasklist.exe' OR LOWER("Process Path") LIKE '%\wsl.exe') OR (LOWER("Process Name") LIKE '%\bash.exe' OR LOWER("Process Name") LIKE '%\bitsadmin.exe' OR LOWER("Process Name") LIKE '%\cmd.exe' OR LOWER("Process Name") LIKE '%\netstat.exe' OR LOWER("Process Name") LIKE '%\nltest.exe' OR LOWER("Process Name") LIKE '%\ping.exe' OR LOWER("Process Name") LIKE '%\powershell.exe' OR LOWER("Process Name") LIKE '%\pwsh.exe' OR LOWER("Process Name") LIKE '%\regsvr32.exe' OR LOWER("Process Name") LIKE '%\rundll32.exe' OR LOWER("Process Name") LIKE '%\sh.exe' OR LOWER("Process Name") LIKE '%\systeminfo.exe' OR LOWER("Process Name") LIKE '%\tasklist.exe' OR LOWER("Process Name") LIKE '%\wsl.exe'))) AND (NOT((LOWER("Parent Process Path") LIKE 'c:\program files\microsoft sql server\%' AND LOWER("Parent Process Path") LIKE '%datev_dbengine\mssql\binn\sqlservr.exe' AND ("Process Path"='C:\Windows\System32\cmd.exe' OR "Process Name"='C:\Windows\System32\cmd.exe') AND LOWER(Command) LIKE '"c:\windows\system32\cmd.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: Suspicious Child Process Of SQL Server (869b9ca7-9ea2-4a5a-8325-e80e62f75445). Author: FPT.EagleEye Team, wagga. Licence: DRL-1.1.
