Skip to content
Misconfiguration Write-up Intermediate

Microsoft Defender for Cloud Management Port Exposure Confusion

Microsoft Defender for Cloud failed to flag Azure virtual machines with management ports (SSH, RDP, WinRM) exposed to the internet when the Network Security Group rule used the IPv4 range [redacted]/0 instead of the literal 'Any' alias. An attacker could exploit this to maintain undetected access to a compromised VM, or an administrator could accidentally leave ports open without warning.

Aaron Sawitsky Follow

Published on rapid7.com

Prior to March 9, 2023, Microsoft Defender for Cloud incorrectly marked some Azure virtual machines as having secured management ports including SSH (port 22/TCP), RDP (port 3389/TCP) and WINRM (port 5985/TCP), when in fact one or more of these ports were exposed to the internet. This occured when the Network Security…

Rapid7, on rapid7.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a logic flaw in Defender for Cloud's network security group rule evaluation that treated the 'Any' alias and the [redacted]/0 CIDR as different, only flagging the former as exposing management ports.

Impact

Attackers who have already compromised a VM could use this to avoid detection and maintain access, and administrators could accidentally expose management ports without being alerted; the IPv6 equivalent (::/0) remained unfixed at the time of writing.

What the attacker needed

Azure VM with NSG rule using [redacted]/0 or ::/0; Management port (SSH, RDP, WinRM) exposed; Attacker already has access to the VM

The fix

Microsoft fixed the issue for IPv4 [redacted]/0 on March 9, 2023, but the IPv6 ::/0 variant was still unfixed; users should review and restrict such rules and audit their cloud infrastructure.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Cloud security tools check for common mistakes, like leaving remote login ports open to the whole internet. Here, the tool only recognised one way of writing 'allow everyone' (the word 'Any') but missed another way (the numeric range [redacted]/0). So a machine could be wide open while the tool said it was safe.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.