Can you explain the actual attack?
- Why does the attacker need to firstly send some arbitrary UDP packet?
- How can the attacker break the privacy between A and B?
Link: The article of Bellovin
I'm attaching the slide for a reminder:
Actually, the attack is on CBC mode (which IPSec uses). In the attack, it modifies the encrypted packets, and uses the IPSec decryptor as a decryption Oracle.
How it works is based on how CBC-mode decryption works:
Note that any particular plaintext block depends only on the corresponding ciphertext block, and the one immediately before it (and the key); as long as those two ciphertext blocks are correct, the corresponding plaintext block will result.
What the attacker does is take the encrypted packet, and replace its payload contents with the message he wants to decrypt (aligned about the cipherblock boundaries).
He then forwards the modified message to the decryptor, which will proceed to decrypt the message. Now, consider how this decryption will happen for the parts of the message that he has replaced; if we ignore the very first block he replaced, then both the current ciphertext block and the previous one corresponds to the message he is attacking; hence the resulting plaintext will be the plaintext he is attacker.
That is, the resulting decrypted packet will have the plaintext of the message he is attacking embedded in it.
Then, if the security gateway forwards the message, it'll be forwarding a message containing the information the attacker is interested in.
As for your questions:
He needs to send a message that:
Suppose the attacker sees a message going between A and B that he wants to read. What he does is generate a packet that'll go through the tunnel between A and B, and is targetted at his confederate. Once the packet has been encrypted and is traversing between A and B, he grabs the packet, and replaces the payload contents with the message he wants to decrypt (being careful not to disturb the inner IP header and the trailing ESP padding); he lets the modified packet go to B, which decrypts it, and forwards the decrypted packet to the confederate. The confederate then looks at the internal payload data and see the decryption of the original packet; he wins.