RDP and VNC exposed to the internet: a leading ransomware entry vector
Remote Desktop Protocol (port 3389) and VNC (port 5900) both give a remote user an interactive desktop session, and both are flagged by U.S. and international cybersecurity agencies as common ransomware entry points. Neither port is on AdminKit's port-check tool's nine-port list, so this guide shows how to check whether yours is reachable from the internet.
By AdminKit team, Netbase JSC · Updated
Key takeaways
- RDP (3389/TCP) and VNC (5900/TCP and up) both hand a remote user a full desktop. Reaching the login prompt from the internet is the risk, not the protocols themselves.
- A joint CISA/FBI advisory calls RDP “one of the most common infection vector[s] for ransomware” and lists RDP among high-risk services that should not face the internet.
- VNC’s standard password check is weak by its own specification: RFC 6143 says VNC Authentication “is known to be cryptographically weak and is not intended for use on untrusted networks”.
- Login prompts are not the only target. CVE-2019-0708 let an unauthenticated attacker run code over RDP, so patching and hiding the port both matter.
- Check 3389 and 5900 by hand from outside your network, remove the port forward, and put remote access behind a VPN, gateway or access broker with MFA.
Why do agencies single out exposed RDP and VNC?
Remote Desktop Protocol and VNC (Virtual Network Computing) both exist to do the same basic thing: give a remote user a full interactive desktop session on another machine. That’s exactly what makes a directly internet-reachable instance so dangerous — unlike a web application with a narrow attack surface, a working remote-desktop login is effectively “you’re in” the moment an attacker has valid (or valid-enough) credentials. The joint CISA/FBI advisory on weak security controls routinely exploited for initial access states this directly: “with Remote Desktop Protocol (RDP) as one of the most common infection vector[s] for ransomware, MFA is a critical tool in mitigating malicious cyber activity.” The same advisory groups RDP alongside Telnet, SMB, and NetBIOS as protocols it labels explicitly as “high-risk services” that should not be left reachable from the open internet.
How do RDP and VNC compare?
The two are often mentioned together, but they are built differently, and that changes what “exposed” means for each.
| RDP | VNC (RFB protocol) | |
|---|---|---|
| Default port | 3389/TCP (also UDP on newer versions) | 5900/TCP, plus 5900+N for display N |
| Typical platform | Windows, built in | Cross-platform; many server and viewer implementations |
| Authentication | Windows accounts; Network Level Authentication asks for credentials before a session is created | Depends on the security type: none, the weak VNC password check, or vendor extensions |
| Encryption | TLS is supported and used by current Windows versions | Not part of the base RFC 6143 security types; the RFC suggests IPsec or SSH |
| What a stolen login gives | A Windows session with that account’s rights, often domain-joined | Control of whatever desktop is on the screen, often an already logged-in user |
For VNC, RFC 6143 section 7.2 defines only two standard security types: “None” and “VNC Authentication”. The second encrypts a challenge with DES using the password as the key, and “the password is truncated to eight characters.” The RFC’s own verdict follows straight after: the method “is known to be cryptographically weak and is not intended for use on untrusted networks.” A VNC server that offers security type None on a public address needs no password guessing at all. The port 5900 guide explains how to see which security types your own server offers.
How does an attack through an open RDP port unfold?
The path from “RDP port open” to “ransomware deployed” is well documented across dozens of advisories, and it typically runs through a few predictable stages:
- Discovery. Automated internet-wide scanning tools (the same category of tooling security researchers use defensively) find every IP address with port 3389 or 5900 responding in a matter of minutes — an attacker doesn’t need to target your organization specifically to find your exposed port.
- Credential attack. Rather than guessing blindly, attackers commonly use credentials leaked from unrelated breaches (credential stuffing), slow password-spraying across many accounts to avoid lockout thresholds, or outright buy working credentials from criminal marketplaces.
- Initial foothold. A successful login hands the attacker an interactive session with whatever access that account has — often enough to start harvesting more credentials and mapping the network immediately.
- Lateral movement and escalation. CISA’s advisory notes the risk compounds from there: a single compromised account on a flat network can become a path to file servers, backup systems, and domain controllers.
- Ransomware deployment, once the attacker has reached systems they judge valuable enough to encrypt and hold for ransom.
Why is a pre-authentication bug worse than a weak password?
Strong passwords and MFA defend the login. They do nothing if the service can be attacked before anyone logs in. CVE-2019-0708, widely known as BlueKeep, is the standard example: NIST’s description says remote code execution was possible “when an unauthenticated attacker connects to the target system using RDP and sends specially crafted requests.” An internet-facing RDP service on an unpatched system was exposed no matter how good its passwords were.
That changes how to think about a forwarded port. A reachable service is exposed both to the credentials you issue and to every flaw in the code that handles the connection before authentication. Network Level Authentication helps here, because it requires credentials before a full session is set up, but the durable answer is the same as for password attacks: patch promptly, and do not let the service be the first thing an internet scanner reaches.
Why this is specifically a direct exposure problem
None of this requires a flaw in RDP or VNC’s cryptography — it exploits the fact that the login prompt itself is reachable by anyone on the internet, turning authentication into the only line of defense against an attacker with unlimited attempts and, often, already-leaked passwords to try. An RDP or VNC session reached through an authenticated VPN or access broker has the same functionality without that exposure, because the login prompt is never visible to anyone who hasn’t already proven they belong on the network — Microsoft’s own guidance on remote desktop adoption recommends exactly this gateway pattern instead of direct exposure.
How do I check and fix my own exposure?
The check takes a minute from any machine outside your network, such as a phone hotspot or a cloud shell you control. Test only your own public address (the example uses a documentation address):
$ nc -vz -w 3 203.0.113.5 3389
Connection to 203.0.113.5 3389 port [tcp/ms-wbt-server] succeeded!
$ nc -vz -w 3 203.0.113.5 5900
nc: connect to 203.0.113.5 port 5900 (tcp) timed out: Operation now in progress
$ printf '' | nc -w 3 203.0.113.5 5901 | head -c 12
RFB 003.008
| Result | Meaning | Next step |
|---|---|---|
succeeded on 3389 | An RDP listener is reachable from the internet | Find the forward or firewall rule and remove it |
A banner starting RFB on 5900 or 590N | A VNC server is reachable and has announced its protocol version | Remove the forward; check which security types it offers |
timed out or refused | Nothing reachable on that port from outside | Record it; repeat after router or ISP changes |
Remember the 5900+N rule: a VNC server for display 1 listens on 5901, display 2 on 5902, and so on, so test a small range rather than 5900 alone. Then work through the steps below.
- Confirm your public IP with AdminKit’s what is my IP tool.
- Test whether RDP (3389) or VNC (5900) responds from outside. AdminKit’s port check tool’s fixed nine-port list doesn’t cover either port, so run a manual, TCP-aware check such as
nc -vz your-public-ip 3389from outside your network, against systems you own or are authorized to test only — see is port 3389 (RDP) exposed and is port 5900 (VNC) exposed for the protocol-specific version of this check. - If either responds and wasn’t meant to be public, remove the direct port forward on your router or firewall immediately — this is the single highest-leverage fix, independent of password strength.
- Require multi-factor authentication on any remote-access path that remains, since CISA’s advisory names MFA specifically as a mitigating control for this exact risk.
- Route remote access through a VPN or managed access broker instead of a direct forward, so the protocol’s login prompt is never the first thing an internet scanner finds. For RDP specifically, how to harden RDP (port 3389) exposure covers the configuration work beyond closing the port — Network Level Authentication, account lockout, and Restricted Admin mode.
A single clean port-check result also isn’t permanent if your network’s public IP changes or is shared — see our CGNAT guide for how that affects whether a check from last week still describes your situation today.
Which remote-access pattern should replace the port forward?
Removing the forward is the fix; the question is what people use instead. Each of these keeps the desktop protocol off the open internet:
| Pattern | How it works | Good fit |
|---|---|---|
| VPN, then RDP or VNC | Users join the private network first; the desktop port is only reachable inside it | Small offices with a firewall that supports VPN |
| Remote Desktop Gateway | RDP is wrapped in HTTPS through a gateway that authenticates first, as Microsoft’s remote desktop guidance describes | Windows estates with several hosts |
| SSH tunnel for VNC | The viewer connects to a local port forwarded over SSH, which RFC 6143 names as one way to add security | Single admin access to Linux or embedded hosts |
| Outbound-only access broker | The site connects out to a broker; users reach sessions through it with MFA and recording | Vendors and contractors reaching OT or customer sites |
Whichever you pick, require MFA at that layer, keep the desktop hosts patched, and re-run the outside check afterwards to confirm 3389 and 5900 no longer answer.
Where AdminKit fits
For a small office or home-office setup where someone genuinely needs remote desktop access to a work machine, the fix isn’t “never use RDP” — it’s “never expose RDP’s login prompt directly.” OT Remote Access, a Netbase custom engagement, is built around exactly this pattern: outbound-only connections and recorded sessions, without a forwarded port for an attacker to find — talk to our team about it. See our small office security page for the free checks and services for a small office.
This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.
Frequently asked questions
Is RDP itself insecure, or just exposing it directly?
RDP as a protocol supports encryption and authentication, and used inside a trusted network or behind a VPN it's a normal, reasonable remote-access tool. The risk this guide addresses is specifically direct internet exposure — a port reachable by anyone, anywhere, which turns RDP's login prompt into a target for credential stuffing, brute-force, and password-spraying attacks at scale.
What does a real advisory actually say about RDP and ransomware?
A joint U.S. advisory on initial access techniques states plainly that Remote Desktop Protocol is "one of the most common infection vector[s] for ransomware," and CISA's broader guidance on internet-facing weaknesses lists RDP, Telnet, and SMB together as high-risk services that should not be exposed directly to the web.
How do attackers actually find and exploit an exposed RDP or VNC port?
Mass internet scanning tools let attackers find every IP address with port 3389 or 5900 open in minutes, after which they run automated credential-stuffing (reusing passwords leaked from other breaches) or brute-force attempts against whatever accounts they can enumerate, often buying already-compromised credentials from criminal marketplaces rather than guessing from scratch.
What happens after an attacker gets in through RDP?
A compromised RDP session gives an attacker an interactive foothold with whatever privileges that account holds — commonly used to harvest more credentials, disable security tooling, move laterally to file servers or domain controllers, and ultimately deploy ransomware once they've reached systems worth encrypting.
What's the alternative if I genuinely need remote access?
Put remote desktop access behind a VPN or a zero-trust access broker rather than forwarding the RDP/VNC port directly, so the login prompt itself is never reachable from the open internet — only an already-authenticated tunnel can reach it. Multi-factor authentication on the remote-access layer closes the credential-reuse risk even further.
How do I check if my own network has RDP or VNC open to the internet?
AdminKit's [port check](/tools/port-check/) tool's fixed nine-port list doesn't include 3389 or 5900 — see the port-check tool page for the current list. Confirm your public IP with the My IP tool, then test each port manually from outside your network with a TCP-aware check such as `nc -vz your-public-ip 3389` — if either responds and you didn't intend direct public access, that's the exposure to fix first.
Sources
- CISA & FBI — Weak Security Controls and Practices Routinely Exploited for Initial Access (AA22-137A)
- Microsoft Security Blog — Security guidance for remote desktop adoption
- RFC 6143 — The Remote Framebuffer Protocol (VNC)
- NIST NVD — CVE-2019-0708 (Remote Desktop Services remote code execution, "BlueKeep")
Want AdminKit to watch this for you?
Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.
Talk to an expert
Huy Nguyen (David), Founder & CEO, Netbase JSC
Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.