On Thursday, September 29th, Microsoft publicly disclosed two unpatched vulnerabilities impacting on-premises Microsoft Exchange servers that were capable of granting remote access to threat actors. These zero-day vulnerabilities have been identified as CVE-2022-41040, which is a Server-Side Request Forgery (SSRF) vulnerability, and CVE-2022-41082, which allows remote code execution (RCE) when PowerShell is accessible to the attacker.

For the attack to be successful, access to an authenticated account in the environment is required, which limits the target surface. However, if the conditioned access is leveraged, the persistent admission allowed by the remote access could have devastating consequences.

With authenticated access, exploit CVE-2022-41040 allows the attacker to string the two vulnerabilities together in a “chain of compromise,” which can inevitably lead to the threat actor remotely triggering a custom, arbitrary code. This code could result in the deployment of additional malware, backdoors, lateral movement, and other nefarious actions.

Currently, there is no patch to remediate the issue. However, enterprise owners are encouraged to perform the following actions on their IIS Manager:

  • Open the IIS Manager.
  • Expand the default website.
  • 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 the following string: .*autodiscover\.json.*\@.*Powershell.*
  • Click “OK.”
  • Expand the rule, select the rule with the above string, and click “Edit” under Conditions.
  • Change the condition input from {URL} to {REQUEST_URI}.

Ensure the following two Remote Powershell Ports are blocked:

  • HTTP: 5985
  • HTTPS: 5986

Lastly, to validate if Exchange servers have already been compromised, run the following Powershell command to scan IIS logs for the known indicators of compromise:

  • Get-ChildItem -Recurse -Path -Filter “*.log”
  • Select-String -Pattern ‘powershell.*autodiscover\.json.*\@.*200’

BinaryNetworks and our sister company BinaryLab will continue to monitor this situation for developments.

If you have any questions about the information above, please contact your BinaryNetworks representative at 301-337-3100.

About the author

Sergio Orellana
Sergio OrellanaChief Cybersecurity Officer

Sergio Orellana is the Chief Cybersecurity Officer of BinaryLab and leads the creation and delivery of enterprise-class cybersecurity and compliance solutions. He is a breach response expert with more than a decade of experience working on large and complex security incidents and investigations.

Learn more about Sergio here.