Detection: Windows Exchange Autodiscover SSRF Abuse

Description

The following analytic detects potential abuse of the ProxyShell or ProxyNotShell vulnerabilities in Microsoft Exchange via Server Side Request Forgery (SSRF). It leverages the Web datamodel to identify suspicious POST requests with specific URI paths and queries related to autodiscover, powershell, and mapi. This activity is significant as it may indicate an attempt to exploit Exchange server vulnerabilities to access internal services or sensitive data. If confirmed malicious, this could lead to unauthorized access, data exfiltration, or further compromise of the network.

 1
 2| tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Web where (Web.status=200 OR Web.status=302 OR Web.status=401) AND Web.http_method=POST by Web.src Web.status Web.uri_path Web.dest Web.http_method Web.uri_query 
 3| `drop_dm_object_name("Web")` 
 4| eval is_autodiscover=if(like(lower(uri_path),"%autodiscover%"),1,0) 
 5| eval powershell = if(match(lower(uri_query),"powershell"), "1",0) 
 6| eval mapi=if(like(uri_query,"%/mapi/%"),1,0) 
 7| addtotals fieldname=Score is_autodiscover, powershell, mapi 
 8| fields Score, src,dest, status, uri_query,uri_path,http_method 
 9| where Score >= 2 
10| `security_content_ctime(firstTime)` 
11| `security_content_ctime(lastTime)` 
12| `windows_exchange_autodiscover_ssrf_abuse_filter`

Data Source

Name Platform Sourcetype Source
Windows IIS Windows icon Windows 'IIS:Configuration:Operational' 'IIS:Configuration:Operational'

Macros Used

Name Value
security_content_ctime convert timeformat="%Y-%m-%dT%H:%M:%S" ctime($field$)
windows_exchange_autodiscover_ssrf_abuse_filter search *
windows_exchange_autodiscover_ssrf_abuse_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1190 Exploit Public-Facing Application Initial Access
T1133 External Remote Services Initial Access
KillChainPhase.DELIVERY
KillChainPhase.INSTALLATION
NistCategory.DE_CM
Cis18Value.CIS_13
APT28
APT29
APT39
APT41
APT5
Agrius
Axiom
BackdoorDiplomacy
BlackTech
Blue Mockingbird
Cinnamon Tempest
Dragonfly
Earth Lusca
Ember Bear
FIN13
FIN7
Fox Kitten
GALLIUM
GOLD SOUTHFIELD
HAFNIUM
INC Ransom
Ke3chang
Kimsuky
Magic Hound
Moses Staff
MuddyWater
Play
Rocke
Sandworm Team
Threat Group-3390
ToddyCat
Volatile Cedar
Volt Typhoon
Winter Vivern
menuPass
APT18
APT28
APT29
APT41
Akira
Chimera
Dragonfly
Ember Bear
FIN13
FIN5
GALLIUM
GOLD SOUTHFIELD
Ke3chang
Kimsuky
LAPSUS$
Leviathan
OilRig
Play
Sandworm Team
Scattered Spider
TeamTNT
Threat Group-3390
Volt Typhoon
Wizard Spider

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Notable Yes
Rule Title %name%
Rule Description %description%
Notable Event Fields user, dest
Creates Risk Event True
This configuration file applies to all detections of type TTP. These detections will use Risk Based Alerting and generate Notable Events.

Implementation

To successfully implement this search you need to be ingesting information on Web traffic, Exchange OR IIS logs, mapped to Web datamodel in the Web node. In addition, confirm the latest CIM App 4.20 or higher is installed.

Known False Positives

False positives are limited.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message Risk Score Impact Confidence
Activity related to ProxyShell or ProxyNotShell has been identified on $dest$. Review events and take action accordingly. 72 90 80
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset ms:iis:splunk ms:iis:splunk
Integration ✅ Passing Dataset ms:iis:splunk ms:iis:splunk

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub | Version: 3