Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Microsoft Exchange/Office/365 » Workaround for a zero-day vulnerability on Microsoft Exchange Server
  • Delete Edit or Revert a Snapshot on vSphere
    Manage VMware Snapshots: Delete or Edit or Revert a Snapshot Virtualization
  • EnableDisableTPMAutoProv
    Waiting for TPM Auto Provisioning: How to Enable or Disable TPM Auto-provisioning Windows
  • SystemUtilization
    Delivering System Utilization Report on a Linux based OS Linux
  • banner
    How to Secure your API key in Postman Password Manager
  • Hyper V Virtual Switch
    How to Create Hyper-V Virtual Switch Network | Monitoring
  • diagnostic6
    How to enable and use Diagnostic Data Viewer on Windows Windows
  • feature image
    How to Configure Advanced PAM in Linux Linux
  • Convert MP4 to MP3
    2 Free Ways to Convert MP4 to MP3 Reviews

Workaround for a zero-day vulnerability on Microsoft Exchange Server

Posted on 01/10/202210/04/2023 Christian By Christian No Comments on Workaround for a zero-day vulnerability on Microsoft Exchange Server
exchange 2016 1

Some security researchers have reported that attackers are currently exploiting two zero-day vulnerabilities in Microsoft Exchange Server. Microsoft has acknowledged and is currently investigating two reported zero-day vulnerabilities affecting Microsoft Exchange Server 2013, 2016, and 2019. The first to be reported is CVE-2022-41040 which is a Server-Side Request Forgery (SSRF) vulnerability, and the other one is CVE-2022-41082, which allows Remote Code Execution (RCE) when PowerShell is accessible to the attacker.  In this article, you will learn how to apply the workaround for a zero-day vulnerability on Microsoft Exchange Server.

What is Micrsoft Exchange?

Microsoft Exchange Server is a mail server and calendaring server developed by Microsoft and runs on Windows Server operating systems. It is worth noting that Exchange Server has integrated intelligent storage and search functionalities. Basically, Microsoft designed Exchange Server to give users access to the messaging platform from mobile devices, desktops, and web-based systems. With the integrated telephone functions, Exchange Server also supports voice messages.

CVE-2022-41040 and CVE-2022-41082

Note:  It has been reported by Microsoft that CVE-2022-41040 can enable an authenticated attacker to remotely trigger CVE-2022-41082. But authenticated access to the vulnerable Exchange Server is necessary to successfully exploit either vulnerability.

You can use the following PowerShell command to check whether servers are already compromised, GTSC released this guideline as a tool to scan IIS log files (stored by default in the %SystemDrive%\inetpub\logs\LogFiles folder).

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

Alternatively, based on the exploit signature, GTSC built a tool to search with a much shorter time needed than using Powershell. Here is the download link.

Workaround to contain CVE-2022-41040 and CVE-2022-41082

GTSC’s direct incident response process recorded more than 1 organization being the victim of an attack campaign exploiting this 0-day vulnerability. In addition, we are also concerned that there may be many other organizations that have been exploited but have not been discovered. While waiting for the official patch from the company, GTSC provides a temporary remedy to reduce the vulnerability of attacks by adding a rule to block requests with indicators of attack through the URL Rewrite Rule module on the IIS server.

Microsoft Exchange Online is not affected. It has detections and mitigations to protect customers. As always, Microsoft is monitoring these detections for malicious activity and responds to protect customers.

Also on the Microsoft website, the same Microsoft Exchange Server mitigation steps were mentioned as shown below but with three different approaches. They advised customers to review and apply only one of the recommended mitigation steps.

Add a blocking rule in “IIS Manager -> Default Web Site -> URL Rewrite -> Actions” to block the known attack patterns. 

Option 1

For customers who have the Exchange Server Emergency Mitigation Service (EMS) enabled, Microsoft released the URL Rewrite mitigation for Exchange Server 2016 and Exchange Server 2019. The mitigation will be enabled automatically. Please see this blog post for more information on this service and how to check active mitigations.

Option 2

Microsoft created the following script for the URL Rewrite mitigation steps: https://aka.ms/EOMTv2. You can download the script from this link. Kindly run the script after downloading with the following command.

.\EOMTv2.ps1

What does the EOM Mitigation Tool v2 script do?

The Exchange On-premises Mitigation Tool v2 script (EOMTv2.ps1) can be used to mitigate CVE-2022-41040. This script does the following:

  • Check for the latest version of EOMTv2.ps1 and download it.
  • Mitigate against current known attacks using CVE-2022-41040 via a URL Rewrite configuration

The default recommended way of using EOMTv2.ps1. This will apply the URL rewrite mitigation. If the IIS URL rewrite module is not installed, this will also download and install the module.

To roll back EOMTv2 mitigations run the following command below.

.\EOMTv2.ps1 -Rollbackmitigation

Customers are also advised to follow the below instructions and they have been proven to be successful in breaking current attack chains. Please refer to these related articles: URL Rewrite: How to perform redirection from HTTP to HTTPS, how to enable Exploit Protection on Windows using Windows Security App, Microsoft Endpoint Configuration Manager, and Group Policy Editor. How to disable Password Change for all Users Exchange server, how to block the Change Password Feature for All Users, and how to mitigate Yet another Windows print spooler zero-day Vulnerability: Mitigate Windows Print SpoilerZero day Vulnerability.

Option 3

Launch the IIS Manager, and select Default Web Site. In the Feature View, click URL Rewrite as shown below.

image
src: Microsoft

In the Actions pane on the right-hand side, click Add Rule(s)

URLrewrite

Select Request Blocking and click OK.

browsingrequest

Add the string “.*autodiscover\.json.*\@.*Powershell.*” (excluding quotes).
– Then select Regular Expression under Using.
– Select Abort Request under How to block and then click OK.

abortrequestIIS

Expand the rule and select the rule with the pattern .*autodiscover\.json.*\@.*Powershell.* and click Edit under Conditions. 

conditionsIIS

Change the Condition input from {URL} to {REQUEST_URI}

conditioninputIIS

Note: If you MUST change any rule that you have created, it is best to delete and recreate it.

I hope you found this blog post helpful on how to apply the workaround for a zero-day vulnerability on Microsoft Exchange Server. If you have any questions, please let me know in the comment session.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Network | Monitoring Tags:exchange, Exchange Server, Microsoft Windows, Windows Server 2016

Post navigation

Previous Post: How to search Group Policy for a specific Setting in Windows 10 and 11
Next Post: How to work with Windows Performance Toolkit

Related Posts

  • cisco switches 2
    How to disable Spanning-Tree Globally Network | Monitoring
  • Explorer Error
    How to fix an attempt was made to reference a Token that does not exist Network | Monitoring
  • tmutil localsnapshot
    Fix what is taking up my Mac Storage? Delete Snapshots Network | Monitoring
  • descargar jitsi meet 2 700x336 1
    How to setup and configure Jitsi as SoftPhone Network | Monitoring
  • Docker Installation on Ubuntu
    Docker Engine Installation on Ubuntu Network | Monitoring
  • maxresdefault 2 4
    Setup RAID 5 and 10 with MegaRAID Storage Manager on RX300 S5 Network | Monitoring

More Related Articles

cisco switches 2 How to disable Spanning-Tree Globally Network | Monitoring
Explorer Error How to fix an attempt was made to reference a Token that does not exist Network | Monitoring
tmutil localsnapshot Fix what is taking up my Mac Storage? Delete Snapshots Network | Monitoring
descargar jitsi meet 2 700x336 1 How to setup and configure Jitsi as SoftPhone Network | Monitoring
Docker Installation on Ubuntu Docker Engine Installation on Ubuntu Network | Monitoring
maxresdefault 2 4 Setup RAID 5 and 10 with MegaRAID Storage Manager on RX300 S5 Network | Monitoring

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a
 
  • Delete Edit or Revert a Snapshot on vSphere
    Manage VMware Snapshots: Delete or Edit or Revert a Snapshot Virtualization
  • EnableDisableTPMAutoProv
    Waiting for TPM Auto Provisioning: How to Enable or Disable TPM Auto-provisioning Windows
  • SystemUtilization
    Delivering System Utilization Report on a Linux based OS Linux
  • banner
    How to Secure your API key in Postman Password Manager
  • Hyper V Virtual Switch
    How to Create Hyper-V Virtual Switch Network | Monitoring
  • diagnostic6
    How to enable and use Diagnostic Data Viewer on Windows Windows
  • feature image
    How to Configure Advanced PAM in Linux Linux
  • Convert MP4 to MP3
    2 Free Ways to Convert MP4 to MP3 Reviews

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,840 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.