HOWTO: Disable weak protocols, cipher suites and hashing algorithms on Web Application Proxies, AD FS Servers and Windows Servers running Azure AD Connect - The things that are better left unspoken (2024)

Reading Time: 7 minutes

HOWTO: Disable weak protocols, cipher suites and hashing algorithms on Web Application Proxies, AD FS Servers and Windows Servers running Azure AD Connect - The things that are better left unspoken (1)

Most Microsoft-based Hybrid Identity implementations use Active Directory Federation Services (AD FS) Servers, Web Application Proxies and Azure AD Connect installations. In this series, labeled Hardening Hybrid Identity, we’re looking at hardening these implementations, using recommended practices.

Note:
This blogpost assumes all Web Application Proxies, AD FS servers and Azure AD Connect installations run Windows Server 2016.

Hardening provides additional layers to defense in depth approaches. It changes the default behavior of products and services to make them more resilient to unauthorized changes and compromise.

Reasons why

Protocols, cipher suites and hashing algorithms are used to encrypt communications in every Hybrid Identity implementation. Typically, ciphers and algorithms to use are based on a negotiation between both ends of a communications channel. The purpose is to use the most secure protocols, cipher suites and hashing algorithms that both ends support. To use the strongest ciphers and algorithms it’s important to disable the ciphers and algorithms you no longer want to see used.

Microsoft recommends organizations to use strong protocols, cipher suites and hashing algorithms. For Azure Active Directory, they are changing the negotiation settings on their systems regularly, to avoid downgrades in encryption standards.

Possible negative impact (What could go wrong?)

When the systems of an Hybrid Identity implementation are improperly hardened, there will be no communication between Azure Active Directory and the systems of the implementation, and/or between the systems of the Hybrid Identity implementation.

This may affect authentications directly when using Active Directory Federation Services (AD FS) or Pass-through Authentication as authentication method in the Hybrid Identity implementation. This may cause diminished functionality, when Password Hash Sync (PHS) is used as the authentication method. Also, this may cause certificates to expire, monitoring to halt and/or backups to fail. It may also mean admins will no longer be able to (remotely) manage the systems.

When using the Remote Desktop Protocol (RDP) to manage the Windows Server installations of the Hybrid Identity implementation, the default security layer in RDP is set to Negotiate which supports both SSL (TLS 1.0) and the RDP Security Layer. Open Remote Desktop Session Host Configuration in Administrative Tools and double-click RDP-Tcp under the Connections group. If it is set to SSL (TLS 1.0) and you are running Windows Server 2008, make sure that you have installed TLS 1.1 and 1.2 support.

For Hybrid Identity implementations featuring Azure AD Connect’s Seamless Single Sign-on (3SO), do not disable RC4_HMAC_MD5 at this time, as this may break.

To disable weak protocols, cipher suites and hashing algorithms on Web Application Proxies, AD FS Servers and Windows Servers running Azure AD Connect, make sure to meet the following requirements:

System requirements

Make sure all systems in scope are installed with the latest cumulative Windows Updates. Also make sure you run the latest stable version of Azure AD Connect.

Privilege requirements

Make sure to sign in with an account that has privileges to create and/or change and link Group Policy objects to the Organizational Unit (OU) in which the systems in scope reside.

Who to communicate to

When intending to make changes to systems in the Hybrid Identity implementation, make sure to send a heads-up to these people and/or teams in your organization:

  • Load balancers and networking guys and gals
  • The Active Directory team
  • The people responsible for backups, restores and disaster recovery
  • The people going through the logs, using a SIEM and/or a TSCM solution
  • The monitoring team

One of the challenges you can easily avoid through communications is that multiple persons and/or teams make changes to the configuration. When it breaks, you don’t want to roll-back a bunch of changes, just the one that broke it. Make sure you have the proper freeze/unfreeze moments to achieve that.

Encryption methods are comprised of:

  1. A protocol, like PCT, SSL and TLS
  2. A key exchange method, like ECDHE, DHE and RSA
  3. A cipher suite, like AES, MD5, RC4 and 3DES

Protocols

For the purpose of this blogpost, I’ll stick to disabling the following protocols:

  • PCT v1.0
  • SSL v2
  • SSL v3
  • TLS v1.0
  • TLS v1.1

Note:
PCT v1.0 is disabled by default on Windows Server Operating Systems.
SSL v2 is disabled, by default, in Windows Server 2016, and later versions of Windows Server.

Cipher suites and hashing algorithms

For the purpose of this blogpost, I’ll stick to disabling the following ciphers suites and hashing algorithms:

  • RC2
  • RC4
  • MD5
  • 3DES
  • DES
  • NULL
  • All cipher suites marked as EXPORT

Note:
NULL cipher suites provide no encryption.

Note:
The above list is a snapshot of weak ciphers and algorithms dating July 2019. Please consult the SSL Labs Documentation for actual guidance on weak ciphers and algorithms to disable for your organization.

For the purpose of this blogpost, I’ll stick with the following protocols, cipher suites and hashing algorithms, in the following negotiation order:

  1. TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
  2. TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
  3. TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
  4. TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
  5. TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
  6. TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
  7. TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
  8. TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256
  9. TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
  10. TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256
  11. TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
  12. TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
  13. TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
  14. TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA

This list provides a preference to cipher suites that offer Perfect Forwarding Secrecy (PFS) with the elliptic curve Diffie-Hellman key exchange (ECDHE_*).

As the systems in scope may or may not be of Active Directory Domain Services, may or may not run Server Core and may or may not allow downloading 3rd party tools, but in all cases you can disable weak protocols using Windows PowerShell with the following scripts:

Note:
As SSL v2 is disabled and removed from Windows Server 2016, and up, and SSL v3 is disabled by default in Windows Server 2016, and up, these protocols do not need to be disabled on Windows Server 2016, and newer versions of Windows Server.

Enable TLS 1.2

To enable TLS 1.2, run the following Windows PowerShell script in an elevated PowerShell window on each of the Windows Server installations in scope of the Hybrid Identity implementation:

Note:
The DisabledByDefault registry value doesn't mean that the protocol is disabled by default. It means the protocol isn’t advertised as available by default during negotiations, but is available if specifically requested.

$SChannelRegPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols"

New-Item $SChannelRegPath"\TLS 1.2\Server" -Force

New-Item $SChannelRegPath"\TLS 1.2\Client" -Force

New-ItemProperty -Path $SChannelRegPath"\TLS 1.2\Server" `
-Name Enabled -Value 1 -PropertyType DWORD

New-ItemProperty -Path $SChannelRegPath"\TLS 1.2\Server" `
-Name DisabledByDefault -Value 0 -PropertyType DWORD

New-ItemProperty -Path $SChannelRegPath"\TLS 1.2\Client" `
-Name Enabled -Value 1 -PropertyType DWORD

New-ItemProperty -Path $SChannelRegPath"\TLS 1.2\Client" `
-Name DisabledByDefault -Value 0 -PropertyType DWORD

Configuring .Net applications to use TLS 1.1 and TLS 1.2

Now, we need to configure .Net applications to use either TLS 1.1 or TLS 1.2. This is important for built-in Windows functionality and 3rd party applications and services. Run the following Windows PowerShell script in the same elevated PowerShell window as the previous one:

$RegPath1 = "HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319"

New-ItemProperty -path $RegPath1 `
-name
SystemDefaultTlsVersions -value 1 -PropertyType DWORD

New-ItemProperty -path $RegPath1 `
-name
SchUseStrongCrypto -value 1 -PropertyType DWORD

$RegPath2 = "HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319"

New-ItemProperty -path $RegPath2 `
-name SystemDefaultTlsVersions -value 1 -PropertyType DWORD

New-ItemProperty -path $RegPath2 `
-name SchUseStrongCrypto -value 1 -PropertyType DWORD

Disable TLS 1.0 and TLS 1.1

To disable TLS 1.0 and TLS 1.1, run the following Windows PowerShell script in the same elevated PowerShell window as the previous Windows PowerShell script on each of the Windows Server installations in scope of the Hybrid Identity implementation:

New-Item $SChannelRegPath -Name "TLS 1.0"

New-Item $SChannelRegPath"\TLS 1.0" -Name SERVER

New-ItemProperty -Path $SChannelRegPath"\TLS 1.0\SERVER" `
-Name Enabled -Value 0 -PropertyType DWORD

New-Item $SChannelRegPath"\TLS 1.1\Server"force

New-Item $SChannelRegPath"\TLS 1.1\Client"force

New-ItemProperty -Path $SChannelRegPath"\TLS 1.1\Server" `
-Name Enabled -Value 0 -PropertyType DWORD

New-ItemProperty -Path $SChannelRegPath"\TLS 1.1\Server" `
-Name DisabledByDefault -Value 0 -PropertyType DWORD

New-ItemProperty -Path $SChannelRegPath"\TLS 1.1\Client" `
-Name Enabled -Value 0 -PropertyType DWORD

New-ItemProperty -Path $SChannelRegPath"\TLS 1.1\Client" `
-Name DisabledByDefault -Value 0 -PropertyType DWORD

Restart the server after these configuration changes.

The systems in scope may or may not be of Active Directory Domain Services, may or may not run Server Core and may or may not allow downloading 3rd party tools. In all cases you can disable weak cipher suites and hashing algorithms by disabling individual TLS cipher suites using Windows PowerShell.

Note:
The below lines of PowerShell do not change the negotiation order of the cipher suites and hashing algorithms. It merely disables individual combinations of unwanted cipher suites and hashing algorithms. This also eliminates the need to keep up with the cipher suites in Windows Server between Windows Server version releases and even between updates.
A win-win situation if you’d ask me!

Tip!
To get an overview of the current negotiation order, use the following line of PowerShell:

Get-TlsCipherSuite | Format-Table Name

Use the following lines on Windows Server 2016 installations to remove weak cipher suites and hashing algorithms:

Disable-TlsCipherSuite-Name "TLS_DHE_RSA_WITH_AES_256_CBC_SHA"
Disable-TlsCipherSuite-Name "TLS_DHE_RSA_WITH_AES_128_CBC_SHA"
Disable-TlsCipherSuite-Name "TLS_RSA_WITH_AES_256_GCM_SHA384"
Disable-TlsCipherSuite-Name "TLS_RSA_WITH_AES_128_GCM_SHA256"
Disable-TlsCipherSuite-Name "TLS_RSA_WITH_AES_256_CBC_SHA256"
Disable-TlsCipherSuite-Name "TLS_RSA_WITH_AES_128_CBC_SHA256"
Disable-TlsCipherSuite-Name "TLS_RSA_WITH_AES_256_CBC_SHA"
Disable-TlsCipherSuite-Name "TLS_RSA_WITH_AES_128_CBC_SHA"
Disable-TlsCipherSuite-Name "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
Disable-TlsCipherSuite-Name "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"
Disable-TlsCipherSuite-Name "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"
Disable-TlsCipherSuite-Name "TLS_DHE_DSS_WITH_AES_256_CBC_SHA"
Disable-TlsCipherSuite-Name "TLS_DHE_DSS_WITH_AES_128_CBC_SHA"
Disable-TlsCipherSuite-Name "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA"
Disable-TlsCipherSuite-Name "TLS_RSA_WITH_RC4_128_SHA"
Disable-TlsCipherSuite-Name "TLS_RSA_WITH_RC4_128_MD5"
Disable-TlsCipherSuite-Name "TLS_RSA_WITH_NULL_SHA256"
Disable-TlsCipherSuite-Name "TLS_RSA_WITH_NULL_SHA"
Disable-TlsCipherSuite-Name "TLS_PSK_WITH_AES_256_GCM_SHA384"
Disable-TlsCipherSuite-Name "TLS_PSK_WITH_AES_128_GCM_SHA256"
Disable-TlsCipherSuite-Name "TLS_PSK_WITH_AES_256_CBC_SHA384"
Disable-TlsCipherSuite-Name "TLS_PSK_WITH_AES_128_CBC_SHA256"
Disable-TlsCipherSuite-Name "TLS_PSK_WITH_NULL_SHA384"
Disable-TlsCipherSuite -Name "TLS_PSK_WITH_NULL_SHA256"

After hardening it’s time to test the hardening. Everyone should sign off (not literally, unless that’s procedure) on the correct working of the Windows Servers running Azure AD Connect. Does authentication to cloud applications still work? Does rolling over the certificate still work? Does monitoring still work? Can we still make back-ups? Can we still restore the backups we make?

Typically, hardening is rolled out to one Windows Server. When testing the hardening of the functionality behind the load balancer, make sure that the load balancer points you to the hardened system, not another one. In an environment with a Staging Mode Azure AD Connect installation, the hardening can be performed on this Windows Server installation and tested with the normal Staging Mode (imports only) synchronization cycles. When hardening is approved upon, the actively synchronizing Azure AD Connect installation can be switched, or hardened, too.

Note:
The registry changes are step 2 of two steps to harden protocols, cipher suites and hashing algorithms of the Hybrid Identity implementation. Make sure to Enforce Azure AD Connect to use TLS 1.2 only on the Windows Servers running Azure AD Connect, before testing.

Rolling Back Hardening

To roll back hardening, use the following lines of Windows PowerShell:

$SChannelRegPath = "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols"

Remove-ItemName "TLS 1.0" –Path $SChannelRegPath
Remove-ItemName "TLS 1.1" –Path $SChannelRegPath
Remove-ItemName "TLS 1.2" –Path $SChannelRegPath

Enable-TlsCipherSuite-Name "TLS_DHE_RSA_WITH_AES_256_CBC_SHA"
Enable-TlsCipherSuite-Name "TLS_DHE_RSA_WITH_AES_128_CBC_SHA"
Enable-TlsCipherSuite-Name "TLS_RSA_WITH_AES_256_GCM_SHA384"
Enable-TlsCipherSuite-Name "TLS_RSA_WITH_AES_128_GCM_SHA256"
Enable-TlsCipherSuite-Name "TLS_RSA_WITH_AES_256_CBC_SHA256"
Enable-TlsCipherSuite-Name "TLS_RSA_WITH_AES_128_CBC_SHA256"
Enable-TlsCipherSuite-Name "TLS_RSA_WITH_AES_256_CBC_SHA"
Enable-TlsCipherSuite-Name "TLS_RSA_WITH_AES_128_CBC_SHA"
Enable-TlsCipherSuite-Name "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
Enable-TlsCipherSuite-Name "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"
Enable-TlsCipherSuite-Name "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"
Enable-TlsCipherSuite-Name "TLS_DHE_DSS_WITH_AES_256_CBC_SHA"
Enable-TlsCipherSuite-Name "TLS_DHE_DSS_WITH_AES_128_CBC_SHA"
Enable-TlsCipherSuite-Name "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA"
Enable-TlsCipherSuite-Name "TLS_RSA_WITH_RC4_128_SHA"
Enable-TlsCipherSuite-Name "TLS_RSA_WITH_RC4_128_MD5"
Enable-TlsCipherSuite-Name "TLS_RSA_WITH_NULL_SHA256"
Enable-TlsCipherSuite-Name "TLS_RSA_WITH_NULL_SHA"
Enable-TlsCipherSuite-Name "TLS_PSK_WITH_AES_256_GCM_SHA384"
Enable-TlsCipherSuite-Name "TLS_PSK_WITH_AES_128_GCM_SHA256"
Enable-TlsCipherSuite-Name "TLS_PSK_WITH_AES_256_CBC_SHA384"
Enable-TlsCipherSuite-Name "TLS_PSK_WITH_AES_128_CBC_SHA256"
Enable-TlsCipherSuite-Name "TLS_PSK_WITH_NULL_SHA384"
Enable-TlsCipherSuite-Name "TLS_PSK_WITH_NULL_SHA256"

Get rid of old protocols, cipher suites and hashing algorithms in your Hybrid Identity implementation, so they cannot be used to negotiate the security of the connections down.

Further reading

Managing SSL/TLS Protocols and Cipher Suites for AD FS
245030 How to restrict cryptographic algorithms and protocols in Schannel.dll
187498 How to disable PCT 1.0, SSL 2.0, SSL 3.0, or TLS 1.0 in IIS
Recommendations for TLS/SSL Cipher Hardening
How to Update Your Windows Server Cipher Suite for Better Security
A Cipher Best Practice: Configure IIS for SSL/TLS Protocol

HOWTO: Disable weak protocols, cipher suites and hashing algorithms on Web Application Proxies, AD FS Servers and Windows Servers running Azure AD Connect - The things that are better left unspoken (2024)

FAQs

How do I fix weak cipher suites vulnerability? ›

How to fix. To stop using weak cipher suites, you must configure your web server cipher suite list accordingly. Ideally, as a general guideline, you should remove any cipher suite containing references to NULL, anonymous, export, DES, 3DES, RC4, and MD5 algorithms.

What is the tool to disable cipher suites? ›

The Disable-TlsCipherSuite cmdlet disables a cipher suite. This cmdlet removes the cipher suite from the list of Transport Layer Security (TLS) protocol cipher suites for the computer.

How do I make my ciphers more secure? ›

One way to make a Caesar cipher a bit harder to break is to use different shifts at different positions in the message. For example, we could shift the first character by 25, the second by 14, the third by 17, and the fourth by 10.

Is it possible to break RSA encryption? ›

"Breaking RSA is usually attempted by using Shor's algorithm in a quantum computer but there are no quantum computers in existence that can produce enough gates to implement Shor's algorithm that would break 2048 keys," Woodward said.

Can you turn off encryption? ›

Type and search [Device encryption settings] in the Windows search bar①, then click [Open]②. On the Device encryption field, set the option to [Off]③. Confirm whether you need to turn off device encryption, select [Turn off] to disable the device encryption function④.

How to check for weak cipher suites? ›

To understand which ciphers suites your organization is using, utilize an SSL/TLS scanning tool (eg: Test TLS). Once you have the list of cipher suites, you can cross-reference with SecurityScorecard's list of weak cipher suites.

Which ciphers should be disabled? ›

You should also disable weak ciphers such as DES and RC4. DES can be broken in a few hours and RC4 has been found to be weaker than previously thought. In the past, RC4 was advised as a way to mitigate BEAST attacks.

What is the most secure cipher suite? ›

AES based ciphers are more secure than the corresponding 3DES, DES, and RC4 based ciphers. AES-GCM ciphers are more secure than AES-CBC ciphers.

How do I restrict cipher suites? ›

​​ Cipher suites and edge certificates

After you subscribed to Advanced Certificate Manager for your domain, you can restrict Cipher Suites at the Zone-level requests via the API. Use the Edit zone setting Open API docs link endpoint, specifying ciphers as the setting name in the URI path.

What is the impact of removing weak ciphers? ›

If there are none then the SSL connection fails. So if you are using ciphers that are not supported prior to TLS 1.2 then no client using a lesser version will have any ciphers the server allows. Therefore there is no benefit in supporting the earlier protocols.

How do I disable TLS SSL support for RC4 ciphers? ›

Navigate to System > Configuration > Security > Inbound SSL Options. Under Allow Encryption Strength, select Custom SSL Cipher Suites. From the right pane (under Selected Cipher Suites), remove all cipher suites with RC4. Click Save Changes.

Top Articles
#109 Reading PLU Codes for Your Health - Gardner Schofield Chiropractic
Food Starch Market Size, Share & Analysis 2031
Top 11 Best Bloxburg House Ideas in Roblox - NeuralGamer
Pet For Sale Craigslist
Guardians Of The Galaxy Showtimes Near Athol Cinemas 8
Top Financial Advisors in the U.S.
Songkick Detroit
Mawal Gameroom Download
123 Movies Babylon
Bbc 5Live Schedule
Stream UFC Videos on Watch ESPN - ESPN
Degreeworks Sbu
Craigslist Pets Longview Tx
Saberhealth Time Track
Iu Spring Break 2024
Lcwc 911 Live Incident List Live Status
Pickswise Review 2024: Is Pickswise a Trusted Tipster?
Nesb Routing Number
Sam's Club Gas Price Hilliard
Access a Shared Resource | Computing for Arts + Sciences
His Only Son Showtimes Near Marquee Cinemas - Wakefield 12
Rs3 Bring Leela To The Tomb
Sinfuldeed Leaked
Ice Dodo Unblocked 76
Dl.high Stakes Sweeps Download
Life Insurance Policies | New York Life
The Venus Flytrap: A Complete Care Guide
Los Amigos Taquería Kalona Menu
Deleted app while troubleshooting recent outage, can I get my devices back?
Sedano's Supermarkets Expands to Orlando - Sedano's Supermarkets
Tal 3L Zeus Replacement Lid
Bay Focus
Pinellas Fire Active Calls
Game8 Silver Wolf
7543460065
Electronic Music Duo Daft Punk Announces Split After Nearly 3 Decades
Go Bananas Wareham Ma
The Attleboro Sun Chronicle Obituaries
Tricia Vacanti Obituary
Pink Runtz Strain, The Ultimate Guide
Best Haircut Shop Near Me
Stitch And Angel Tattoo Black And White
40X100 Barndominium Floor Plans With Shop
Grace Family Church Land O Lakes
The Plug Las Vegas Dispensary
Google Flights Missoula
The Goshen News Obituary
Obituary Roger Schaefer Update 2020
What Responsibilities Are Listed In Duties 2 3 And 4
Qvc Com Blogs
Texas Lottery Daily 4 Winning Numbers
Latest Posts
Article information

Author: Sen. Ignacio Ratke

Last Updated:

Views: 5861

Rating: 4.6 / 5 (76 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Sen. Ignacio Ratke

Birthday: 1999-05-27

Address: Apt. 171 8116 Bailey Via, Roberthaven, GA 58289

Phone: +2585395768220

Job: Lead Liaison

Hobby: Lockpicking, LARPing, Lego building, Lapidary, Macrame, Book restoration, Bodybuilding

Introduction: My name is Sen. Ignacio Ratke, I am a adventurous, zealous, outstanding, agreeable, precious, excited, gifted person who loves writing and wants to share my knowledge and understanding with you.