I am trying to see specific cases of attacks in the CBC mode, in particular, I am investigating some attacks such as Example of a cut-and-paste attack on CBC. Here I have posted something similar and I have received great answers that are also very clear. But I have tried to look for more examples cut-and-paste attack and I have come across the following that I would like to solve and understand as well as possible:

An attacker intercepts the following encrypted text (encoded in hexadecimal):

74620075616f0ef33e9d10b5780639a4 dc8c17e186380f131a2c5916ea2144be

He knows that plain text is the ASCII coding of the message "A Alice 10,000" (excluding quotes). The attacker also knows that CBC mode encryption was used with a random IV that uses AES as the cipher of underlying block. Show that the attacker can change the encrypted text to decrypt "A Alice 90,000" .What is the resulting encrypted text (encoded in hexadecimal)? This shows that CBC does not provide integrity.

We have to modify the encrypted text so that it decrypts what the exercise asks for, I suppose we have to change, in the plain text that is encoded using ASCII the character or characters that correspond to the number 1 by the number 9, to do this I don't need to know the initialization vector and the key? How could I solve this exercise easily?

  • 2
    $\begingroup$ Hint: See the picture here Bit Flipping Attack on CBC Mode $\endgroup$ – kelalaka Mar 9 at 16:27
  • 2
    $\begingroup$ Hint 2: The change must be in the first block so that you can modify the IV. You need to flip only one bit. More hint: the message is one block and the first one is the IV $\endgroup$ – kelalaka Mar 9 at 17:28
  • 2
    $\begingroup$ 01000001 00100000 01000001 01101100 01101001 01100011 01100101 00100000 00110001 00110000 00101100 00110000 00110000 00110000 00000010 00000010 Which bit? $\endgroup$ – kelalaka Mar 9 at 18:13
  • $\begingroup$ @kelalaka in this case I would have to $P=$"A Alice 10,000" , $C=$"74620075616f0ef33e9d..." and thus $C=E(P\oplus IV,K)$ and therefore $D(C,K)\oplus IV=P$, so I would have to modify a bit of $IV$ according to what you say, am I correct? $\endgroup$ – user424241 Mar 10 at 1:08
  • $\begingroup$ IV, in general, prepended, your C is IV, or ask your exercise source. Yes, you need to modify one bit IV that is enough to make 1 to 9. $\endgroup$ – kelalaka Mar 10 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.