Detection rules › Splunk

Detect Exchange Web Shell

Author
Michael Haag, Shannon Davis, David Dorsey, Splunk
Source
upstream

The following analytic identifies the creation of suspicious .aspx files in known drop locations for Exchange exploitation, specifically targeting paths associated with HAFNIUM group and vulnerabilities like ProxyShell and ProxyNotShell. It leverages data from the Endpoint datamodel, focusing on process and filesystem events. This activity is significant as it may indicate a web shell deployment, a common method for persistent access and remote code execution. If confirmed malicious, attackers could gain unauthorized access, execute arbitrary commands, and potentially escalate privileges within the Exchange environment.

MITRE ATT&CK coverage

TacticTechniques
Initial AccessT1133 External Remote Services, T1190 Exploit Public-Facing Application
PersistenceT1133 External Remote Services, T1505.003 Server Software Component: Web Shell

Event coverage

ProviderEvent IDTitle
Sysmon11FileCreate

Stages and Predicates

Stage 1: tstats

tstats WHERE Filesystem.file_name IN ("*.ashx", "*.aspx") Filesystem.file_path IN ("*\\HttpProxy\\OAB\\*", "*\\HttpProxy\\owa\\auth\\*", "*\\inetpub\\wwwroot\\aspnet_client\\*") BY Filesystem.action, Filesystem.dest, Filesystem.file_access_time, Filesystem.file_create_time, Filesystem.file_hash, Filesystem.file_modify_time, Filesystem.file_name, Filesystem.file_path, Filesystem.file_acl, Filesystem.file_size, Filesystem.process_guid, Filesystem.process_id, Filesystem.user, Filesystem.vendor_product

Stage 2: search

search

Stage 3: search

search

Stage 4: search

search

Stage 5: search

search `macro`

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
Filesystem.file_namein
  • "*.ashx" corpus 4 (splunk 4)
  • "*.aspx" corpus 3 (splunk 3)
Filesystem.file_pathin
  • "*\\HttpProxy\\OAB\\*" corpus 2 (splunk 2)
  • "*\\HttpProxy\\owa\\auth\\*" corpus 2 (splunk 2)
  • "*\\inetpub\\wwwroot\\aspnet_client\\*" corpus 2 (splunk 2)