3

I'm planning to set up secure WAN-accessible RDP to my personal computer (Windows 10, not Windows Server, since it's just a workstation).

The plan is:

  • Forward the RDP and Wake-on-LAN ports to my machine, naturally.
  • Have two certificates on a USB key which I carry with myself to any place where I'd like to remotely access my workstation: the usual host certificate as typically used with RDP for confirming server authenticity, and a client certificate (in layman's terms, a file that the client has to send to the server to confirm its authenticity) as a second layer of security.
  • Whenever I'd like to connect to my computer from a remote one, I insert the USB key, perform Wake-on-LAN to boot up my machine (I already figured out this part), open up the RDP client and connect through the public port, authenticating first using the client authentication file, then my typical password.

Most resources I've found on implementing this security measure require the use of Windows Server, confusing IPsec setup which also seems to only work on Windows Server, or smart cards (what I'd like to use is specifically a USB flash drive). Can I do this with just regular RDP and Wake-on-LAN or do I need to set up a tunnel of sorts with proper client certificate authentication support, such as VPN or SSH (which would probably mean ditching RDP altogether and using VNC or a similar alternative)?

3
  • RDP itself doesn't support any security protocols (authentication with cert is not a security layer). You have to use VPN to avoid attacks to the host, brut force, etc.. Also, you can tweak Windows RDP to support 2FA but that's not securing the traffic in transit.
    – Hardoman
    Commented Sep 28, 2021 at 12:22
  • 1
    @Hardoman: RDP has several kinds of security layers (as in traffic encryption/integrity). If you use NLA, then you're using CredSSP, which integrates TLS 1.2 as its security layer, and the entire session (including the authentication process) is TLS-protected. (Even before NLA, it was already possible to enable TLS 1.0 in Server 2003 – though few people bothered – while the legacy "High" and "Client Compatible" security levels used 3DES or RC4; granted, that's now garbage, but at the time it was a security layer nevertheless.) Commented Sep 28, 2021 at 13:00
  • Does this answer your question? How to provide a verified server certificate for Remote Desktop (RDP) connections to Windows 10
    – harrymc
    Commented Sep 28, 2021 at 14:57

1 Answer 1

3

Forward the RDP and Wake-on-LAN ports to my machine, naturally.

This is not recommended, as the RDP service in Windows has historically had many security issues that were exploitable without authentication. Although requiring NLA (which is the default) improves the situation a bit, it's still considered an unnecessarily high risk.

So really, consider using a VPN tunnel just for that reason – or SSH if you want to carry it around to random PCs where VPN apps would be difficult to install. (Yet another alternative is Guacamole which is a browser-based gateway to VNC and RDP servers.)

confusing IPsec setup which also seems to only work on Windows Server, or smart cards

IPsec works just fine on client versions of Windows, although it is quite confusing to set up – Windows 10 has like three IPsec clients; the legacy XP one (obsolete IKEv1-only), the new one that's part of Windows Firewall (wf.msc); and the one that is configured as an "IKEv2 VPN" connection.

It's smart cards that are likely to require Windows Server.

or smart cards (what I'd like to use is specifically a USB flash drive).

"Smart Card Authentication" doesn't strictly require the certificate to be on a physical smartcard (which do come in the shape of self-contained USB tokens) – it only requires the certificate to be available through Windows CAPI, but it'll actually accept certificates whose private key was simply imported from a .pfx file into the "software-based" Windows certificate store.

But the biggest issue with this plan is that then a copy of your private key remains in whichever machine you install it on (as the RDP client doesn't support reading it directly from a file), so you'd be trusting any random computer with your password and your certificate keypair. Really even if you didn't have to install the .pfx file, you'd still be trusting any random computer with your certificate keypair on the USB stick.

That's actually the whole point of smart cards – the private key cannot be extracted from them, even by a malicious PC; the card performs signing operations internally and returns only that result. But you don't have to carry a whole card reader around – as mentioned, there are USB-stick-shaped smart cards, of which Yubikey is a popular one. (I am specifically referring to the "CCID/PIV" mode in Yubikey NEO and later models, emulating a PIV card which doesn't even need drivers like other smartcards do.)

Another issue is that from what I've found out, "Smart Card Authentication" in RDP relies on Active Directory, as it's implemented through Kerberos PKINIT and not through ordinary direct certificate authentication. (Not necessarily Windows Server – Samba can do AD – but it still needs AD.) It is also an alternative for the user's AD password, not a second factor.

The final problem is that some of the security issues that previously affected Windows RDP service were pre-authentication, meaning that they could have been exploited before verifying your password – and therefore also before verifying your "smart card" credentials. (Although they've been patched, it's definitely not a great track record compared to e.g. OpenSSH or WireGuard.)

(which would probably mean ditching RDP altogether and using VNC or a similar alternative)?

RDP still works over an SSH tunnel; just make sure to configure it with the "local" port other than 3389. (You do lose the UDP-based transport mode but it's optional and the difference in performance isn't even very noticeable.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .