Skip to main content
Challenges CBC bit-flipping
Cryptography Hard Mode errors Solves: 8

CBC bit-flipping

Author: CyberSamSU
Points
70

Let's recall the CBC decryption formula again: P_i = D(K, C_i) XOR C_(i-1). Notice — the plaintext of the i-block is XORed with the previous ciphertext block. Therefore, if an attacker changes one bit in C_(i-1), exactly that bit changes in P_i!

This means that CBC does not protect integrity. Even without knowing the key, an attacker can change the plaintext of the next block to any desired value (in return, the previous block becomes unrecognizable — this is a certain "price" of the attack).

The site gives the user the following cookie (hex):

fc02a05adddf198cef202f9327abc4078ca3e911b64243c2744574ceb4c77925
9c480af9cb5928f027c6195bae9ebbef

Cookie structure:

cookie = IV (16 bayt) || C1 (16 bayt) || C2 (16 bayt)
P1 = "foydalanuvchi=me"
P2 = "hmon&admin=false"

Your task: modify C1 so that the second block becomes the following upon decryption:

P2' = "hmon&admin=true;"

Write the 16 bytes of the new C1 in lowercase hex format and assemble the flag:

BAYROQ{A3S_bitflip_<C1 ning yangi hex qiymati>}

The key is not given to you and is not needed — this is the most beautiful part of the attack. Just XOR.

Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −7 pts Log in
Hint 2 −14 pts Log in
Hint 3 −21 pts Log in
To submit a flag, log in.

First solvers

1. W.o.X 11.09.2026
2. Лазиз 04.10.2026
3. testrejim 09.10.2026
4. Mirjaxon Qaxxarov 27.10.2026
5. Odam 04.11.2026
6. arcanum 11.11.2026
7. Jasmin Xuseinova 15.11.2026
8. Doston Allayarov 28.11.2026