Get a Pentest and security assessment of your IT network.

Cyber Security

RDP Brute Force Attacks: Why Restrictions Fail

TL;DR

Even if you restrict RDP access to a single IP address, brute force attacks can still succeed due to Network Address Translation (NAT), port forwarding, and compromised machines within your allowed range. This guide explains how attackers bypass these restrictions and provides steps to improve your security.

Understanding the Problem

Restricting RDP access by IP is a basic security measure, but it’s easily circumvented. Here’s why:

  • NAT (Network Address Translation): Many networks use NAT. Multiple devices share one public IP address. An attacker could compromise a machine *within* your allowed IP range and launch attacks from there.
  • Port Forwarding: If port 3389 (the default RDP port) is forwarded to a device within your network, attackers can target that specific device even if the main network IP is restricted.
  • Compromised Internal Machines: An attacker gaining access to any machine on your network with a valid IP address can bypass external restrictions.

Solution Steps

  1. Enable Network Level Authentication (NLA)
    • NLA requires the user to authenticate *before* establishing an RDP connection, making brute force attacks much harder and slower. It also logs failed authentication attempts more effectively.
    • To enable NLA: gpedit.msc > Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Security > Enable Network Level Authentication. Set to ‘Enabled’.
  2. Change the RDP Port
    • Changing the default port (3389) reduces automated attacks significantly. Attackers typically scan for 3389.
    • To change the port: Registry Editor (regedit) > HKEY_LOCAL_MACHINESystemCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp > PortNumber. Change the value to a non-standard high port number (e.g., 3390). Restart the Remote Desktop service after changing this setting.
  3. Implement Multi-Factor Authentication (MFA)
    • This is the most effective step. Even if an attacker guesses a password, they need a second factor (e.g., code from an authenticator app).
    • Consider solutions like Duo Security, Google Authenticator, or Microsoft Authenticator. Many RDP MFA tools are available.
  4. Monitor Event Logs
    • Regularly check the Windows event logs for failed RDP login attempts (Event ID 4625). Look for patterns indicating a brute force attack.
    • Use tools like Event Viewer or SIEM solutions to automate log analysis.
  5. Limit Allowed Users
    • Only allow necessary users access via RDP. Reduce the attack surface by removing unnecessary accounts.
    • Review Remote Desktop Users group membership regularly.
  6. Use a VPN
    • Require all RDP connections to go through a VPN. This adds an extra layer of security and allows you to control access more effectively.
    • Configure the VPN server with strong authentication methods.
  7. Consider Just-in-Time (JIT) Access
    • JIT access grants RDP privileges only when needed and for a limited time. This minimizes the window of opportunity for attackers.
    • Solutions like Microsoft Privileged Identity Management (PIM) can help implement JIT access.

Advanced Security Measures

  • Firewall Rules: Implement strict firewall rules to only allow RDP traffic from trusted sources, even if using a VPN.
  • Intrusion Detection/Prevention Systems (IDS/IPS): Deploy IDS/IPS solutions to detect and block malicious RDP activity.
Related posts
Cyber Security

Zip Codes & PII: Are They Personal Data?

Cyber Security

Zero-Day Vulnerabilities: User Defence Guide

Cyber Security

Zero Knowledge Voting with Trusted Server

Cyber Security

ZeroNet: 51% Attack Risks & Mitigation