# OffSet7: Suspicious Process By Web Server Process

> 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 By Web Server Process:selection_webserver_image (match)
All test lines must match (AND).
- when **Parent Process Path** ends with: `\caddy.exe`, `\httpd.exe`, `\nginx.exe`, `\php-cgi.exe`, `\php.exe`, `\tomcat.exe`, `\UMWorkerProcess.exe`, `\w3wp.exe`, `\ws_TomcatService.exe`

### BB:OffSet7:Suspicious Process By Web Server Process:selection_webserver_characteristics_tomcat1 (match)
All test lines must match (AND).
- when **Parent Process Path** ends with: `\java.exe`, `\javaw.exe`
- when **Parent Process Path** contains: `-tomcat-`, `\tomcat`

### BB:OffSet7:Suspicious Process By Web Server Process:selection_webserver_characteristics_tomcat2 (match)
All test lines must match (AND).
- when **Parent Process Path** ends with: `\java.exe`, `\javaw.exe`
- when **Parent Command** contains: `CATALINA_HOME`, `catalina.home`, `catalina.jar`

### BB:OffSet7:Suspicious Process By Web Server Process:selection_anomaly_children (match)
All test lines must match (AND).
- when **Process Path / Process Name** ends with: `\arp.exe`, `\at.exe`, `\bash.exe`, `\bitsadmin.exe`, `\certutil.exe`, `\cmd.exe`, `\cscript.exe`, `\dsget.exe`, `\hostname.exe`, `\nbtstat.exe`, `\net.exe`, `\net1.exe`, `\netdom.exe`, `\netsh.exe`, `\nltest.exe`, `\ntdsutil.exe`, `\powershell_ise.exe`, `\powershell.exe`, `\pwsh.exe`, `\qprocess.exe`, `\query.exe`, `\qwinsta.exe`, `\reg.exe`, `\rundll32.exe`, `\sc.exe`, `\sh.exe`, `\wmic.exe`, `\wscript.exe`, `\wusa.exe`

### BB:OffSet7:Suspicious Process By Web Server Process:filter_main_fp_1 (exclusion)
All test lines must match (AND).
- when **Parent Process Path** ends with: `\java.exe`
- when **Command** ends with: `Windows\system32\cmd.exe /c C:\ManageEngine\ADManager "Plus\ES\bin\elasticsearch.bat -Enode.name=RMP-NODE1 -pelasticsearch-pid.txt`

### BB:OffSet7:Suspicious Process By Web Server Process:filter_main_fp_2 (exclusion)
All test lines must match (AND).
- when **Parent Process Path** ends with: `\java.exe`
- when **Command** contains: `sc query`, `ADManager Plus`

## 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 By Web Server Process:selection_webserver_image, BB:OffSet7:Suspicious Process By Web Server Process:selection_webserver_characteristics_tomcat1, BB:OffSet7:Suspicious Process By Web Server Process:selection_webserver_characteristics_tomcat2]) AND BB:OffSet7:Suspicious Process By Web Server Process:selection_anomaly_children AND NOT (ANY of [BB:OffSet7:Suspicious Process By Web Server Process:filter_main_fp_1, BB:OffSet7:Suspicious Process By Web Server Process:filter_main_fp_2])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND ((LOWER("Parent Process Path") LIKE '%\caddy.exe' OR LOWER("Parent Process Path") LIKE '%\httpd.exe' OR LOWER("Parent Process Path") LIKE '%\nginx.exe' OR LOWER("Parent Process Path") LIKE '%\php-cgi.exe' OR LOWER("Parent Process Path") LIKE '%\php.exe' OR LOWER("Parent Process Path") LIKE '%\tomcat.exe' OR LOWER("Parent Process Path") LIKE '%\umworkerprocess.exe' OR LOWER("Parent Process Path") LIKE '%\w3wp.exe' OR LOWER("Parent Process Path") LIKE '%\ws_tomcatservice.exe') OR ((LOWER("Parent Process Path") LIKE '%\java.exe' OR LOWER("Parent Process Path") LIKE '%\javaw.exe') AND (LOWER("Parent Process Path") LIKE '%-tomcat-%' OR LOWER("Parent Process Path") LIKE '%\tomcat%')) OR ((LOWER("Parent Process Path") LIKE '%\java.exe' OR LOWER("Parent Process Path") LIKE '%\javaw.exe') AND (LOWER("Parent Command") LIKE '%catalina_home%' OR LOWER("Parent Command") LIKE '%catalina.home%' OR LOWER("Parent Command") LIKE '%catalina.jar%'))) AND ((LOWER("Process Path") LIKE '%\arp.exe' OR LOWER("Process Path") LIKE '%\at.exe' OR LOWER("Process Path") LIKE '%\bash.exe' OR LOWER("Process Path") LIKE '%\bitsadmin.exe' OR LOWER("Process Path") LIKE '%\certutil.exe' OR LOWER("Process Path") LIKE '%\cmd.exe' OR LOWER("Process Path") LIKE '%\cscript.exe' OR LOWER("Process Path") LIKE '%\dsget.exe' OR LOWER("Process Path") LIKE '%\hostname.exe' OR LOWER("Process Path") LIKE '%\nbtstat.exe' OR LOWER("Process Path") LIKE '%\net.exe' OR LOWER("Process Path") LIKE '%\net1.exe' OR LOWER("Process Path") LIKE '%\netdom.exe' OR LOWER("Process Path") LIKE '%\netsh.exe' OR LOWER("Process Path") LIKE '%\nltest.exe' OR LOWER("Process Path") LIKE '%\ntdsutil.exe' OR LOWER("Process Path") LIKE '%\powershell_ise.exe' OR LOWER("Process Path") LIKE '%\powershell.exe' OR LOWER("Process Path") LIKE '%\pwsh.exe' OR LOWER("Process Path") LIKE '%\qprocess.exe' OR LOWER("Process Path") LIKE '%\query.exe' OR LOWER("Process Path") LIKE '%\qwinsta.exe' OR LOWER("Process Path") LIKE '%\reg.exe' OR LOWER("Process Path") LIKE '%\rundll32.exe' OR LOWER("Process Path") LIKE '%\sc.exe' OR LOWER("Process Path") LIKE '%\sh.exe' OR LOWER("Process Path") LIKE '%\wmic.exe' OR LOWER("Process Path") LIKE '%\wscript.exe' OR LOWER("Process Path") LIKE '%\wusa.exe') OR (LOWER("Process Name") LIKE '%\arp.exe' OR LOWER("Process Name") LIKE '%\at.exe' OR LOWER("Process Name") LIKE '%\bash.exe' OR LOWER("Process Name") LIKE '%\bitsadmin.exe' OR LOWER("Process Name") LIKE '%\certutil.exe' OR LOWER("Process Name") LIKE '%\cmd.exe' OR LOWER("Process Name") LIKE '%\cscript.exe' OR LOWER("Process Name") LIKE '%\dsget.exe' OR LOWER("Process Name") LIKE '%\hostname.exe' OR LOWER("Process Name") LIKE '%\nbtstat.exe' OR LOWER("Process Name") LIKE '%\net.exe' OR LOWER("Process Name") LIKE '%\net1.exe' OR LOWER("Process Name") LIKE '%\netdom.exe' OR LOWER("Process Name") LIKE '%\netsh.exe' OR LOWER("Process Name") LIKE '%\nltest.exe' OR LOWER("Process Name") LIKE '%\ntdsutil.exe' OR LOWER("Process Name") LIKE '%\powershell_ise.exe' OR LOWER("Process Name") LIKE '%\powershell.exe' OR LOWER("Process Name") LIKE '%\pwsh.exe' OR LOWER("Process Name") LIKE '%\qprocess.exe' OR LOWER("Process Name") LIKE '%\query.exe' OR LOWER("Process Name") LIKE '%\qwinsta.exe' OR LOWER("Process Name") LIKE '%\reg.exe' OR LOWER("Process Name") LIKE '%\rundll32.exe' OR LOWER("Process Name") LIKE '%\sc.exe' OR LOWER("Process Name") LIKE '%\sh.exe' OR LOWER("Process Name") LIKE '%\wmic.exe' OR LOWER("Process Name") LIKE '%\wscript.exe' OR LOWER("Process Name") LIKE '%\wusa.exe')) AND (NOT(((LOWER("Parent Process Path") LIKE '%\java.exe' AND LOWER(Command) LIKE '%windows\system32\cmd.exe /c c:\manageengine\admanager "plus\es\bin\elasticsearch.bat -enode.name=rmp-node1 -pelasticsearch-pid.txt') OR (LOWER("Parent Process Path") LIKE '%\java.exe' AND (LOWER(Command) LIKE '%sc query%' AND LOWER(Command) LIKE '%admanager plus%')))))`

## 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 By Web Server Process (8202070f-edeb-4d31-a010-a26c72ac5600). Author: Thomas Patzke, Florian Roth (Nextron Systems), Zach Stanford @svch0st, Tim Shelton, Nasreddine Bencherchali (Nextron Systems). Licence: DRL-1.1.
