Skip to content

Commit 8ce3783

Browse files
committed
Update windows_exchange_autodiscover_ssrf_abuse.yml
- Updated detection description to better explain ProxyShell (CVE-2021-34473, CVE-2021-34523, CVE-2021-31207) and ProxyNotShell (CVE-2022-41040, CVE-2022-41082) attack patterns - Enhanced search query: - X-Rps-CAT parameter - Suspicious user agent strings
1 parent c91f76b commit 8ce3783

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

detections/web/windows_exchange_autodiscover_ssrf_abuse.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
name: Windows Exchange Autodiscover SSRF Abuse
22
id: d436f9e7-0ee7-4a47-864b-6dea2c4e2752
3-
version: 3
4-
date: '2024-09-30'
3+
version: 4
4+
date: '2025-01-16'
55
author: Michael Haag, Nathaniel Stearns, Splunk
66
status: production
77
type: TTP
8-
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.
8+
description: This analytic identifies potential exploitation attempts of ProxyShell (CVE-2021-34473, CVE-2021-34523, CVE-2021-31207) and ProxyNotShell (CVE-2022-41040, CVE-2022-41082) vulnerabilities in Microsoft Exchange Server. The detection focuses on identifying the SSRF attack patterns used in these exploit chains. The analytic monitors for suspicious POST requests to /autodiscover/autodiscover.json endpoints that may indicate attempts to enumerate LegacyDN attributes as part of initial reconnaissance. It also detects requests containing X-Rps-CAT parameters that could indicate attempts to impersonate Exchange users and access the PowerShell backend. Additionally, it looks for MAPI requests that may be used to obtain user SIDs, along with suspicious user agents (particularly Python-based) commonly used in automated exploit attempts. If successful, these attacks can lead to remote code execution as SYSTEM, allowing attackers to deploy webshells, access mailboxes, or gain persistent access to the Exchange server and potentially the broader network environment.
99
data_source:
1010
- Windows IIS
11-
search: '| 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 | `drop_dm_object_name("Web")` | eval is_autodiscover=if(like(lower(uri_path),"%autodiscover%"),1,0) | eval powershell = if(match(lower(uri_query),"powershell"), "1",0) | eval mapi=if(like(uri_query,"%/mapi/%"),1,0) | addtotals fieldname=Score is_autodiscover, powershell, mapi | fields Score, src,dest, status, uri_query,uri_path,http_method | where Score >= 2 | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)` | `windows_exchange_autodiscover_ssrf_abuse_filter`'
11+
search: ' | tstats `security_content_summariesonly` count min(_time) as firstTime max(_time) as lastTime from datamodel=Web where (Web.status=200) AND Web.http_method=POST by Web.src Web.status Web.uri_path Web.dest Web.http_method Web.uri_query Web.http_user_agent
12+
| `drop_dm_object_name("Web")`
13+
| eval is_autodiscover=if(like(lower(uri_path),"%autodiscover/autodiscover.json%"),1,0)
14+
| eval has_rps_cat=if(like(lower(uri_query),"%x-rps-cat=%"),1,0)
15+
| eval exchange_backend=if(like(lower(uri_query),"%/powershell/?%"),1,0)
16+
| eval mapi=if(like(uri_query,"%/mapi/%"),1,0)
17+
| eval suspicious_agent=if(match(lower(http_user_agent), "python|urllib"),1,0)
18+
| addtotals fieldname=Score is_autodiscover, has_rps_cat, exchange_backend, mapi, suspicious_agent
19+
| where Score >= 3
20+
| fields Score, src, dest, status, uri_query, uri_path, http_method, http_user_agent
21+
| `windows_exchange_autodiscover_ssrf_abuse_filter`'
1222
how_to_implement: 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.
1323
known_false_positives: False positives are limited.
1424
references:
@@ -21,6 +31,7 @@ references:
2131
- https://docs.splunk.com/Documentation/AddOns/released/MSIIS
2232
- https://highon.coffee/blog/ssrf-cheat-sheet/
2333
- https://owasp.org/Top10/A10_2021-Server-Side_Request_Forgery_%28SSRF%29/
34+
- https://m365internals.com/2022/10/18/hunting-and-responding-to-proxyshell-attacks/
2435
drilldown_searches:
2536
- name: View the detection results for - "$dest$"
2637
search: '%original_detection_search% | search dest = "$dest$"'

0 commit comments

Comments
 (0)