Oct 5, 2015 • neko3
Crypto 200
Description:
The folowing plaintext has been encrypted using an unknown key, with AES-128 CBC:
Original: Pass: sup3r31337. Don’t loose it!
Encrypted: 4f3a0e1791e8c8e5fefe93f50df4d8061fee884bcc5ea90503b6ac1422bda2b2b7e6a975bfc555f44f7dbcc30aa1fd5e
IV: 19a9d10c3b155b55982a54439cb05dce
How would you modify it so that it now decrypts to: “Pass: notAs3cre7. Don’t loose it!”
This challenge does not have a specific flag format.
Solution
This is going to be an AES-CBC byte flipping attack.
Just take the IV, XOR the first block of the original plaintext with the first of the target plaintext, and patch the IV.
See the differences?
Pass: sup3r31337
. Don't loose it
!
Pass: notAs3cre7
. Don't loose it
!
And here’s the code: