CVE-2022-41040, CVE-2022-41082, ZDI-CAN-18333, ZDI-CAN-18802
We would like to update you on to the following critical 0-day vulnerability within Exchange Server. Whilst this issue is being exploited in the wild, scope of these attacks is currently not known.
A previously unknown authenticated remote code execution (RCE) vulnerability has been discovered being used in the wild. A combination of a Server-Side Request Forgery (SSRF) vulnerability and another vulnerability leads to RCE. Post exploitation activities have seen obfuscated webshells being dropped on to Exchange servers along with malicious DLL files.
This is an ongoing threat, and details are still emerging. We will update this threat alert as more information become available.
Affected Versions
-
Microsoft Exchange Server 2013
-
Microsoft Exchange Server 2016
-
Microsoft Exchange Server 2019
Note: Exchange Online is not effected
Detection
Currently two methods of detection have been developed to help identify if a server is effected.
Method 1 – Powershell
Get-ChildItem -Recurse -Path <Path_IIS_Logs> -Filter "*.log" | Select-String -Pattern 'powershell.*autodiscover.json.*@.*200
Method 2 – GTSC Tool
GTSC have released a tool to detect that is reportedly faster than Powershell, CovertSwarm have not tested this tool, see references for details.
Mitigation
Microsoft Exchange Online clients do not need to take any action. On premises Microsoft Exchange clients should review and apply the following URL Rewrite Instructions and block exposed Remote PowerShell ports.
The current mitigation is to add a blocking rule in IIS Manager -> Default Web Site -> Autodiscover -> URL Rewrite -> Actions to block the known attack patterns.
Microsoft has confirmed that the following URL Rewrite Instructions, which are currently being discussed publicly, are successful in breaking current attack chains.
-
Open the IIS Manager.
-
Expand the Default Web Site.
-
Select Autodiscover.
-
In the Feature View, click URL Rewrite.
-
In the Actions pane on the right-hand side, click Add Rules.
-
Select Request Blocking and click OK.
-
Add String “.*autodiscover.json.*@.*Powershell.*” (excluding quotes) and click OK.
-
Expand the rule and select the rule with the Pattern “.*autodiscover.json.*@.*Powershell.*” and click Edit under Conditions.
-
Change the condition input from {URL} to {REQUEST_URI}
Impact: There is no known impact to Exchange functionality if the URL Rewrite module is installed as recommended.
Authenticated attackers who can access PowerShell Remoting on vulnerable Exchange systems will be able to trigger RCE using CVE-2022-41082. Blocking the ports used for Remote PowerShell can limit these attacks.
-
HTTP: 5985
-
HTTPS: 5986
Remediation
There are currently no outstanding patches released to mitigate this vulnerability.
References
-
https://success.trendmicro.com/dcx/s/solution/000291651?language=en_US
-
Untested Tool developed by GTSC for faster detection: Based on the exploit signature
https://github.com/ncsgroupvn/NCSE0Scanner
The call nobody talks about
The attack call is the one that gets written up in the report. But in James Sheppard’s experience, it’s rarely the most important call he makes.
DORA Threat-Led Penetration Testing: What article 26 actually requires
Annual penetration testing does not satisfy DORA’s testing mandate. Here’s what Article 26 actually requires, who it applies to, and what a real TLPT exercise looks…
Deloitte ranks CovertSwarm among EMEA’s 500 fastest-growing tech companies.
Based on verified revenue growth of 595.89% over three years. Here’s what the number means and why the model behind it was built this way from…