Tls fallback scsv windows

My previous article has gained a lot of attention as a reference point on how to score the highest A+ rating on the Qualys SSL Test. In doing so, site admins are ensuring that the TLS configuration on their server offers up to date and robust security to their users. Focused around my own NginX install on Ubuntu, my previous article didn’t cater for Windows Server admins. This is for you guys!

Setting up on Windows

Most of the configuration here takes place in the registry but I’ve used a nice little tool in the past to give me a GUI for configuring TLS settings. IIS Crypto, a free tool from Nartac Software, makes configuring everything just a few clicks instead of manually creating and modifying registry key values. Grab yourself a copy from the link to get started.

IIS Crypto Download

Protocols

Following on from my previous blog on POODLE, the choice of protocols we should use has been taken from 4 down to 3. Those are the TLSv1.0, TLSv1.1 and TLSv1.2 protocols. Go ahead and select those in the ‘Protocols Enabled’ section.

Protocol Selection

Ciphers Enabled

This section allows you to narrow down the range of cipher suites for later refinement and ordering. The only options I’d recommend selecting here are the 3DES, or Triple DES, suites and both AES selections. The use of RC4 suites is now questionable, RC2 and DES should not be used and NULL ciphers offer no protection at all!

Ciphers Enabled

Hashes Enabled

Like the Ciphers Enabled section, this section allows you to further narrow down the ciphers suites you have available based on the hash algorithm used for Message Authentication Codes. In this section, MD5 should be disabled as it is now proven to be too weak but any variant of SHA is currently acceptable for use.

Hashes Enabled

Key Exchanges Enabled

All of the listed options for key exchange mechanisms can be selected. The Diffie-Hellman and PKCS (Public Key Cryptography Standard) options use the time tested RSA key exchange and the ECDH (Elliptic Curve Diffie Hellman) option uses ECC (Elliptic Curve Cryptogrpahy) instead.

Key Exchange Enabled

Cipher Suites Ordering

The ordering of your cipher suites can have a huge impact on the effectiveness of your TLS implementation. It can be the difference between having Perfect Forward Secrecy or not, based on which cipher suite your server prefers the most. ECDHE (TLS_ECDHE_RSA) suites should be prioritised over all others as they offer PFS support and are faster than the DHE equivalents. You can then follow these with DHE (TLS_DHE_RSA) suites to offer robust PFS support for slightly older devices and browsers too. After we’ve prioritised suites that give us PFS, you can introduce RSA for the key exchange (TLS_RSA) for clients that don’t support ECDHE or DHE suites. All that will leave you with is cipher suites for use with ECDSA certificates (TLS_ECDHE_ECDSA). If you don’t have an ECDSA certificate, and the chances are you don’t, then you could disable these cipher suites as they will never be negotiated. That said, there isn’t really any harm in keeping them for exactly the same reason. The last thing to check is that the TLS_RSA_WITH_RC4_128_SHA suite is disabled. Here are the cipher suites in order.

Ciphers Part 1

Ciphers Part 2

Ciphers Part 3

All you need to do now is hit the ‘Apply’ button and restart the server for the registry changes to take effect. It’s a bit of pain on Windows to have to reboot the server instead of just reloading the configuration but it can’t be avoided. Once your server has rebooted you can head over to the Qualys Test and check the score for your domain. Everything so far should get you up to an A, read on to get it up to an A+.

OCSP Stapling

OCSP Stapling is enabled by default and is supported on Windows Server 2008 and later. Whilst it doesn’t directly affect your Qualys SSL score, it is highly recommended that you utilise OCSP Stapling for the benefits I’ve outlined in the linked article. Fortunately, you don’t need to do anything for this one!

Perfect Forward Secrecy

Perfect Forward Secrecy is a feature of certain key agreement protocols that can protect encrypted session data even in the event of a compromise of the server private key. By supporting and prioritising ECDHE and DHE suites, your server will have robust support for PFS.

SHA1 VS SHA256 Certificates

Google recently announced that following the deprecation of SHA1 in 2011 they are starting the sunsetting process for the cryptographic hash. Announced on their Online Security Blog, users will soon start to see various HTTPS warning indicators on websites that still use SHA1 certificates or chains that contain SHA1 certificates. You can read more details in the linked article. Due to this, Qualys have updated their SSL Test to indicate when a certificate, either the leaf or a certificate in the chain, is using SHA1. Using a SHA1 certificate will now prevent you from getting an A+ and you will see something like this.

SHA1 penalty

To prevent this you will need to replace any SHA1 leaf certificates and update your certificate chain to ensure that any intermediate certificates are also SHA256. The root certificate in the chain does not need to be SHA1.

TLS_FALLBACK_SCSV

(Updated 11th Jan 2015)

TLS_FALLBACK_SCSV is a Signalling Cipher Suite Value (the SCSV part) that allows a browser to indicate to a server when the current connection attempt is a fallback attempt. When present in the client hello, the server knows that the connecting client can use a better protocol than it is currently connecting with and will reject the connection. TLS_FALLBACK_SCSV gained a lot of popularity after POODLE as it would prevent clients that supported TLS from being forced back to SSLv3 to be attacked. It’s a great feature to support on your server as it will prevent a client being forced back from TLSv1.2 to TLSv1.1 for example. We don’t really want to be in a situation where an attacker can dictate the protocol we use to communite so TLS_FALLBACK_SCSV is highly advised.

TLS_FALLBACK_SCSV

Unfortunately, changes to the Qualys SSL Test since I started writing this article now require TLS_FALLBACK_SCSV support to get an A+ rating, but Microsoft has not released support in IIS. This means that all Windows Servers will be capped at an A rating until support is introduced. Thanks to Nick Lowe for pointing out these changes on Twitter. I will update the article again once this feature is supported in IIS.

Update: Ivan Ristic, creator of the Qualys SSL Test, has confirmed that you can get an A+ by only supporting the TLSv1.2 protocol. This technically means that your server isn’t vulnerable to protocol downgrade attacks as there are no protocols to downgrade to! This may not be ideal for everyone and waiting for TLS_FALLBACK_SCSV support may be the only choice.

@Scott_Helme Yes, it can. The reasoning being that downgrade attacks are not possible against a server that supports only one pro to version

— Ivan Ristic (@ivanristic) January 12, 2015

Strict Transport Security

Everything I’ve covered so far will get you an A rating on the Qualys SSL Test. To improve that rating to an A+ you need to issue a HTTP Strict Transport Security policy. I’ve covered HSTS before (HSTS — The Missing Link In Transport Layer Security), but in essence this little HTTP response headers allows a host to tell the user agent to enforce SSL on their site without depending on things like 301 redirects. To issue a HSTS policy, all that we need to do is add a custom response header. Open up IIS Manager and navigate to the site that you want to add the header to. In the Home window, double click on the ‘HTTP Response Headers’ icon.

IIS HTTP Response Headers

Once there, click the ‘Add’ button in the ‘Actions’ pane.

Add header

Now we need to fill out the details for our new custom header. The header name is strict-transport-security and the minimum we require in the ‘Value’ field is the max-age directive to make it a valid policy. This is the length of time that SSL/TLS will be enforced on the site and I use the value 31536000 which is 1 year (in seconds). That would give you max-age=31536000 in the ‘Value’ field. To take HSTS one step further, you can also include the includeSubdomains directive, which tells the browser to apply the policy to all subdomains of the site issuing it, as you probably guessed! This gives a ‘Value’ field of max-age=31536000; includeSubdomains.

Click OK to add your header and we’re all good to go! If you like, the header can also be added in the web.config like so.

IIS Web.config file

Now that’s done, run your site through the Qualys SSL Test and check out your results.

Read More: Getting an A+ on the Qualys SSL Test — Linux Edition

If you want to get notified when I publish a new blog, please consider subscribing!


Tags: PFS, Qualys, SSL, TLS, windows server, OCSP Stapling

Device Services IIS

Disable insecure TLS/SSL protocol support
— Yes, you can disable this and this will not have any impact on AirWatch Applications because we have made the necessary changes in our components as well. 
POODLE attack, SSLv3 etc have been taken care by our developers in console version 8.1 and above.

Remove the default page or stop/disable the IIS server
— Yes, you can remove the default page, but do not disable the IIS server. Recommended not to disable the IIS server.

Disable TLS/SSL support for RC4 ciphers

  •  Please refer the below link for disabling RC4 cipher.
    https://support.microsoft.com/en-us/kb/245030
    https://support.microsoft.com/en-us/kb/2868725 

Disable SSLv2, SSLv3, and TLS 1.0

  • This will not have any impact on the AirWatch application and you can have this disabled. Best solution for this will be to enable TLS1.2
    https://support.microsoft.com/en-us/kb/187498

Regarding Ciphers suites

  •  Be it any kind of Ciphers(Static key cipher, 3DES cipher, Strong cipher) the best solution for this  is to enable TLS. Also, the MicrosoftKB article 245030 as mentioned in the ticket is the best solution for all the Cipher questions.
    https://support.microsoft.com/en-us/kb/245030

The RC4 cipher can be completely disabled on Windows platforms by setting the “Enabled” (REG_DWORD) entry to value 00000000 in the following registry locations:

• HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 128/128
• HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128
• HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128

Disabling SSL and enabling TLS is out of Airwatch’s scope as you have to make registry changes locally on the server:

Disabling SSL 3.0- https://www.digicert.com/ssl-support/iis-disabling-ssl-v3.htm
Enabling TLS — https://support.quovadisglobal.com/KB/a433/how-to-enable-tls-12-on-windows-server-2008-r2.aspx
https://www.hass.de/content/setup-your-iis-ssl-perfect-forward-secrecy-and-tls-12

Disabling RC4 on Java:
http://stackoverflow.com/questions/18589761/restict-cipher-suites-on-jre-level

Example:

jdk.certpath.disabledAlgorithms=MD2
jdk.tls.disabledAlgorithms=MD5, SHA1, RC4, RSA keySize < 1024

We can either do it at a JRE system wide level or at a JVM instance (such as AWCM) level adding RC4 as a disabled algorithm when a choice has to be made as part of SSL handshake.
In the latter case, It will be a config change on AWCM Service parameters (only change being the added restriction option in $AWCM_HOME/service/AWCMService.exe.parameters).


Tip

IIS Crypto Tool can be used to turn off weak ciphers in Windows Server 2008+


Warning

Usage of iiscrypto tool to disable Cipher Suites, as well as registry keys can break communication between AirWatch components.

Use with extreme caution, ONLY AFTER AirWatch was deployed and tested to be working. Disable Cipher Suites one by one and re-test AirWatch functionality after each change!

Security scanner sees IIS vulnerabilities:

  • SWEET32
  • POODLE
  • TLS_FALLBACK_SCSV

Hardening:

  • POODLE — need to disable SSL 3.0 protocol. Open registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\Schannel\Protocols and create keys SSL 3.0\Server (if not created previously), create a DWORD value Enabled = 0;

  • SWEET32 — need to disable weak ciphers. Open registry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\Triple DES 168, create a DWORD value Enabled = 0. Create keys “RC4 56/128”, “RC4 40/128”, “RC4 128/128” create a DWORD value in all keys called Enabled = 0;


Warning

When turning off Triple DES the RDP protocol to server may stop working. Need to patch RDP to use modern ciphers to solve this problem.

  • TLS_FALLBACK_SCSV (only for Windows 2003-2008! see KB from Microsoft: https://support.microsoft.com/kb/980436/en-us) — Open registry: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SecurityProviders\SCHANNEL and create DWORD called UseScsvForTls with parameters:
    • UseScsvForTls = 0 # Client sends Renegotiation Info extension for TLS protocol
    • UseScsvForTls = 1 # Client sends SCSV for TLS protocol — use this to solve problem


Warning

AirWatch Self-Service portal uses TLS1.0/RC4-type cryptography, and gives Error and blank page after IIS hardening!

iOS 11 & Wi-Fi TLS 1.2 Requirements

With the release of iOS 11, TLS 1.2 will now be the default for EAP-TLS negotiation. This may cause an issue with older clients that still need to connect on TLS 1.0 or 1.1. Apple has allowed for a method to override this default setting with a configuration profile sent down to the device via MDM. In order to ensure your iOS devices maintain Wi-Fi connection when upgrading to iOS 11, please follow the steps below:

Note: If you already have a successfully deployed iOS Wi-Fi with EAP-TLS configured, skip to step 3. 

  1. Create a new profile with a Wi-Fi payload using EAP-TLS and General payload configured.
  2. Ensure that the profile successfully configures Wi-Fi on an iOS device.
  3. From your profile list view, select the Wi-Fi with EAP-TLS created profile and choose to view XML.
  4. Export or copy the XML of the profile.
  5. Edit the XML to remove everything prior to the first and after its corresponding .
  6. Edit the XML again to add the following bolded key/values (accepted values are 1.0, 1.1, and 1.2). These should be a part of the EAPClientConfiguration key
<key>EAPClientConfiguration</key>
<dict>
<key>AcceptEAPTypes</key>
<array>
<integer>13</integer>
</array>
<key>TLSMaximumVersion</key>
<string>1.1</string>
<key>TLSMinimumVersion</key>
<string>1.0</string>
</dict>
  • Edit the XML a final time to create a unique identifier for the payload. Locate the PayloadUUID key and edit the values that correspond to the ‘X’s to random values. Please ensure these values are as random as possible to avoid issues with duplicate identifiers (e.g. 123456, 111111, 101010).
<key>PayloadUUID</key>
      <string>352B3FD9-B875-45C5-AA0E-AAFEE3XXXXXX</string>
  1. Create another new profile and configure the General payload
  2. Paste your edited XML into the Custom Settings payload and publish to devices

IISCrypto config from AirWatch

iOS supports all latest ciphers and encryptions – however there are questions with Android, so Android 4.4 will be the baseline.

Protocols:  SSL 2.0, SSL 3.0, TLS 1.0, TLS 1.1 can be turned off as all of the platforms supports newer protocols.


Warning

Test results at client site (AirWatch ver. 9.2.3): disabling TLS 1.0 showed 4 services failing at AirWatch Device Services Server role — proceed with caution!


Cipher Suites, which can be turned off…

TLS_RSA_WITH_AES_256_GCM_SHA384 (0x9d)   WEAK 256

TLS_RSA_WITH_AES_256_CBC_SHA256 (0x3d)   WEAK 256

TLS_RSA_WITH_AES_256_CBC_SHA (0x35)   WEAK 256

TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA (0xc012)   WEAK 112

TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA (0xc008)  WEAK 112

TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA (0x16)   WEAK 112

TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA (0x13)   WEAK 112

TLS_RSA_WITH_3DES_EDE_CBC_SHA (0xa)   WEAK 112

TLS_RSA_WITH_AES_128_GCM_SHA256 (0x9c)   WEAK 128

TLS_RSA_WITH_AES_128_CBC_SHA256 (0x3c)   WEAK 128

TLS_RSA_WITH_AES_128_CBC_SHA (0x2f)   WEAK 128

TLS_ECDHE_RSA_WITH_RC4_128_SHA (0xc011) INSECURE 128

TLS_ECDHE_ECDSA_WITH_RC4_128_SHA (0xc007) INSECURE 128

TLS_RSA_WITH_RC4_128_SHA (0x5) INSECURE 128

TLS_RSA_WITH_RC4_128_MD5 (0x4) INSECURE 128

VMware Assist

External link: https://stackoverflow.com/questions/52212866/how-can-i-disable-tls-rsa-with-aes-128-cbc-sha-without-disabling-others-as-well

Hardening Assist is basically hardening of Java, disabling TLS_RSA_WITH_AES… in it.
Delete RSA Keysize, and add specific protocols.

Время на прочтение7 мин

Количество просмотров36K

Интересующиеся веб-безопасностью хабражители уже в курсе очередной уязвимости в SSL, именуемой POODLE. Мы подробно рассмотрим, что же собой представляет эта уязвимость и каким именно образом позволяет злоумышленнику добраться до, казалось бы, защищенных данных пользователя, а также расскажем, как с этим зверем справилась команда Mail.Ru Group.

Исчерпывающее объяснение механизма использования POODLE приводится в статье This POODLE Bites: Exploiting The SSL 3.0 Fallback; ниже мы приводим перевод этой статьи.

Тем же, кого не слишком интересуют детали деятельности зловредного пса, напомним, что POODLE – это уязвимость в SSL 3, старой версии протокола, доживающей второй десяток. Существует два способа борьбы с уязвимостью:

  • Поставить на сервер патч, запрещающий в процессе хэндшейка откатываться на SSL3 при невозможности подключиться по TLS. Загвоздка в том, что такой метод работает, только если патч стоит и на сервере, и на клиенте. В настоящее время это реализовано только у Google Chrome (начиная с февраля 2014 года) и планируется в ближайшем обновлении Firefox. Получается, что обеспечение безопасности пользователей в определенной мере ложится на плечи самих пользователей.
  • Отключить SSL 3 на серверах, да и дело с концом. Просто и элегантно, но есть одно «но». Большая часть браузеров использует TLS версии 1.0 и выше, однако в мире все еще остались люди, не готовые расстаться с наследием прошлого, именуемым Internet Explorer версии 6, который просто не поддерживает новые версии протокола в конфигурации по умолчанию.

Наша статистика показывает, что через IE6 в Почту Mail.Ru заходят 0,2% пользователей. И, хотя в абсолютных величинах это не такая уж маленькая цифра, мы считаем, что безопасность — прежде всего. Поэтому мы отключили возможность соединения с клиентом по SSL3 в Почте, Облаке, Календаре, авторизационном центре и «Mail.Ru для бизнеса».

Для пользователей IE6 это означает, что Почта Mail.Ru, равно как и другие сервисы, выбравшие такой способ борьбы с POODLE, больше не будут им доступны. Вряд ли среди аудитории Хабра много приверженцев IE6, но советуем убедиться, что ваши родственники и друзья, не слишком дружащие с современными технологиями, обновили свои браузеры.

В случае с сервисами, которые предпочли первый способ защиты от уязвимости, если вы – пользователь Chrome, регулярно обновляющегося автоматически, – поздравляем, вы защищены. Если же вы предпочитаете другие браузеры, рекомендуем пользоваться свежим Chrome по крайней мере при доступе к общественному Wi-Fi, ведь именно в этом случае вы уязвимы. Почему именно тогда? Об этом можно узнать из предложенного ниже перевода.

SSL 3.0 [RFC6101] — это устаревший и небезопасный протокол. При решении большинства практических задач его уже заменили преемники, протоколы TLS 1.0 [RFC2246], TLS 1.1 [RFC4346] и TLS 1.2 [RFC5246], однако в них сохраняется обратная совместимость с SSL 3.0 для взаимодействия со старыми системами. Это позволяет избежать проблем с клиентскими устройствами при внедрении новых версий протоколов на серверах.

Но даже если и клиент, и сервер поддерживают TLS, то уровень безопасности в SSL 3.0 — вопрос все еще актуальный, поскольку многие клиенты применяют более старые протоколы, чтобы справляться с багами совместимости с серверами. И здесь мы хотели бы обсудить, как злоумышленники могут использовать эту ситуацию и взламывать протокол SSL 3.0. Речь пойдёт о POODLE-атаке (Padding Oracle On Downgraded Legacy Encryption), благодаря которой можно, например, перехватывать Secure HTTP-куки или содержимое заголовков HTTP-авторизации.

Мы также порекомендуем, какие нужно принять меры на клиентах и серверах, чтобы противостоять подобной атаке. Если простое отключение SSL 3.0 вам не подходит по причинам совместимости, то в имеющихся версиях TLS нужно использовать TLS_FALLBACK_SCSV.

Описание POODLE-уязвимости

Для обеспечения совместимости со старыми версиями серверов многие TLS-клиенты используют downgrade dance: сначала делается попытка установления связи по протоколу последней версии. Если связь не устанавливается, делается новая попытка, но уже по более старому протоколу. В отличие от нормальной процедуры определения версии, поддерживаемой обеими сторонами (например, клиент обращается по протоколу TLS 1.2, а сервер отвечает по TLS 1.0), вышеописанная схема может быть инициирована из-за сетевых ошибок или действий злоумышленников. Если атакующие, контролирующие сеть на участке между клиентом и сервером, вмешиваются и препятствуют установлению соединения с версией протокола TLS 1.0 или выше, то клиенты сами переходят на использование SSL 3.0.

Протокол использует потоковое шифрование RC4, или блочное шифрование в режиме CBC. Главной проблемой RC4 является наличие смещений: чем больше соединений и потоков шифрования используется для отправки одних и тех же данных (например, пароля или HTTP-куки), тем больше можно извлечь из трафика информации, которая помогает осуществить дешифрование. Ниже будет показано, как можно совместить эффективную атаку на CBC-шифрование при использовании SSL 3.0 (при условии, что злоумышленник может модифицировать сетевой обмен между клиентом и сервером). При этом, в отличие от уязвимостей BEAST и Lucky 13, здесь нет каких-то обходных решений. У нас есть только небезопасный протокол SSL 3.0, и чтобы обеспечить надёжное шифрование, нужно избегать его использования.

Самая серьёзная проблема CBC-шифрования в SSL 3.0 заключается в том, что дополнение блоков (паддинг) может быть произвольным (за исключением последнего байта), на него не распространяется MAC (Message Authentication Code). Целостность дополнения не может быть полностью подтверждена в ходе дешифрования, поскольку в SSL 3.0 сообщение сначала подписывается с помощью MAC, затем дополняется паддингом, и уже после — шифруется блочным шифром. Паддинг от 1 до L байт (где L — размер блока в байтах) используется для получения целого числа блоков перед шифрованием. Легче всего пробить защиту, если есть целый блок паддинга, который (до шифрования) состоит из L-1 произвольных байт, за которыми следует одиночный байт со значением L-1. Для обработки входящей зашифрованной записи C1… Cn, когда также дан вектор инициализации С0 (где каждый Ci — один блок), принимающая сторона сначала определяет P1… Pn как Pi = DK(Ci) ⊕ Ci-1 (DK обозначает расшифровку одного блока с помощью сессионного ключа K). Затем проверяется и удаляется паддинг в конце сообщения и, наконец, проверяется и удаляется подпись MAC.

Если последний блок Cn целиком представляет собой паддинг, и атакующий заменяет Cn на любой более ранний шифрованный блок Ci из того же потока, то сообщение будет всё равно принято, при условии что DK(Ci) ⊕ Cn-1 имеет последний байт L-1, в противном случае он наверняка будет отклонён, что даёт возможность провести атаку Padding Oracle.

Вне лабораторных условий слабость SSL 3.0 может быть использована в MITM-атаках, когда злоумышленник расшифровывает Secure HTTP-куки, используя методику атаки BEAST. Чтобы осуществить POODLE-атаку, нужно:

  • Запустить JS- на www.evil.com, чтобы браузер жертвы отправил содержащий куки HTTPS-запрос на https://example.com
  • Перехватить и модифицировать запись SSL так, чтобы был достаточно большой шанс, что example.com примет изменённую запись. Если это произойдёт, то злоумышленник сможет расшифровать один байт из куки

Допустим, что каждый блок С содержит 16 байт — C[0]… C[15]. Также допустим, что нам стал известен размер куки (ниже покажем, как провести атаку, не зная размера куки). Размер MAC в SSL 3.0 обычно равен 20 байтам, так что «под слоем» CBC зашифрованный POST будет выглядеть так:

POST /path Cookie: name=value…\r\n\r\nbody ǁ 20byteMAC ǁ padding

Злоумышленник контролирует path и тело запроса, и потому может инициировать запросы, удовлетворяющие двум условиям:

  • Паддинг заполняет весь блок (зашифрованный в Cn)
  • Первый, пока ещё неизвестный, байт куки подставляется как последний в более раннем блоке (зашифрованном в Ci)

Далее атакующий заменяет Cn на Ci и перенаправляет эту модифицированную запись на сервер.

Чаще всего сервер её не принимает, и тогда атакующий отправляет новый запрос. Иногда (примерно один раз на 256 попыток) сервер принимает модифицированную запись и атакующий заключает, что Dk(Ci)[15] ⊕ Cn-1[15] = 15, а следовательно Pi[15] = 15 ⊕ Cn-1[15] ⊕ Ci-1[15]. Это раскрывает первый байт куки, до этого неизвестный. Атакующий переходит к следующему байту, одновременно изменяя размеры пути и тела запроса так, чтобы размер запроса не изменился, но местоположение заголовков сдвинулось. Это делается до тех пор, пока кука не будет расшифрована целиком. Ожидаемые общие трудозатраты — 256 запросов SSL 3.0 на один байт.

Поскольку паддинг скрывает точный размер полезного содержимого, размер куки не становится сразу же очевиден. Но запросы GET /, GET /A, GET /AA,… позволяют злоумышленнику вычислить границы блоков. Достаточно максимум 16 подобных запросов, чтобы узнать размер дополнения, а следовательно и размер куки.

Рекомендации

Вышеописанная атака требует соединения по протоколу SSL 3.0, поэтому его отключение в клиенте или на сервере (или с обеих сторон) позволяет полностью избежать неприятностей. Если хотя бы одна сторона поддерживает только SSL 3.0, то здесь медицина бессильна, и необходимо серьёзное обновление, чтобы избежать небезопасного шифрования. Если SSL 3.0 — не единственный поддерживаемый протокол и он не отключён, то тогда атака возможна при downgrade dance (переключении клиента на более низкие версии ради совместимости с сервером).

Отключение SSL 3.0 может быть нецелесообразным, если вам нужно периодически работать со старыми системами. Механизм TLS_FALLBACK_SCSV решает общую проблему для разных версий протокола, и мы полагаем, что это особенно критично для систем, поддерживающих совместимость с SSL 3.0. Ниже объясняется алгоритм работы TLS_FALLBACK_SCSV.

TLS-клиенты, использующие downgrade dance, должны включать значение 0x56, 0x00 в ClientHello.cipher_suites во время каждого даунгрейда версии протокола. Это значение служит сигналом, благодаря которому обновлённые серверы могут отказаться от установления соединения в случае downgrade-атаки. Клиенты должны всегда переходить на следующую более низкую версию (например, если начал с TLS 1.2, то попытаться на TLS 1.1, затем на TLS 1.0, затем SSL 3.0). В случае с TLS_FALLBACK_SCSV, пропуск версии также может помешать успешному соединению.

TLS-серверы, когда во входящем соединении встречается 0x56, 0x00 в ClientHello.cipher_suites, сравнивают ClientHello.cipher_version с самой высокой версией протокола, поддерживаемой сервером. Если сервер поддерживает более высокую версию, чем клиент, то соединение обрывается с ошибкой.

Такое использование TLS_FALLBACK_SCSV даёт уверенность, что SSL 3.0 будет использоваться только при работе со старыми системами: атакующие не могут более инициировать понижение версии протокола. Если же обе стороны допускают использование SSL 3.0, но одна из них не поддерживает TLS_FALLBACK_SCSV, то атака всё ещё возможна.

Список литературы

  • [BEAST] T. Duong, J. Rizzo: “Here Come The ⊕ Ninjas”, 2011.
  • [draft-ietf-tls-downgrade-scsv-00] B. Möller, A. Langley: “TLS Fallback Signaling Cipher Suite Value (SCSV) for Preventing Protocol Downgrade Attacks”, Internet-Draft draft-ietf-tls-downgrade-scsv-00, 2014.
  • [Lucky13] N.J. AlFardan, K.G. Paterson: “Lucky Thirteen: Breaking the TLS and DTLS Record Protocols”, IEEE Symposium on Security and Privacy, 2013.
  • [RC4biases] N.J. AlFardan, D.J. Bernstein, K.G. Paterson, B. Poettering, J.C.N. Schuldt: “On the Security of RC4 in TLS and WPA”, USENIX Security Symposium, 2013.
  • [RFC2246] T. Dierks ,C. Allen: “The TLS Protocol Version 1.0”, RFC2246, 1998.
  • [RFC4346] T. Dierks, E. Rescorla: “The Transport Layer Security (TLS) Protocol Version 1.1”, RFC4346, 2006.
  • [RFC5246] T. Dierks, E. Rescorla: “The Transport Layer Security (TLS) Protocol Version 1.2”, RFC5246, 2008.
  • [RFC6101] A. Freier, P. Karlton,P. Kocher: “The Secure Sockets Layer (SSL) Protocol Version 3.0”, RFC6101, 1996(published as Historic RFC in 2011).
  • [tlscbc] B. Möller: “Security of CBC Ciphersuites in SSL/TLS: Problems and Countermeasures”, http://www.openssl.org/~bodo/tlscbc.txt, 2004.

TLS_FALLBACK_SCSV is a TLS Signaling Cipher Suite Value (SCSV) that can be used to guard against protocol downgrade attacks. The extension can be useful for clients like web browsers, which fall back to a lesser protocol version if attempts to use a higher protocol version fail.

In the attack, the adversary would force a negotiation failure of a higher protocol like TLS 1.2 or 1.1 in hopes the client will retry with TLS 1.0 or SSLv3. Then, the adversary will use defects in the down level protocols to carry out other attacks. Table 1 below lists some of the losses that could occur when traversing down protocol versions.

Protocols, Downgrades and Features

Desired Protocol Downgraded Protocol Loss on Downgrade
TLS 1.2 TLS 1.1 AEAD cipher suites (CCM, GCM, etc)
TLS 1.1 TLS 1.0 Perfect Forward Secrecy (PFS)
TLS 1.0 SSL v3 Too many to list[1]

[1] See Differences Between SSLv2, SSLv3, and TLS and This POODLE Bites: Exploiting The SSL 3.0 Fallback.

The SSL_MODE_SEND_FALLBACK_SCSV extension can be used to remediate the POODLE bug by ensuring clients don’t fall back to SSLv3 if the client performs fallbacks. However, the extension does not fix the underlying padding oracle. Rather, it just avoids the defective protocol version.

SCSV means TLS_FALLBACK_SCSV shows up as a cipher suite in the ClientHello. The spurious cipher is added to the cipher suites if the SSL_MODE_SEND_FALLBACK_SCSV option is present.

Note Well: if the client does not perform fallbacks, then the TLS_FALLBACK_SCSV extension is not needed.

Reason for the Extension[edit]

Browsers and other similar software attempt to support every server created on {God|Allah|Brahman|…}’s green earth. If the browser attempts to connect to 1990s era server and the connection fails, then the browser will fallback to a lesser protocol. It falls back to a lesser protocol by initiating a new connection with the down level protocol.

Its curious why the browsers chose to compromise the security of the dominant/standard use cases for a trivial minority. The W3C clearly states two design principals: Secure By Design and Priority of Constituencies. When a browser falls back to insecure protocols when the user asks for a secure scheme, they violate both principals.

The browsers could have provided modern TLS support with 15 or 20 reasonable ciphers (or let the users choose their vanity ciphers); and then require a plug-in to achieve the existing insecure behavior. Browsers seem more than happy to require plug-ins for the most basic functionality, like opening a homepage (try to get Chrome, Firefox or Opera to open your homepage on a new tab).

Even more befuddling, the SSL_MODE_SEND_FALLBACK_SCSV is not needed now that SSLv3 is insecure due to the padding oracle (as if Loern Weith was not clear that SSLv3 was insecure in 2006). In fact, the down level software that is part of the problem likely won’t be updated to understand the TLS extension anyway.

Avoiding the Extension[edit]

As stated earlier, SSL_MODE_SEND_FALLBACK_SCSV is not needed if the client does not perform fallbacks. The easiest way to avoid use of the SSL_MODE_SEND_FALLBACK_SCSV is to always specify the protocols you are willing to accept. The detail is you always send the highest protocol version with the ClientHello.

For example, suppose you want to accept TLS 1.0 through TLS 1.2. In this case, you send a ClientHello with that information, and you don’t include SSL_MODE_SEND_FALLBACK_SCSV. Below is a portion of the code to do so (its likely similar to the code you have been using for years):

const SSL_METHOD* method = SSLv23_method();
if(method == NULL)) handleFailure();

SSL_CTX* ctx = SSL_CTX_new(method);
if(ctx == NULL) handleFailure();

const long flags = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3 | SSL_OP_NO_COMPRESSION;
SSL_CTX_set_options(ctx, flags);

In the code above, the SSLv23_method enables all protocol version — from SSLv2 through TLS 1.2. The method is then used to create a context object. After the context object is created, weak/wounded/broken protocols and options are removed by setting SSL_OP_NO_SSLv2, SSL_OP_NO_SSLv3 and SSL_OP_NO_COMPRESSION.

The ClientHello will set a minimum protocol version of TLS 1.0 and a maximum protocol version of TLS 1.2 in the ClientHello. The TLS protocol ensures TLS 1.2 is used if available; and TLS 1.1 is used is TLS 1.2 is not available; and TLS 1.0 is used if TLS 1.2 and 1.1 are not available. During key exchange, the ClientHello is MAC’d and used (in part) to derive the premaster_secret, so tampering with protocol versions will be detected.

When TLS 1.3 is added to OpenSSL, it will include TLS 1.3. You won’t have to change your code.

Using the Extension[edit]

If you need to use the extension, then the following is an example of how to use it:

const SSL_METHOD* method = TLSv1_2_method();
if(method == NULL)) handleFailure();

SSL_CTX* ctx = SSL_CTX_new(method);
if(ctx == NULL) handleFailure();

#ifdef SSL_MODE_SEND_FALLBACK_SCSV
    SSL_CTX_set_mode(ctx, SSL_MODE_SEND_FALLBACK_SCSV)
#endif

Some folks on the OpenSSL mailing list recommend using TLS_FALLBACK_SCSV and SSL_MODE_SEND_FALLBACK_SCSV whenever available. See, for example, Use of TLS_FALLBACK_SCSV on the OpenSSL mailing list.

[edit]

Below are some discussions that occurred on the OpenSSL and IETF mailing lists and around the web.

  • Context options and SSL_MODE_SEND_FALLBACK_SCSV
  • Use of TLS_FALLBACK_SCSV
  • Please document the new SSL_MODE_SEND_FALLBACK_SCSV
  • Working Group Last Call for draft-ietf​-tls-downg​rade-scsv-​00
  • The TLS_FALLBA​CK_SCSV time bomb
  • SSL is dead, long live TLS

Stay tuned for
more insights

A TLS service was found not support the TLS_FALLBACK_SCSV cipher suite value. This cipher value was implemented by OpenSSL to protect against inappropriate downgrades to weaker encryption protocols such as TLSv1.0 and SSLv3.

  • For servers which do not support weak SSL/TLS protocols, there is no practical value added by adding support for this feature.
  • For servers which do support weak SSL/TLS protocols, this feature is not an effective replacement for disabling these weak protocols.

Active Downgrade Attacks

Attackers with network level access between client and server applications have been known to attempt downgrade attacks; where the malicious actor forces a client to negotiate to a weaker or known vulnerable encryption scheme. This encrypted session can then be later broken or decrypted by the malicious actor.

Signaling Cipher Suite Value (SCSV) Mitigation

To help mitigate unwanted or malicious downgrade attacks, a new cipher suite value was created:

TLS_FALLBACK_SCSV          {0x56, 0x00}

This cipher suite is not a valid crypto system, however serves as a flag to clients when the current protocol is not the server’s highest strength protocol. This system is a backwards compatible way to cause a fatal error with existing downgrade protocols and mitigate downgrade attacks.

References:

https://tools.ietf.org/html/rfc7507
https://www.openssl.org/news/secadv/20141015.txt

Remediation

For most server configurations TLS_FALLBACK_SCSV support can be implemented by updating OpenSSL:

  • OpenSSL 1.0.1 users should upgrade to 1.0.1j
  • OpenSSL 1.0.0 users should upgrade to 1.0.0o
  • OpenSSL 0.9.8 users should upgrade to 0.9.8zc

We are not aware of IIS or Microsoft support at the time of this writing.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Отключить тач windows 10
  • Windows 10 1809 обзор
  • Src repair для windows
  • Как узнать параметры сетевой карты на windows 10
  • Windows live movie maker windows live movie maker windows live movie maker