RDP (Remote Desktop Protocol) for Lateral Movement
Requirements:
- Credentials (password or >not by default< NT hash) of a member of the local Administrators or Remote Desktop Users group on the target machine.
- RDP enabled on the target machine (disabled by default on both Server and client Windows).
RDP (3389/TCP) is not active by default. It must be explicitly enabled. By default, if you want to connect via RDP, you need to be a local administrator or a member of local Remote Desktop Users group on the target machine. Logon via RDP is of the Remote Interactive type (reusable credentials are available).
Linux:
Windows:
RDP Pass-the-Hash (Restricted Admin Mode)
Generally, Pass-the-Hash is not possible using standard remote interactive RDP logon by default. If you try to pass the hash, you will get an error stating that "Account Restrictions are preventing this user from signing in". Hovewer, pass the hash is possible when the machine has Restricted Admin Mode enabled. This mode changes the interactive RDP logon to the network logon type so user's credentials are not passed to the target machine and cannot be reused further. It is disabled by default.
The good news is, if you have any level of administrative access to the machine, you can enable this feature remotely and perform a pass-the-hash attack. Remember, it changes the logon type so reusable credentials are not available on the machine!
Windows:
Linux:
Enable RDP with CMD
NOTE: Windows Home doesn't have built-in RDP server. It's available on Windows Server, Pro and Enterprise editions.
If you have administrative access to the machine (e.g. via SmbExec or WinRM) you can activate RDP using CMD: