简体   繁体   English

为什么POODLE攻击仅在降级到SSL 3.0后才影响?

[英]Why does POODLE Attack only affect after downgrading to SSL 3.0?

I'm wondering which changes from SSL 3.0 to TLS 1.0 exactly fixed the POODLE Attack. 我想知道从SSL 3.0到TLS 1.0的哪些更改完全解决了POODLE攻击。 The Base for this Attack is the Messageblocks M1||MAC||PAD, so a whole Block is used for MAC and Padding. 此攻击的基础是消息块M1 || MAC || PAD,因此整个块都用于MAC和填充。

I have the Idea, that it doesn't work anymore (without downgrading) cause in TLS 1.0 if the last Block is Padding it is 0x101010... (With block size of 16) and not 0xXX...XX10 (XX=Random), so it's a lot more Heavy to guess 16 Bytes directly instead of only the last Byte. 我有一个主意,如果最后一个块正在填充,它在TLS 1.0中将不再起作用(不降级),因为它是0x101010 ...(块大小为16)而不是0xXX ... XX10(XX = Random ),因此直接猜测16个字节(而不是仅最后一个字节)要费劲得多。

But are there any other security parameters that fixed this problem or did I mentioned it right? 但是,还有其他安全参数可以解决此问题吗?或者我提到的对吗? Like is the end of the Messages not ||MAC||PAD anymore? 就像消息的结尾不再|| MAC || PAD吗? Or is the PAD maybe signed or something like that? 还是PAD可能已经签名或类似的东西?

Regards Julian 问候朱利安

SSL 3.0 and TLS 1.0 differ in how they treat the padding. SSL 3.0和TLS 1.0在处理填充方面有所不同。

See https://www.openssl.org/~bodo/ssl-poodle.pdf and this section: 请参阅https://www.openssl.org/~bodo/ssl-poodle.pdf和本节:

The most severe problem of CBC encryption in SSL 3.0 is that its block cipher padding is not deterministic, and not covered by the MAC (Message Authentication Code): thus, the integrity of padding cannot be fully verified when decrypting. SSL 3.0中CBC加密的最严重问题是其块密码填充不确定,并且未被MAC(消息身份验证代码)覆盖:因此,在解密时无法完全验证填充的完整性。 Padding by 1 to L bytes (where L is the block size in bytes) is used to obtain an integral number of blocks before performing blockwise CBC (cipherblock chaining) encryption. 在执行逐块CBC(密码块链接)加密之前,使用1到L个字节填充(其中L是以字节为单位的块大小)来获取整数个块。 The weakness is the easiest to exploit if there's an entire block of padding, which (before encryption) consists of L-1 arbitrary bytes followed by a single byte of value L-1. 如果存在整个填充块(在加密之前)由L-1个任意字节后跟一个值L-1的单个字节组成,则最容易利用此弱点。

The messages in TLS1.0 are still structured the same, see this structure from RFC 2246: TLS1.0中的消息的结构仍然相同,请参阅RFC 2246中的以下结构:

   block-ciphered struct {
       opaque content[TLSCompressed.length];
       opaque MAC[CipherSpec.hash_size];
       uint8 padding[GenericBlockCipher.padding_length];
       uint8 padding_length;
   } GenericBlockCipher;

The padding is defined as such: 填充的定义如下:

Each uint8 in the padding data vector must be filled with the padding length value. 填充数据向量中的每个uint8必须填充有填充长度值。

This is the crucial difference between SSL 3.0 and TLS 1.0 in that regard, which makes the receiver able to check that the padding is right, and not being in fact leftover from valid application data blocks. 在这方面,这是SSL 3.0与TLS 1.0之间的关键区别 ,这使接收器能够检查填充是否正确,而实际上并没有从有效的应用程序数据块中遗留下来。

(compare https://tools.ietf.org/html/rfc6101#section-5.2.3.2 for SSL 3.0 with https://tools.ietf.org/html/rfc2246.html#section-6.2.3.2 for TLS 1.0) (比较https://tools.ietf.org/html/rfc6101#section-5.2.3.2用于SSL 3.0 https://tools.ietf.org/html/rfc2246.html#section-6.2.3.2用于TLS 1.0)

This is also explained on https://www.imperialviolet.org/2014/10/14/poodle.html like that: https://www.imperialviolet.org/2014/10/14/poodle.html上也对此进行了说明,如下所示:

Consider the following plaintext HTTP request, which I've broken into 8-byte blocks (as in 3DES), but the same idea works for 16-byte blocks (as in AES) just as well: 考虑下面的纯文本HTTP请求,我将其分为8个字节的块(如3DES),但同样的想法也适用于16个字节的块(如AES):

[ GET / HT ][ TP/1.1\\r\\n ][ Cookie: ][ abcdefgh ][ \\r\\n\\r\\nxxxx ][ MAC DATA ][ •••••••7 ] [ GET / HT ] [ TP/1.1\\r\\n ] [ Cookie: ] [ abcdefgh ] [ \\r\\n\\r\\nxxxx ] [ MAC DATA ] [ •••••••7 ]

The last block contains seven bytes of padding (represented as •) and the final byte is the length of the padding. 最后一块包含七个填充字节(表示为•),最后一个字节是填充的长度。

[..] [..]

An attacker can't see the plaintext contents like we can in the diagram, above. 攻击者无法像上图所示那样看到纯文本内容。 They only see the CBC-encrypted ciphertext blocks. 他们只看到CBC加密的密文块。 But what happens if the attacker duplicates the block containing the cookie data and overwrites the last block with it? 但是,如果攻击者复制包含cookie数据的块并用它覆盖最后一个块,会发生什么? When the receiver decrypts the last block it XORs in the contents of the previous ciphertext (which the attacker knows) and checks the authenticity of the data. 当接收方解密最后一个块时,它会对前一个密文的内容(攻击者知道的内容)进行异或运算,并检查数据的真实性。 Critically, since SSLv3 doesn't specify the contents of the padding (•) bytes, the receiver cannot check them. 至关重要的是,由于SSLv3没有指定填充(•)字节的内容,因此接收方无法对其进行检查。 Thus the record will be accepted if, and only if, the last byte ends up as a seven. 因此,当且仅当最后一个字节以7结尾时,该记录才会被接受。

And later: 然后:

The critical part of this attack is that SSLv3 doesn't specify the contents of padding bytes (the •s). 此攻击的关键部分是SSLv3没有指定填充字节(•s)的内容。 TLS does and so this attack doesn't work because the attacker only has a 2 -64 or 2 -128 chance of a duplicated block being a valid padding block. TLS可以,因此此攻击不起作用,因为攻击者只有2 -64或2 -128的机会将重复块作为有效的填充块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 OpenSSL 1.0.1h是否也像SSL 3.0一样遭受POODLE攻击? - Does OpenSSL 1.0.1h also suffer from POODLE attack like SSL 3.0 suffers? Poodle漏洞需要将SSL 3.0更改为TLS - Poodle vulnerability need to change SSL 3.0 to TLS 有没有办法防止Unity中的javax.net.ssl.SSLHandshakeException,因为服务器不支持SSLv3来防止poodle攻击? - Is there a way to prevent javax.net.ssl.SSLHandshakeException in Unity because server does not support SSLv3 to prevent poodle attack? Android应用将TLS协议降级为SSL 3.0 - Android app downgrading TLS protocol to SSL 3.0 Glassfish 2.0 Poodle漏洞 - 如何禁用SSL并仅允许TLS - Glassfish 2.0 Poodle vulnerability - How to disable SSL and allow TLS only POODLE漏洞。 如果客户端的浏览器可以回退到IIS上的SSL 3.0,则发出警告 - POODLE vulnerabiilty. Giving client warnings if their browser can fall back to SSL 3.0 on IIS HTTPS协议是否受到Poodle SSLv3攻击的影响? - Is the HTTPS protocol affected by the Poodle SSLv3 attack? SSL现在会影响性能吗? - Does SSL affect performance nowadays? 禁用 SSL 回退并仅将 TLS 用于 .NET 中的出站连接? (贵宾犬缓解) - Disable SSL fallback and use only TLS for outbound connections in .NET? (Poodle mitigation) 在 Heroku 上降级到免费测功机后出现 SSL 错误 - Getting SSL error after downgrading to free dyno on Heroku
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM