GPNCTF 2025 Solution: Crypto - restricted oracle - Pastebin.com

Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

Pastebin

AES-CBC encryption with Padding Oracle - CBC-R in 6 lines of code (by me):

ct=bytearray(("\x41" * 16).encode())
while len(pt_padded) >= 16:
pt_N = pt_padded[-16:]
dec = aes_cbc_poa_decrypt_1_block_noIV(ct[0:16])
ct = xor(dec, pt_N) + ct
pt_padded = pt_padded[:-16]

Image: result of encryption and decrypting it again, also with Padding Oracle

#ctf #cybersecurity #cryptography #cbc-r #paddingoracle

So you thought AES-CBC was safe from decrypting? Ask your nearest Padding Oracle for another opinion!

#aes #cbc #poa #paddingoracle #pwncollege #ctf #cryptography