Skip to content
AdminKit

Is port 3389 (RDP) exposed to the internet, and is that a ransomware risk?

Port 3389 is the default port for Microsoft's Remote Desktop Protocol (RDP), giving a remote user an interactive desktop session. AdminKit's port-check tool automates nine exposure checks; 3389 isn't on that list, so this guide shows how to confirm your exposure, which a joint CISA/FBI advisory names a common ransomware infection vector.

By AdminKit team, Netbase JSC · Updated

Key takeaways

  • TCP 3389 is the default listener for Windows Remote Desktop Services; current Windows versions can also use UDP 3389 for the same sessions.
  • An exposed RDP port is a login prompt for a full Windows desktop. CISA and the FBI list RDP among the most common ransomware entry points.
  • Network Level Authentication makes the client prove its credentials before a session starts. That shrinks what an unauthenticated attacker can reach, but it does not make internet exposure safe.
  • AdminKit’s port check does not test 3389. Use the manual check below, then move RDP behind a VPN or Remote Desktop Gateway with multi-factor authentication.

Why is direct RDP exposure a top ransomware vector?

RDP as a protocol, which Microsoft’s own documentation describes as encrypting and channeling keyboard, mouse and display data between a client and a Terminal Server, supports TLS encryption and authentication, and used inside a trusted network or behind a VPN it’s a normal remote-access tool. The risk is specifically about internet-facing exposure: the joint CISA & FBI advisory AA22-137A on weak security controls routinely exploited for initial access states plainly that RDP is “one of the most common infection vector[s] for ransomware,” alongside Telnet and other services the same advisory names as high-risk to expose directly.

How do attackers exploit an open port 3389?

Mass internet-scanning tools let an attacker find every IP address with port 3389 open within minutes. From there, automated credential-stuffing (reusing passwords leaked from unrelated breaches) or brute-force attempts run against whatever accounts can be enumerated — often using already-compromised credentials bought from criminal marketplaces rather than guessing blind. A successful login gives an attacker an interactive desktop session with whatever privileges that account holds, commonly used to disable security tooling, harvest more credentials, and move laterally before deploying ransomware on systems worth encrypting.

How do you check whether port 3389 is reachable?

AdminKit’s open ports check checks a fixed nine-port list, and port 3389 isn’t on it — confirm your current public IP first with what is my IP, then test the port manually from a machine outside your network with nc -vz -w 3 203.0.113.5 3389. A connection that succeeds means the port is reachable; “connection refused” or a timeout means it’s closed or filtered.

What is usually listening on port 3389?

On almost every network, the answer is a Windows machine with Remote Desktop turned on. Microsoft documents TCP 3389 as the default RDP listening port, and the port is stored per listener in the registry, so a host can be moved to another port without changing what it is. The device families you will meet most often:

ListenerWhere it turns upNotes
Windows Pro, Enterprise or Education with Remote Desktop enabledOffice PCs and home machines used for remote workMicrosoft’s Remote Desktop help notes that Windows Home cannot host incoming Remote Desktop sessions.
Windows Server with Remote Desktop ServicesSmall-business servers, terminal servers, cloud VMsCloud images often enable RDP by default so the first login works.
xrdp on LinuxLab machines and Linux desktops reached from Windows clientsOpen-source RDP server; same port, same exposure question.
Hypervisor and appliance consolesSome virtualization hosts and vendor appliancesCheck the vendor’s docs for which service owns the port.

A port forward on the router (TCP 3389 to an internal PC) is the most common way a desktop ends up on the internet. A cloud VM with a public IP and a permissive security group is the second.

How does RDP decide who gets in?

RDP has three security layers a server can negotiate, and which one is in use changes what an attacker sees before logging in.

Security layerWhat happens before loginWhat it means when exposed
Standard RDP security (legacy)The server builds the full logon screen first; credentials are entered inside the sessionAn unauthenticated visitor already holds a session on the server and sees a Windows logon screen.
TLSThe connection is encrypted, then the logon screen is drawnProtects the password in transit, but the session still exists before anyone has proved who they are.
Network Level Authentication (CredSSP)The client must authenticate before the server creates a sessionFewer resources and less code reachable without credentials. Strongly preferred, still not a substitute for keeping 3389 private.

Our glossary entry on RDP Network Level Authentication has a shorter summary of the NLA model.

The practical difference showed up in CVE-2019-0708 (“BlueKeep”), a remote code execution flaw in Remote Desktop Services that an unauthenticated attacker could trigger by sending crafted requests. It affected older Windows releases such as Windows 7 and Windows Server 2008 R2, and it is listed in CISA’s Known Exploited Vulnerabilities catalog. With NLA on, an attacker first needed valid credentials, which is why the vendor guidance linked from the NVD entry listed NLA as a partial mitigation while patches rolled out. The lesson for an exposed port is that the protocol has had pre-login bugs; an internet-facing listener is exposed to the next one on the day it is published.

How do you read the result of your own check?

Because the AdminKit port check only tests its nine-port list, your result for 3389 comes from the manual test above. An RDP listener does not send a banner when a TCP connection opens; it waits for the client to speak first. So nc will only tell you whether the TCP handshake completed. Example output, with a documentation address in place of a real IP:

$ nc -vz -w 3 203.0.113.5 3389
Connection to 203.0.113.5 3389 port [tcp/ms-wbt-server] succeeded!
Result from outside your networkMeaning
succeededSomething on your public IP accepts TCP on 3389. Assume it is RDP until you find the device behind it.
Connection refusedThe router or host answered and rejected the connection. Nothing is forwarded on that port.
TimeoutA firewall drops the traffic, or nothing answers. Treat as closed from that vantage point.

Run the test from a different network, such as a phone hotspot. Testing your own public IP from inside the LAN often gives a misleading answer because many routers do not support hairpin connections.

How do you confirm the listener on the Windows host?

On the machine you suspect, two PowerShell commands answer “is RDP listening, and on which port?”:

PS> Get-NetTCPConnection -LocalPort 3389 -State Listen
PS> Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name PortNumber

The first lists the listening socket; the second shows the configured port, which matters if someone moved RDP to a non-default port. Moving the port is not a fix. It only changes which number the scanners find. Run both commands in an elevated PowerShell window on every machine you suspect.

If the host has been exposed for any length of time, check the Security event log for failed logons (event ID 4625) with source addresses outside your network. A steady stream of them confirms the port has been found; a successful logon (event 4624) from an address you do not recognise is an incident, not a configuration task.

Does closing TCP 3389 close RDP completely?

Not always. Recent Windows versions can carry an RDP session over UDP on the same port number for better performance on lossy links, so a router rule that forwards “3389, TCP and UDP” exposes both. Remove the whole rule rather than only the TCP half. The TCP check is still the one that matters for the login prompt: the UDP transport is used alongside an established TCP connection, not instead of it.

The other path to watch is a Remote Desktop Gateway. A gateway publishes RDP over HTTPS on port 443, so a scan of 3389 comes back closed while users still connect from outside. That is the intended design and a reasonable one, provided the gateway itself requires multi-factor authentication and is patched like any other internet-facing web service. If you inherited a network, check whether a gateway exists before concluding that nobody can reach the desktops from the internet. RDP and VNC exposed to the internet compares the gateway, VPN and access-broker options in more depth.

How to fix it

  • Put remote desktop access behind a VPN or a zero-trust access broker rather than forwarding port 3389 directly — the login prompt itself should never be reachable from the open internet.
  • Require multi-factor authentication on the remote-access layer, which closes the credential-reuse risk even if a password leaks elsewhere.
  • If RDP absolutely must be reachable directly, restrict it to specific source IP ranges and enable Network Level Authentication — though a tunnel remains the stronger fix.

The same direct-exposure risk applies to VNC, RDP’s cross-platform counterpart, which belongs behind the same VPN or access broker rather than forwarded on its own default port.

See RDP and VNC exposed to the internet for the full comparison with VNC and more on the zero-trust alternative.

For a small office, the network hygiene checklist for exposed devices puts this RDP check in order alongside the router, file sharing and cameras.

Defensive use only

Every check this page links to is for assets you own or are explicitly authorized to test. Never scan, probe, or attempt to connect to a network or device you don’t control — AdminKit’s active checks only ever run against the IP making the request or an asset you’ve verified ownership of. See our Disclaimer and Acceptable Use Policy for the full terms.

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

Does AdminKit's port-check tool scan port 3389?

No. The tool checks a fixed list of nine specific TCP ports (23, 554, 1883, 8883, 502, 7547, 80, 443, 8080) chosen for how often they turn up misconfigured on home and small-office devices — see the port-check tool page for the current list. 3389 isn't on that list, so confirm your own exposure with the manual check below.

Is RDP itself insecure?

No — it supports encryption and authentication and is a normal tool inside a trusted network or behind a VPN. The risk this page addresses is specifically direct internet exposure, which turns its login prompt into a target reachable by anyone, anywhere.

What does a real advisory actually say?

The joint CISA & FBI advisory AA22-137A states that Remote Desktop Protocol is "one of the most common infection vector[s] for ransomware," and groups it with Telnet and other services that shouldn't be exposed directly to the internet.

How do attackers find exposed RDP so quickly?

Mass internet-scanning tools let an attacker find every IP address with port 3389 open within minutes, after which automated credential-stuffing or brute-force attempts run against whatever accounts can be enumerated.

What's the recommended alternative to a direct port forward?

A VPN or zero-trust access broker in front of RDP, with multi-factor authentication on that access layer, so the RDP login prompt itself is never directly reachable from the open internet.

Want AdminKit to watch this for you?

Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.

Huy Nguyen (David), Founder and CEO of Netbase JSC

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.