ZeroHour
Infosecurity Magazinepublished ()ingested Kevin Poireault

Microsoft Confirms Two Exchange Zero

criticalExploit / PoC exploited in the wildimportance 60CVE-2022-41040CVE-2022-41082

Vulnerabilities mentionedAll →

CVEVulnerabilityCVSSEPSSFlagsAffectedExposurePublished
CVE-2022-41040
+1 in the same advisory: …41082
Server-Side Request Forgery in Microsoft Exchange Server (ProxyNotShell)

CVE-2022-41040 is a server-side request forgery (SSRF, CWE-918) vulnerability in Microsoft Exchange Server, publicly tracked under the name "ProxyNotShell" together with CVE-2022-41082. It is triggered when an attacker sends crafted HTTP requests to exposed Exchange web endpoints (such as Autodiscover), causing the server to issue attacker-influenced requests to itself. On its own the SSRF coerces authenticated server-side requests, but when chained with the CVE-2022-41082 remote code execution flaw it gives the attacker code execution on the Exchange server, typically followed by web shells, data access, and — in observed campaigns — ransomware deployment. Organizations running on-premises Microsoft Exchange Server are affected; the source data lists only Microsoft Exchange Server and does not specify affected version ranges, and hosted Exchange Online is a separate product not listed here. The vulnerability is being actively exploited in the wild: it was added to CISA's Known Exploited Vulnerabilities catalog on 2022-09-30 with known ransomware use, and EPSS assigns it a 100% probability of exploitation within 30 days; no public PoC is listed.

Do: Apply Microsoft's Exchange Server security updates per vendor instructions immediately, as required by the CISA KEV catalog. As interim mitigation, restrict or block untrusted internet access to Exchange web endpoints (e.g., Autodiscover, OWA, ECP), and review IIS logs for suspicious crafted requests indicating SSRF or the chained CVE-2022-41082 exploitation. Given documented ransomware use, prioritize any internet-facing Exchange server and hunt for web shells and post-exploitation activity.

8.8
group max
100% KEV ransomware PoC
  • Microsoft Exchange Server
mass≈250,000+ internet-exposed Exchange servers (public scans of exposed OWA/ECP/Exchange endpoints)
Full article701 words · extracted from infosecurity-magazine.com · click to collapse

Microsoft has today confirmed the existence of two new zero-day vulnerabilities allowing for remote code execution on Microsoft Exchange Server 2013, 2016, and 2019, following previous claims made by security researchers at Vietnamese cybersecurity firm GTSC.

“The first vulnerability, identified as CVE-2022-41040, is a Server-Side Request Forgery (SSRF) vulnerability, while the second, identified as CVE-2022-41082, allows remote code execution (RCE) when PowerShell is accessible to the attacker,” Microsoft said.

According to GTSC, the zero-days are chained to deploy Chinese Chopper web shells for persistence and data theft, and to move laterally through the victims’ networks. GTSC also suspects that a Chinese threat group might be responsible for the ongoing attacks based on the web shell code pages, which use Microsoft character encoding for simplified Chinese.

“At this time, Microsoft is aware of limited targeted attacks using the two vulnerabilities to get into users’ systems,” the company added.

It then explained that the CVE-2022-41040 flaw could only be exploited by authenticated attackers, which makes it critical only to on-premises Exchange users. Successful exploitation then allows attackers to trigger the CVE-2022-41082 RCE vulnerability.

Mitigations Needed

“We are working on an accelerated timeline to release a fix. Until then, we’re providing the mitigations and detections guidance below to help customers protect themselves from these attacks,” Microsoft added.

“On-premises Microsoft Exchange customers 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.”

To apply the mitigation to vulnerable servers, the following steps should be taken:

  1. Open the IIS Manager
  2. Expand the Default Web Site
  3. Select Autodiscover
  4. In the Feature View, click URL Rewrite
  5. In the Actions pane on the right-hand side, click Add Rules
  6. Select Request Blocking and click OK
  7. Add String “.*autodiscover\.json.*\@.*Powershell.*” (excluding quotes) and click OK
  8. Expand the rule and select the rule with the Pattern “.*autodiscover\.json.*\@.*Powershell.*” and click Edit under Conditions
  9. Change the condition input from {URL} to {REQUEST_URI}

Since threat actors can also gain access to PowerShell remoting on exposed and vulnerable Exchange servers for remote code execution by exploiting CVE-2022-41082, Microsoft also advises admins to block the following Remote PowerShell ports to hinder the attacks:

  • HTTP: 5985
  • HTTPS: 5986

GTSC said that administrators who want to check if their Exchange servers have already been compromised can run the following PowerShell command to scan IIS log files for indicators of compromise:

Get-ChildItem -Recurse -Path -Filter "*.log" | Select-String -Pattern 'powershell.*autodiscover\.json.*\@.*200'

The Most Significant Risk: "Not Applying The Patches on Every Asset"

These vulnerabilities, coined as ProxyNotShell by threat intelligence analyst Kevin Beaumont, should “be taken seriously,” Matthieu Garin, partner at French cybersecurity consulting firm Wavestone, claimed on LinkedIn. “And in a long term, maybe you should consider stopping with on-premises Exchange.”

Starting a new thread for two Exchange zero days being exploited in the wild.

Calling it ProxyNotShell for details explained within, aka CVE-2022-41040 and CVE-2022-41082. #ProxyNotShell pic.twitter.com/Mzjm1qXtEA

— Kevin Beaumont (@GossiTheDog) September 30, 2022

“It’s critical for enterprises to take the first step of patching this Exchange server vulnerability, but it can’t stop there,” Greg Fitzgerald, co-founder of Sevco Security, an asset attack surface management platform provider, told Infosecurity Magazine.

“The most significant risk for enterprises isn’t the speed at which they are applying critical patches; it comes from not applying the patches on every asset. The simple fact is that most organizations fail to maintain an up-to-date and accurate IT asset inventory, and the most fastidious approach to patch management cannot ensure that all enterprise assets are accounted for. You can’t patch something if you don’t know it’s there, and attackers have figured out that the easiest path to accessing your network and your data is often through unknown or abandoned IT assets,” Fitzgerald added.

Around 5% of all Windows servers are uncovered by enterprise patch management programs, revealed Sevco’s State of the Cybersecurity Attack Surface Report earlier this month. “So even when companies patch this, there’s a good chance they’ll miss vulnerable servers,” they noted.

Additionally, the report found that 19% of Windows servers are missing endpoint protection.

Text extracted automatically; images, tables and formatting may be missing. Original: https://www.infosecurity-magazine.com/news/microsoft-confirms-zeroday-exchange/