Disable MSMQ service and block TCP port 1801 to mitigate remote code execution vulnerabilities
This Automox Worklet™ mitigates Microsoft Message Queuing (MSMQ) remote code execution vulnerabilities by disabling the MSMQ service and creating a Windows Firewall rule that blocks TCP port 1801. Multiple CVEs affect MSMQ across Windows Server and Windows 8 and later, allowing attackers to execute arbitrary code without authentication.
The Worklet implements Microsoft's recommended mitigation strategy. Rather than waiting for patches, the Worklet takes immediate action to reduce exposure by disabling the vulnerable service entirely and blocking inbound traffic on the network port used for MSMQ exploitation.
Message Queuing is commonly installed on Windows Server systems for distributed application communication. If your infrastructure does not require this service, the Worklet identifies and remediates the exposure across your endpoint fleet.
MSMQ RCE vulnerabilities represent a critical security risk because they allow attackers to compromise endpoints and servers remotely without any user interaction or credentials. An attacker only needs to send a malformed message to TCP port 1801 to gain complete control of the affected system.
Delaying mitigation exposes your endpoints to worm propagation, lateral movement attacks, and ransomware campaigns that specifically target these vulnerabilities. Many security frameworks including CIS Benchmarks recommend disabling Message Queuing service if it is not required for your business operations.
By deploying this Worklet across your infrastructure, you eliminate the attack surface for MSMQ-based threats while patches are being tested and deployed. The dual approach of service disablement plus firewall blocking provides defense in depth.
Evaluation phase: Checks whether the MSMQ service exists, is stopped, and has startup type set to Disabled. Also verifies there is no active network traffic on TCP port 1801 and confirms a Windows Firewall block rule exists for that port. Any deviation from these three compliance checks flags the endpoint as non-compliant.
Remediation phase: Stops the running MSMQ service and sets its startup type to Disabled using PowerShell commands. Then creates or enables a Windows Firewall inbound rule named "AUTOMOX WORKLET: Block TCP 1801" to block TCP port 1801, preventing any inbound connection attempts to the MSMQ listener.
Windows 8 or later, or Windows Server 2008 and later
PowerShell 5.0 or higher
Local administrator privileges to disable services and create firewall rules
No active applications dependent on MSMQ (review business requirements before deployment)
Windows Firewall enabled (for the block rule to function)
After the Worklet completes remediation successfully, the MSMQ service will be in a stopped state and configured to never start automatically. The Windows Firewall will contain an inbound block rule preventing any TCP traffic to port 1801, eliminating the RCE attack vector.
Endpoints will show as compliant in subsequent evaluations. To verify mitigation, check that the MSMQ service shows as Disabled in Services, and confirm the firewall rule exists using Get-NetFirewallRule -DisplayName "AUTOMOX WORKLET: Block TCP 1801". Your endpoints are now protected against the documented MSMQ CVE family including CVE-2023-36910, CVE-2023-36581, and related vulnerabilities until official Microsoft patches are applied and tested.
Run this Worklet on a pilot Windows endpoint and review evaluation output for mitigate message queuing rce vulnerabilities.
Confirm Automox activity logs show successful completion and exit code 0.
Verify endpoint state using checks aligned to evaluation script logic, such as Write-Error, Write-Verbose, Get-Service.
Validate remediation effects from script operations such as Write-Error, Write-Verbose, Get-Service, then rerun evaluation for compliance.


By submitting this form you agree to our Master Services Agreement and Privacy Policy.
Already have an account? Log in
Consider Worklets your easy button
A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

AUTOMOX + WORKLETS™
Uncover new possibilities with simple, powerful automation.
By submitting this form you agree to our Master Services Agreement and Privacy Policy