Analytics Story: ProxyShell

Description

ProxyShell is a chain of exploits targeting on-premise Microsoft Exchange Server - CVE-2021-34473, CVE-2021-34523, and CVE-2021-31207.

Why it matters

During Pwn2Own April 2021, a security researcher demonstrated an attack chain targeting on-premise Microsoft Exchange Server. August 5th, the same researcher publicly released further details and demonstrated the attack chain. CVE-2021-34473 Pre-auth path confusion leads to ACL Bypass (Patched in April by KB5001779) CVE-2021-34523 - Elevation of privilege on Exchange PowerShell backend (Patched in April by KB5001779) . CVE-2021-31207 - Post-auth Arbitrary-File-Write leads to RCE (Patched in May by KB5003435) Upon successful exploitation, the remote attacker will have SYSTEM privileges on the Exchange Server. In addition to remote access/execution, the adversary may be able to run Exchange PowerShell Cmdlets to perform further actions.

ProxyShell ProxyNotShell Behavior Detected

 1| tstats `security_content_summariesonly` min(_time) as firstTime max(_time) as lastTime sum(All_Risk.calculated_risk_score) as risk_score, count(All_Risk.calculated_risk_score) as risk_event_count, values(All_Risk.annotations.mitre_attack.mitre_tactic_id) as annotations.mitre_attack.mitre_tactic_id, dc(All_Risk.annotations.mitre_attack.mitre_tactic_id) as mitre_tactic_id_count, values(All_Risk.analyticstories) as analyticstories values(All_Risk.annotations.mitre_attack.mitre_technique_id) as annotations.mitre_attack.mitre_technique_id, dc(All_Risk.annotations.mitre_attack.mitre_technique_id) as mitre_technique_id_count, values(All_Risk.tag) as tag, values(source) as source, dc(source) as source_count dc(All_Risk.analyticstories) as dc_analyticstories FROM datamodel=Risk.All_Risk
 2  WHERE All_Risk.analyticstories IN ("ProxyNotShell","ProxyShell")
 3    OR
 4    (All_Risk.analyticstories IN ("ProxyNotShell","ProxyShell")
 5    AND
 6    All_Risk.analyticstories="Cobalt Strike") All_Risk.risk_object_type="system"
 7  BY _time span=1h All_Risk.risk_object
 8     All_Risk.risk_object_type
 9| `drop_dm_object_name(All_Risk)`
10| `security_content_ctime(firstTime)`
11| `security_content_ctime(lastTime)`
12| where source_count >=5
13| `proxyshell_proxynotshell_behavior_detected_filter`

Detections

Name ▲▼ Technique ▲▼ Type ▲▼
Exchange PowerShell Abuse via SSRF External Remote Services, Exploit Public-Facing Application TTP
Web or Application Server Spawning a Shell External Remote Services, Exploit Public-Facing Application TTP
Windows Exchange Autodiscover SSRF Abuse External Remote Services, Exploit Public-Facing Application TTP
Detect Exchange Web Shell External Remote Services, Exploit Public-Facing Application, Web Shell TTP
Windows Suspicious Child Process Spawned From WebServer Web Shell Anomaly
Windows MSExchange Management Mailbox Cmdlet Usage PowerShell Anomaly
MS Exchange Mailbox Replication service writing Active Server Pages External Remote Services, Exploit Public-Facing Application, Web Shell TTP
Windows Shell or Script Execution From IIS Directory Exploit Public-Facing Application, IIS Components Anomaly
Exchange PowerShell Module Usage PowerShell TTP

Data Sources

Name ▲▼ Platform ▲▼ Sourcetype ▲▼ Source ▲▼
Sysmon EventID 1 Windows icon Windows XmlWinEventLog XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
Sysmon for Linux EventID 1 Linux icon Linux sysmon:linux Syslog:Linux-Sysmon/Operational
Windows IIS Windows icon Windows IIS:Configuration:Operational IIS:Configuration:Operational
Sysmon EventID 11 Windows icon Windows XmlWinEventLog XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
CrowdStrike ProcessRollup2 Other crowdstrike:events:sensor crowdstrike
Windows Event Log Security 4688 Windows icon Windows XmlWinEventLog XmlWinEventLog:Security
Powershell Script Block Logging 4104 Windows icon Windows XmlWinEventLog XmlWinEventLog:Microsoft-Windows-PowerShell/Operational

References


Source: GitHub | Version: 2