In this challenge, you will find a padding oracle represented by oracle.py
. It receives ciphertexts in specific form and returns a ciphertext if its tag is correct.
The oracle assumes that the message is encrypted using AES-CBC and authenticated using CBC-MAC. The length of input message is a multiple of AES-128 block size. A CBC-MAC is firstly applied to the message to compute the tag. Then, a padding block of the form r || 0x0f
is appended to the concatenation of message and its tag. Finally, the AES-CBC is applied to the message, tag, and padding to compute the final ciphertext.
In ciphertext.txt
, you will find many ciphertexts that encrypts the same message blocks. You need to leverage them to generate your own query to the padding oracle. Your goal is to get the last byte of the first message block. The correctness of your answer can be checked by /chellenge/solve int_last_byte
. Your result should be an integer in the range of [0,255]
.
The oracle applies a rate-limiting, hence, you are allowed to submit only 5 answers. If 5 chances are wasted, you need to restart the challenge.