Detection rules › Splunk

IIS Worker (W3WP) Spawn Command Line (Windows Event Log)

Group by
_time, host, process_name
Source
github.com/anvilogic-forge/armory

IIS instances (w3wp.exe) host various web-facing client services such as Outlook on the web (formerly known as Outlook Web App or OWA) or Exchange admin center (EAC; formerly known as the Exchange Control Panel or ECP). This use case looks for w3wp executions of command terminal

MITRE ATT&CK coverage

References

Event coverage

Rule body yaml

id: '6108.6588'
title: IIS Worker (W3WP) Spawn Command Line
description: 'IIS instances (w3wp.exe) host various web-facing client services such
  as Outlook on the web (formerly known as Outlook Web App or OWA) or Exchange admin
  center (EAC; formerly known as the Exchange Control Panel or ECP). This use case
  looks for w3wp executions of command terminal. - Threat Actor Association: CL-STA-0043,
  OilRig -- Software Association: ALPHV/BlackCat, Clop'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
  "<EventID>4688<" OR Type=Process) TERM(w3wp) (TERM(cmd) OR TERM(powershell))| regex
  Creator_Process_Name="(?i)w3wp"| regex New_Process_Name="(?i)cmd\.exe|powershell(\_ISE)?\.exe|pwsh\.exe|csc\.exe"
  | table _time, host, user, signature_id, process, process_*, parent_process_* |
  bin span=1s | stats values(*) as * by _time, host, process_name | eventstats c(process_name)
  as c_process_name by process_name| where c_process_name < 25 '
techniques:
- persistence:server software component:iis components
- defense-evasion:system binary proxy execution
technique_id:
- T1505.004
- T1218
data_category:
- Windows event logs
references:
- https://www.microsoft.com/security/blog/2021/02/11/web-shell-attacks-continue-to-rise/
- https://www.huntress.com/blog/moveit-transfer-critical-vulnerability-rapid-response

Stages and Predicates

Stage 1: search

`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) TERM(w3wp) (TERM(cmd) OR TERM(powershell))

Stage 2: regex

| regex Creator_Process_Name="(?i)w3wp"

Stage 3: regex

| regex New_Process_Name="(?i)cmd\.exe|powershell(\_ISE)?\.exe|pwsh\.exe|csc\.exe"

Stage 4: table

| table _time, host, user, signature_id, process, process_*, parent_process_*

Stage 5: bucket

| bin span=1s

Stage 6: stats

| stats values(*) as * by _time, host, process_name

Stage 7: eventstats

| eventstats c(process_name) as c_process_name by process_name

Stage 8: where

| where c_process_name < 25

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Creator_Process_Nameregex_match
  • "(?i)w3wp"
EventCodeeq
  • 4688 corpus 313 (splunk 283, kusto 30)
New_Process_Nameregex_match
    • "(?i)cmd.exe
    • powershell(\_ISE)?.exe
    • pwsh.exe
    • csc.exe"
c_process_namelt
  • 25 corpus 2 (splunk 2)

Search terms

Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.

StageTerm
1TERM
1"<EventID>4688<"
1TERM
1w3wp
1TERM
1cmd
1TERM
1powershell