Someone Exposed RDP to the Internet?!

Okay — deep breath. Remote Desktop (port 3389) open to the whole internet is one of those "wait, how did this happen" findings, and the clock is already running. The good news: the first moves are straightforward if you do them in the right order. Below is exactly how we'd work it — get it off the internet, figure out whether anyone actually got in, and don't guess when you can just check the logs.

What To Do, In Order
  • Take it off the internet — without pulling the box offline
  • Snapshot and preserve the logs before you touch anything
  • Read the logs for who actually logged in
  • Hunt for RDP sessions you can't account for
  • Know when it's a recovery, not a cleanup
Back to Attack Surface Monitoring Guide

Discovering Exposed RDP Before Attackers Do

The most dangerous exposed RDP instances are the ones you don't know about. Shadow IT, cloud misconfigurations, and forgotten test environments regularly expose port 3389 without anyone on the security team being aware.

External Attack Surface Management (EASM) takes an outside-in approach — scanning your IP ranges and domains the same way an attacker would, continuously discovering exposed services including RDP. Unlike one-time audits, EASM provides ongoing visibility into what's reachable from the internet.

Detection Methods for Exposed RDP
  • Port scanning: Regular scans of your IP ranges for open port 3389 (and non-standard RDP ports)
  • Service banner analysis: Identifying RDP services even on non-standard ports
  • Configuration drift monitoring: Alerting when a previously closed port opens — a key indicator of misconfiguration
  • Asset inventory correlation: Flagging RDP on systems where it shouldn't exist

The critical advantage of continuous monitoring over periodic assessments is time to detection. An RDP service exposed by a firewall change on Tuesday gets discovered by automated scanners within minutes — waiting until the next quarterly audit means months of undetected exposure.

Why Exposed RDP Is Critical

Instant P1 Finding

RDP exposed to the internet without VPN, allowlist, or MFA gateway is an automatic P1. No scoring required. This finding demands action within 72 hours maximum—preferably within hours.

RDP is the most commonly exploited remote access protocol in enterprise breaches. Here's why:

  • Credential attacks work: Brute force and credential stuffing against RDP succeed constantly because users reuse passwords
  • Known vulnerabilities: BlueKeep (CVE-2019-0708), DejaBlue, and other RDP vulnerabilities enable unauthenticated remote code execution
  • Ransomware entry point: Compromised RDP access is among the most common initial access vectors for ransomware attacks
  • No authentication logging by default: Failed login attempts often aren't logged or monitored
Attackers Are Scanning Right Now

Mass internet scanning tools like Shodan, Censys, and attacker-operated botnets continuously scan the entire IPv4 space for open port 3389. Within minutes of exposing RDP, your server will be discovered and targeted.

This isn't theoretical—it's happening 24/7. Every exposed RDP endpoint receives brute-force attempts within hours of exposure.

The Attacker Perspective

Understanding how attackers exploit exposed RDP helps you prioritize your response:

Most Likely, It's Credential Replay — Not a Zero-Day

As long as the box has been getting its Windows updates, the likely play here usually isn't a fancy exploit — it's credential replay. Attackers feed in username/password pairs harvested from years of old breach dumps and let automation grind through the list. Time is entirely on their side: they'll keep trying combinations until one works, and against RDP, one working password is all it takes.

That's exactly why the whole investigation below comes down to a single question — did any of those attempts actually succeed? You answer it from the logs, not from a gut feeling.

Discovery (Minutes)

  • Automated scanners detect new RDP endpoints within minutes to hours
  • RDP access is actively traded on criminal marketplaces at low cost
  • Initial access brokers specialize in harvesting and reselling RDP credentials

Initial Access (Hours to Days)

  • Credential stuffing: Testing leaked username/password combinations
  • Brute force: Automated password guessing (common passwords, variations)
  • Exploit kits: Automated exploitation of unpatched RDP vulnerabilities
  • Purchased credentials: Using credentials from other breaches

Post-Compromise (Hours)

  • Establish persistence (new accounts, scheduled tasks, services)
  • Disable security controls (antivirus, EDR)
  • Lateral movement to other systems
  • Data exfiltration
  • Ransomware deployment
Typical Attack Timeline

A representative attack progression: RDP exposed → first brute-force attempts within minutes to hours → successful login (often via weak or reused password) → ransomware deployment within hours to a day → business discovers encryption the following morning.

Total time from exposure to ransomware: often less than 24 hours.

First Moves (the first few hours)

Work these in order. The goal is to stop the bleeding and keep enough evidence around to answer the only question that matters: did anyone get in?

Step 1: Take It Off the Internet — But Keep the Box Online

Block the Traffic, Don't Pull the Plug

First, take it off the internet by blocking inbound 3389 at the firewall. Do this at the network edge if you can:

  • Perimeter firewall (preferred — blocks before traffic ever reaches the host)
  • Cloud security group / NSG (for cloud workloads)
  • Host-based firewall (Windows Firewall) as a backup layer

Leave the machine running. You'll need it online to investigate whether anyone got in — shutting it down or reimaging it now destroys the volatile evidence and answers nothing. Blocking the port at the firewall already cuts off the attacker; you don't have to take the box down to do it.

Then confirm the block actually took: scan port 3389 from an external IP to verify it no longer responds, check that legitimate internal/VPN access still works, and note the change.

Step 2: Snapshot and Preserve the Logs — Before You Touch Anything

Preserve First, Investigate Second

Before you start poking around, get a backup. If it's a VM, take a snapshot right now — it's the fastest way to freeze the machine's exact state. Otherwise, grab a backup of the system.

Then preserve the event logs off the box while you can. Export the Windows Security log (and the RDP operational logs below) to another location. Logs roll and overwrite themselves — you don't want your own investigation, or the attacker, to age out the exact records you need. Also jot down the time window RDP was exposed, so you know which slice of the logs to focus on.

Step 3: Read the Logs for Successful Logins

Now answer the question. Open the preserved Security log and look at the exposure window for successful remote logins — not just the failures:

  • Event ID 4624, Logon Type 10 — a successful remote interactive (RDP) login. This is the one that tells you someone got in.
  • Event ID 4625 — failed logins. Expect a flood of these from brute-force/credential-replay noise; that alone is normal for an exposed box. It's the 4624s you care about.
  • Event ID 4648 — logons using explicit credentials, which can flag credential reuse.
  • For every successful login, note the account, the timestamp, and the source IP.

Step 4: Hunt for the RDP Sessions

Cross-check the login events against the actual RDP session history so nothing hides in the gaps:

  • Check current and disconnected sessions with query user (a.k.a. quser) and qwinsta.
  • Review the RDP operational logs — RemoteConnectionManager (Event ID 1149, "user authentication succeeded" with the source) and LocalSessionManager (Event IDs 21 / 25, session logon and reconnect).
  • Line up each session's source IP and account with the 4624 events from Step 3 — a session you can see in one log but can't explain in the other is a red flag.
If You Can't Vouch for a Session, Assume the Worst

Walk the successful logins and sessions past the actual owner of the box. Any session you can't validate with them — an unfamiliar account, an unexpected source IP, a login at 3 a.m. nobody remembers — assume the worst and begin a recovery process. Don't try to "clean" a machine you can't prove is clean. Once you know someone got in, rebuild from known-good rather than chasing artifacts.

And once containment is done, loop in the people who need to know — your security team and IT leadership — and keep the timeline you've built in case it's needed for compliance reporting.

Investigation Checklist

After containing the exposure, investigate whether compromise occurred:

Authentication Analysis

  • Review failed login attempts (Event ID 4625) for volume and patterns
  • Check successful logins (Event ID 4624, Logon Type 10) during exposure window
  • Look for logins from unexpected geographic locations or IP ranges
  • Identify any new user accounts created during exposure

System Integrity

  • Check for new scheduled tasks or services
  • Review startup programs and Run keys
  • Look for unauthorized software installations
  • Check for disabled security tools
  • Scan for malware with updated signatures

Lateral Movement Indicators

  • Review authentication logs on domain controllers
  • Check for unusual SMB/RPC connections from the exposed host
  • Look for credential harvesting tools (Mimikatz, etc.)
  • Review network connections for command-and-control patterns
When It's a Recovery, Not a Cleanup

The moment you can't attribute a successful login or session to a real, expected user, stop treating this as a cleanup and start a formal recovery. Escalate to incident response if you find any of:

  • Successful logins from unknown IPs during the exposure window
  • Sessions the owner can't account for
  • New user accounts or group membership changes
  • Evidence of malware or unauthorized tools
  • Signs of lateral movement to other systems
  • Any data exfiltration indicators

Remediation Options

After immediate containment, implement proper remote access controls:

Option 1: VPN-Only Access (Recommended)

Require VPN connection before RDP access is possible:

  • RDP only accessible from internal network or VPN
  • VPN requires MFA for authentication
  • VPN logs provide audit trail of remote access
  • Single point of control for remote access policy

Option 2: Remote Desktop Gateway

Use Windows Remote Desktop Gateway as a secure proxy:

  • RD Gateway terminates HTTPS (443) from internet
  • Proxies RDP connections to internal servers
  • Supports MFA integration
  • Provides centralized logging and policy

Option 3: Zero Trust Network Access (ZTNA)

Modern approach using identity-aware proxies:

  • No direct network access—all connections proxied
  • Continuous authentication and authorization
  • Device posture checking
  • Examples: Cloudflare Access, Zscaler Private Access, Tailscale
MFA Is Non-Negotiable

Any remote access solution must require multi-factor authentication.Passwords alone are not sufficient—they are routinely compromised through phishing, credential stuffing, and breaches.

NLA (Network Level Authentication) alone is NOT MFA. You need a true second factor.

What NOT to Do

  • Don't rely on "security through obscurity"—changing the RDP port from 3389 to another port does not provide security. Attackers scan all ports.
  • Don't use IP allowlists alone—they're helpful but not sufficient as a primary control. IPs can be spoofed or attackers can pivot through allowed IPs.
  • Don't disable NLA—it provides pre-authentication that reduces attack surface, even if it's not a complete solution.

Prevention Controls

Prevent RDP exposure from recurring:

Technical Controls

  • Firewall rules: Explicit deny for 3389 from internet at perimeter
  • Cloud security groups: Default-deny for RDP in all cloud environments
  • Configuration management: Enforce RDP restrictions via Group Policy
  • Attack surface monitoring: Continuous scanning to detect new exposures

Process Controls

  • Change management: Require security review for any firewall changes
  • Provisioning templates: Ensure new servers deploy with RDP blocked by default
  • Regular audits: Quarterly review of all remote access configurations
  • Incident playbook: Document response procedures for future exposures

Detection Controls

  • External scanning: Daily scans of your IP ranges for exposed management ports
  • Alerting: Immediate notification when port 3389 becomes externally reachable
  • Authentication monitoring: Alert on failed RDP authentication patterns
  • Threat intelligence: Monitor for your IPs appearing in RDP marketplace listings

How DriftAlarm Detects Exposed RDP

DriftAlarm's continuous monitoring platform scans your external attack surface for exposed RDP and other dangerous services. When port 3389 appears on any of your monitored assets, you receive an immediate drift alert — not days or weeks later, but as soon as the next scan cycle detects the change.

The drift detection engine compares each scan against your asset's baseline. If RDP wasn't exposed yesterday but is today, that configuration drift triggers an alert with full context: which IP, when it changed, and what service is now visible.

Stuck? We Can Help You Work Through It

If you hit something you can't validate on your own — a session you can't explain, evidence you're not sure how to read, or you just want a second set of eyes on the response — email us at support@driftalarm.com and we can help work through it with you.

How DriftAlarm Helps

Continuous external scanning detects exposed RDP within hours of misconfiguration — before attackers can exploit it. Drift alerts notify your team instantly when new ports open.

See How It Works

Related Security Guides

RDP exposure is often found alongside other attack surface issues. Review these related guides:

  • Configuration Drift Guide — Understand how security configurations change over time and why drift detection catches exposures that point-in-time scans miss.
  • Exposed SSH Guide — SSH (port 22) is another commonly exposed remote access protocol that requires similar containment and hardening approaches.
  • Exposed Database Ports Guide — MongoDB, Redis, and PostgreSQL get accidentally exposed through similar misconfigurations as RDP.
  • Exposed Admin Panels Guide — Web-based management interfaces like cPanel, Jenkins, and database UIs are frequently found exposed and require similar immediate action.
  • Attack Surface Monitoring Guide — Learn how to continuously monitor your perimeter to detect RDP and other dangerous exposures before attackers do.
  • Exposed RDP Monitoring Solution — See how DriftAlarm continuously monitors for exposed RDP across your attack surface with automated drift alerts.

Summary: RDP Response Checklist

TimeframeActionOwner
0-30 minBlock port 3389 from internet at firewallNetwork/Security
30-60 minVerify block, preserve logs, notify stakeholdersSecurity
1-4 hoursInvestigate for signs of compromiseSecurity/IR
1-7 daysImplement proper remote access (VPN + MFA)IT/Security
OngoingMonitor for re-exposure, enforce prevention controlsSecurity