Securing RDP Connections with Trusted SSL/TLS Certificates

In this text we’ll present methods to use trusted SSL/TLS certificates to safe RDP connections to Windows computer systems or servers in an Active Directory area. We will use trusted SSL certs as a substitute of default self-signed RDP certificates (then utilizing a self-signed RDP certificates, the person receives a warning that the certificates just isn’t trusted when connecting to the host). In this instance, we’ll configure a customized RDP certificates template within the Certificate Authority and a Group Policy to mechanically difficulty and bind an SSL/TLS certificates to the Remote Desktop Services.

Remote Desktop Connection (RDP) Self-Signed Certificate Warning

By default, to safe an RDP session Windows generates a . During the primary connection to an RDP/RDS host utilizing the mstsc.exe shopper, a person sees the next warning:

The distant laptop couldn't be authenticated on account of issues with its safety certificates. It could also be unsafe to proceed.
Certificate error: The certificates just isn't from a trusted certifying authority.

To proceed and set up an RDP connection, a person has to click on Yes. To stop the RDP cert warning from showing each time, you’ll be able to examine the “Don’t ask me once more for connections to this laptop” choice.
Remote Desktop Connection (RDP) warning - Certificate is not from a trusted certifying authority

In this case the RDP certificates thumbprint is saved within the CertHash parameter of the registry key with the on a shopper (HKEY_CURRENT_USERSoftwareMicrosoftTerminal Server ClientServers). If you’ve gotten hidden the warning that the RDP server couldn’t be verified, take away the certificates thumbprint from the registry to reset the settings.

rdp CertHash value in the registry

Even although a self-signed certificates is used to ascertain a connection, your RDP session is safe and your visitors is encrypted.

Create an RDP Certificate Template in a Certificate Authority (CA)

Let’s attempt to use a trusted SSL/TLS certificates issued by a company certificates authority to safe RDP connections. Using this certificates, a person can authenticate an RDP server when connecting. Suppose, company Microsoft Certificate Authority is already deployed in your area. In this case, you’ll be able to configure automated difficulty and connection of certificates to all Windows computer systems and servers within the area.

You should create a brand new sort of certificates template for RDP/RDS hosts in your CA:

  1. Run the Certificate Authority console and go to the Certificate Templates part;
  2. Duplicate the Computer certificates template (Certificate Templates -> Manage -> Computer -> Duplicate);
    dublicate computer cetrificate template in windows ca
  3. In the General tab, specify the title of latest certificates template – RDPTemplate. Make positive that the worth within the Template Name area matches the Template show title;
    create CA template to issue RDP certificates
  4. In the Compatibility tab, specify the minimal shopper model utilized in your area (for instance, Windows Server 2008 R2 for the CA and Windows 7 to your purchasers). Thus, stronger encryption algorithms can be used;
  5. Then, within the Application Policy part of the Extensions tab, limit the use scope of the certificates to Remote Desktop Authentication solely (enter the next object identifier — 1.three.6.1.four.1.311.54.1.2). Click Add -> New, create a brand new coverage and choose it;
    ca template for Remote Desktop Authentication 1.3.6.1.4.1.311.54.1.2
  6. In the certificates template settings (Application Policies Extension), take away all insurance policies besides Remote Desktop Authentication; create Remote Desktop Authentication certificate policy template
  7. To use this RDP certificates template in your area controllers, open the Security tab, add the Domain Controllers group and allow the Enroll and Autoenroll choices for it;
    allow Enroll and Autoenroll certificates to Domain Controllers
  8. Save the certificates template;
  9. Then within the Certificate Authority mmc snap-in, click on Certificate Templates folder and choose New -> Certificate Template to Issue -> select the template you’ve gotten created (RDPTemplate);
    new rdp certificate template in certification authority

How to Deploy RDP SSL/TLS Certificates utilizing Group Policy?

Now you should configure a site GPO to mechanically assign RDP certificates to computer systems/servers based on the configured template.

It is meant that every one area computer systems belief the company Certificate Authority, i.e. the basis certificates has been added to the Trusted Root Certificate Authorities .
  1. Open the Domain Group Policy Management console (gpmc.msc), create a brand new GPO object and hyperlink it to the OU containing RDP/RDS servers or computer systems to mechanically difficulty TLS certificates to safe RDP connections;
  2. Go to the next GPO part Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> SecurityEnable the Server Authentication Certificate Template coverage. Specify the title of the CA template you’ve gotten created earlier (RDPTemplate);
    configuring Server Authentication Certificate Template GPO options
  3. Then in the identical GPO part, allow the Require use of particular safety layer for distant (RDP) connections coverage and set the worth SSL for it; group policy parameter Require use of SSL security layer for remote (RDP) connections
  4. To mechanically renew an RDP certificates, go to the Computer configuration -> Windows settings -> Security Settings -> Public Key Policies part of the GPO and allow the Certificate Services Client – Auto-Enrollment Properties coverage. Check the “Renew expired certificates, replace pending certificates and take away revoked certificates” and “Update certificates that use certificates templates” choices; rdp certificate Auto-Enrollment group policy settings
  5. If you need your purchasers to at all times confirm the RDP server certificates, it’s essential to configure the Configure Authentication for Client = Warn me if authentication fails coverage (Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Remote Desktop Settings -> Remote Desktop Connection Client);
  6. If wanted, open the incoming  utilizing ;
  7. Then replace group coverage settings on the shopper laptop, launch the pc certificates console (Certlm.msc) and ensure that the Remote Desktop Authentication certificates issued by your CA has appeared within the Personal -> Certificates part.
If the brand new Group Policy settings haven’t been utilized, use the  software and  article to diagnose.

issued RDP certificates

To apply the brand new RDP certificates, restart Remote Desktop Services:

 Time periodService -ComputerName mun-dc01| Restart-Service –drive –verbose

After that, when connecting to a server utilizing RDP, you received’t see a request to verify that the certificates is trusted (to see the request, connect with the server the certificates is issued for utilizing its IP handle as a substitute of the FQDN). Click View certificates, go to the Details tab and duplicate the worth within the Thumbprint area.
get rdp certificate Thumbprint

In the Issued Certificates part of the Certification Authority console, you’ll be able to ensure that an RDPTemplate certificates has been issued for the particular Windows server/laptop. Also examine the certificates Thumbprint worth:

get certificate Thumbprint via the certsrv mmc console

Then evaluate this thumbprint with the certificates thumbprint utilized by the Remote Desktop Service. You can view the worth of the RDS certificates thumbprint within the registry (HKLM:SYSTEMCurrentControlSetControlTerminal ServerWinStations, the TemplateCertificate parameter) or utilizing the next PowerShell command:

Get-WmiObject -Class "Win32_TSGeneralSetting" -Namespace rootcimv2terminalservices|choose SSLCertificateSHA1Hash
get rdp certificate thumbprint using powershell

Then, when connecting to the distant desktop of any Windows host, you received’t see a warning of an untrusted RDP certificates.

Signing an RDP File with a Trusted TLS Certificate Thumbprint

If you don’t have a CA, however you don’t want your customers to see warnings once they connect with an RDP/RDS host, you’ll be able to add the certificates to the trusted ones on person computer systems.

Get the worth of the RDP certificates thumbprint as described above:

Get-WmiObject -Class "Win32_TSGeneralSetting" -Namespace rootcimv2terminalservices|choose SSLCertificateSHA1Hash

Use this fingerprint to signal the .RDP file with the RDPSign.exe software:

rdpsign.exe /sha256 25A27B2947022CC11BAFF261234567DEB2ABC21 "C:psmun-dc01.rdp"

Then add this thumbprint to the trusted certificates on person computer systems utilizing GPO. Specify the thumbprints (separated by a semicolon) within the Specify SHA1 thumbprints of certificates representing trusted .rdp publishers coverage in Computer Configuration -> Policies -> Administrative Templates -> Windows Components -> Remote Desktop Settings -> Remote Desktop Connection Client.

Remote Desktop Connection Client policy, adding trusted .rdp publishers

To configure the clear RDP logon with out getting into a password (), configure the Allow delegation defaults credential coverage and specify RDP/RDS host names in it (see on methods to do it).

Check Also

CHKDSK: How to Check and Repair Hard Drive Errors in Windows 10?

CHKDSK.exe (test disk) is a classical built-in Windows software for checking exhausting drives for errors. …

Leave a Reply

Your email address will not be published. Required fields are marked *