手動調整Windows的TLS設定
在Azure VM上有個高風險警告,原本以為用之前「停用不安全的TLS版本」的IISCrypto工具處理即可,以下借用黑大的PowerShell取得IISCrypto套用的結果。
PS D:\> Get-ChildItem -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers'
Hive: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers
Name Property
---- --------
AES 128/128 Enabled : 4294967295
AES 256/256 Enabled : 4294967295
DES 56/56 Enabled : 0
NULL Enabled : 0
RC2 128/128 Enabled : 0
RC2 40/128 Enabled : 0
RC2 56/128 Enabled : 0
RC4 128/128 Enabled : 0
RC4 40/128 Enabled : 0
RC4 56/128 Enabled : 0
RC4 64/128 Enabled : 0
Triple DES 168 Enabled : 4294967295
PS D:\> Get-ChildItem -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\' -Recurse |
>> ForEach-Object {
>> $p = Get-ItemProperty -Path $_.PSPath
>> if ('Enabled' -in $p.PSObject.Properties.Name) {
>> $_.PSPath.Split(':')[2]
>> "Enabled = $($p.Enabled)"
>> }
>> }
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Client
Enabled = 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\Multi-Protocol Unified Hello\Server
Enabled = 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Client
Enabled = 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Server
Enabled = 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client
Enabled = 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server
Enabled = 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client
Enabled = 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server
Enabled = 0
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client
Enabled = 4294967295
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server
Enabled = 4294967295
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client
Enabled = 4294967295
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server
Enabled = 4294967295
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client
Enabled = 4294967295
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server
Enabled = 4294967295
但沒想到前後調了幾天都沒讓它Pass,最後全部自己手動調整機碼才完成。(時間有點長是因為,調整完要等Azure去重新掃描,好像12小時才一次,因此一天調一次。)
TLS調整這部分的資訊蠻零散,修改前記得相關主題裡的注意事項要看一下,不然修改後出事,我可不負責哦。