Hallo Freunde der Sonne,
dieser Artikel ist für mich Mal wieder eine Sammlung der ganzen PowerShell-Befehle für das aktivieren von TLS 1.2 etc. um die ExtendedProtectionManagement-Funktion von Exchange zu aktivieren.
Exchange 2016/2019 – ExtendedProtectionManagement aktivieren
Quellen
- Technet: https://learn.microsoft.com/en-us/exchange/plan-and-deploy/post-installation-tasks/security-best-practices/exchange-extended-protection?view=exchserver-2019
- Skript auf Github: https://microsoft.github.io/CSS-Exchange/Security/ExchangeExtendedProtectionManagement/
- TLS Sicherheitseinstellungen: https://learn.microsoft.com/en-us/exchange/plan-and-deploy/post-installation-tasks/security-best-practices/exchange-tls-configuration?view=exchserver-2019
- Support-Matrix: https://www.frankysweb.de/windows-extended-protection-und-exchange-server/
- MS365 Hybrid-Bereitstellung: https://www.msxfaq.de/cloud/exchangeonline/hybrid/hybrid_betriebsarten.htm
Anleitung
Eine kurze Agenda was zu tun ist:
- Abhängigkeiten abklären
- Notwendige Sicherheitsvorlagen (TLS 1.2) aktivieren
- alte Sicherheitsvorlagen (veraltete Ciphers) deaktivieren
- SSL-Weiterleitung deaktivieren
- Skript herunterladen, erweiterte EAP aktivieren
- Testläufe
- Cipher-Suites des Betriebssystems einschränken
1. Abhängigkeiten abklären
Zitat des Skripts: ExchangeExtendedProtectionManagement.ps1
Enabling Extended Protection
Extended Protection is recommended to be enabled for security reasons. Known Issues: Following scenarios will not work when Extended Protection is enabled.
– SSL offloading or SSL termination via Layer 7 load balancing.
– Exchange Hybrid Features if using Modern Hybrid.
– Access to Public folders on Exchange 2013 Servers.
Heißt übersetzt:
- wird ein Reverse-Proxy/CDN/AD-FS eingesetzt, kann es zu Problemen bei der SSL-Weiterleitung geben, siehe deshalb Technet
- wird die „moderne“ Hybridbereitstellung verwendet, sollten Sie sich fragen warum Sie noch Exchange lokal einsetzen – siehe MS365 Hybrid-Bereitstellung, bei der klassischen Bereitstellung droht kein Ärger
- Zugriff auf öffentliche Ordner bzw. Zugriffe auf Systeme von vor 20 Jahren – ggf. unterstützen diese Systeme keine aktuellen Ciphers, ferner ist der Funktionsmodus generell seit Exchange 2016/2019 auf die PublicFolder-Mailbox umgestellt, sollte das Thema interessant sein: Domänen-Funktionseben heraufstufen und Exchange-Migration erstmal abschließen!
Persönlich empfehle ich den Exchange-Server gar nicht im Internet direkt bereitzustellen, sondern ehr alle Smartphones/Endgeräte über VPN oder per privaten APN vom Provider (indirektes VPN für Smartphones/mobile Endgeräte) in die Firma auszukoppeln.
2. Notwendige Sicherheitsvorlagen (TLS 1.2) aktivieren
Die Deaktivierung von NTLMv1 sollte schon durch das Hochstufen auf das Domänen-Funktions-Level „Windows Server 2016“ stattgefunden haben,
ferner kümmern wir uns also direkt um die korrekten TLS 1.2 Einstellungen, siehe TLS Sicherheitseinstellungen.
Bitte in einer administrativen Powershell folgendes einfügen, um .Net Framework 4.0 und TLS 1.2 zu konfigurieren:
# Enable .NET Framework 4.x Schannel inheritance
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319" -Name "SystemDefaultTlsVersions" -Value 1 -Type DWord
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\.NETFramework\v4.0.30319" -Name "SchUseStrongCrypto" -Value 1 -Type DWord
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319" -Name "SystemDefaultTlsVersions" -Value 1 -Type DWord
Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319" -Name "SchUseStrongCrypto" -Value 1 -Type DWord
# Enable TLS 1.2
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols" -Name "TLS 1.2" -ErrorAction SilentlyContinue
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2" -Name "Client" -ErrorAction SilentlyContinue
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2" -Name "Server" -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" -Name "DisabledByDefault" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" -Name "Enabled" -Value 1 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" -Name "DisabledByDefault" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server" -Name "Enabled" -Value 1 -Type DWord
3. alte Sicherheitsvorlagen (veraltete Ciphers) deaktivieren
Bitte in einer administrativen Powershell folgendes einfügen, um alles älter als TLS1.2 zu deaktivieren:
# Disable TLS 1.1
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols" -Name "TLS 1.1" -ErrorAction SilentlyContinue
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1" -Name "Client" -ErrorAction SilentlyContinue
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1" -Name "Server" -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client" -Name "DisabledByDefault" -Value 1 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server" -Name "DisabledByDefault" -Value 1 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server" -Name "Enabled" -Value 0 -Type DWord
# Disable TLS 1.0
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols" -Name "TLS 1.0" -ErrorAction SilentlyContinue
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0" -Name "Client" -ErrorAction SilentlyContinue
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0" -Name "Server" -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client" -Name "DisabledByDefault" -Value 1 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server" -Name "DisabledByDefault" -Value 1 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server" -Name "Enabled" -Value 0 -Type DWord
# Configure client and server TLS renegotiation strict mode
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL" -Name "AllowInsecureRenegoClients" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL" -Name "AllowInsecureRenegoServers" -Value 0 -Type DWord
# Disable outdated ciphers and hashes
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL" -Name "Hashes" -ErrorAction SilentlyContinue
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL" -Name "Ciphers" -ErrorAction SilentlyContinue
(Get-Item HKLM:).OpenSubKey("SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers", $true).CreateSubKey("DES 56/56")
(Get-Item HKLM:).OpenSubKey("SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers", $true).CreateSubKey("NULL")
(Get-Item HKLM:).OpenSubKey("SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers", $true).CreateSubKey("RC2 40/128")
(Get-Item HKLM:).OpenSubKey("SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers", $true).CreateSubKey("RC2 56/128")
(Get-Item HKLM:).OpenSubKey("SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers", $true).CreateSubKey("RC2 56/56")
(Get-Item HKLM:).OpenSubKey("SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers", $true).CreateSubKey("RC4 40/128")
(Get-Item HKLM:).OpenSubKey("SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers", $true).CreateSubKey("RC4 56/128")
(Get-Item HKLM:).OpenSubKey("SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers", $true).CreateSubKey("RC4 64/128")
(Get-Item HKLM:).OpenSubKey("SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers", $true).CreateSubKey("RC4 128/128")
(Get-Item HKLM:).OpenSubKey("SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers", $true).CreateSubKey("Triple DES 168")
New-Item -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Hashes" -Name "MD5" -ErrorAction SilentlyContinue
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\DES 56/56" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\NULL" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC2 40/128" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC2 56/128" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC2 56/56" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 64/128" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 128/128" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\Triple DES 168" -Name "Enabled" -Value 0 -Type DWord
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Hashes\MD5" -Name "Enabled" -Value 0 -Type DWord
# Configure the elliptic curve preference
Disable-TlsEccCurve -Name "curve25519"
Enable-TlsEccCurve -Name "NistP384" -Position 0
Enable-TlsEccCurve -Name "NistP256" -Position 1
4. SSL-Weiterleitung deaktivieren
Falls dies noch aktiviert ist, bitte daran denken – der Reverse-Proxy wird hierdrüber nicht erfreut sein – bzw. der Client!
Set-OutlookAnywhere 'HOSTNAME\RPC (Default Web Site)' -SSLOffloading $false -InternalClientsRequireSsl $true -ExternalClientsRequireSsl $true
5. Skript herunterladen, erweiterte EAP aktivieren
Bitte das Skript herunterladen, sinnvoller Weise vom Anbieter (Microsoft):
- Skript auf Github: https://microsoft.github.io/CSS-Exchange/Security/ExchangeExtendedProtectionManagement/
- vom Blog, Stand 21.02.2024: ExchangeExtendedProtectionManagement
Dann das Skript über eine administrative Powershell ausführen:
cd C:\Users\DeinBenutzer\Downloads\
.\ExchangeExtendedProtectionManagement.ps1
Im Zweifel die Ausführung des Skriptes bestätigen und danach bestätigen, dass das Skript seine Arbeit tätigen soll.
Falls bestimmte Server in der Organisation ausgeschlossen werden sollen, so die Parameter des Skriptes berücksichtigen,
siehe Skript auf Github: https://microsoft.github.io/CSS-Exchange/Security/ExchangeExtendedProtectionManagement/.
6. Testläufe
Anregungen für Testläufe:
- Server neu starten, prüfen ob danach noch alle Dienste laufen
- Anmeldung via Outlook am Exchange
- Anmeldung via Outlook von extern über den Reverse-Proxy am Exchange
- Anmeldung am Outlook Web Access, Netscape 4.0 könnte Schwierigkeiten mit TLS 1.2 haben!
7. Cipher-Suites des Betriebssystems einschränken
Wer sich den Artikel unter TLS Sicherheitseinstellungen durchgelesen hat, dem dürfte die Empfehlung Microsofts zu Anpassung der im Windows bereitgestellten Cipher-Suites aufgefallen sein.
Generell ein kurzer Hinweis für die Übereifrigen:
- TLS 1.3 – Unterstützt nicht alle Systemdienste wie RDP und sollte daher nicht allein erzwungen werden
- TLS 1.2 – passt für die Microsoft internen Dienste, solange keine Drittherstellerprodukte auf den Exchange installiert sind: machbar
- TLS 1.1 und älter – ist Standard bei Microsoft, da meist sonst die Abhängigkeiten zu Drittherstellern nicht gegeben sind
(bei uns im Testlauf ein altes StarMoney etc. in der Domäne)
Ich würde Tatsächlich empfehlen, das Level über eine Gruppenrichtlinie generell in der Domäne anzuheben. (das schwächste Glied einer Kette…usw.)
Definitiv sollte dies aber vorher getestet werden, da hier eben alle installiere Software der Systeme beeinträchtigt wird!
Einen Artikel hierzu findest du hier.