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
Weaponized patience: the strategic implications of the F5 breach
The F5 breach reveals the growing danger of shared infrastructure attacks. As adversaries learn faster than defenders, the only path to resilience is continuous, adaptive testing.…
Everyone has a plan until they get punched in the face: reflections on the NCSC 2025 annual review
The NCSC Annual Review 2025 delivers a reality check. Highly significant cyber incidents have increased by 50 percent year over year. It’s time to act.
Part 3: CBEST Series – The Future of Threat-Led Penetration Testing
Regulated testing like CBEST is pivotal, but as threats shift, organizations must adopt more strategic, agile threat-led penetration testing. Discover what’s next.