DROPDOWN QUAKE HUD // TACTICAL SHELL
AUKA CTF Writeup Vault — Quake HUD Shell v3.1
Type 'help' for tactical commands or 'ls' to list catalog.
studio@vault:~$
AUKACTFVAULT._.
MISSION WRITEUP ID: cylab-rsa-oraclePublished: 2026-08-12 by AUKA

RSA Oracle: Chosen Ciphertext Attack

Exploiting an RSA decryption oracle by sending multiplied ciphertexts to circumvent equality checks and recover intercepted secrets.

Target Mission Dossier
CryptoMedium
Target Host / IP
Remote Oracle Service
Operating System
Linux
Architecture
x86_64
Primary Vulnerability
RSA Chosen Ciphertext Malleability
Exposed Services:TCP/Socket Service
Attack Kill Chain Progress1 / 3 Steps
01

Phase 1: Intercepted Ciphertexts & Oracle Behavior

An attacker intercepts two encrypted artifacts: `password.enc` and `secret.enc`. The server provides a decryption oracle that will decrypt any ciphertext provided by the user, except the exact intercepted password ciphertext `C_target`.

studio@pwnbox:~/cylab-rsa-oracle$
# Files available:
ls -la
# password.enc
# secret.enc
02

Phase 2: Homomorphic Malleability Exploitation

Because unpadded textbook RSA is multiplicatively homomorphic: - `E(m1) * E(m2) = (m1^e) * (m2^e) = (m1 * m2)^e = E(m1 * m2) (mod N)` We choose a multiplier `m_mult = 2`, encrypt it `c_mult = 2^e (mod N)`, and send `C' = C_target * c_mult (mod N)` to the oracle. The oracle decrypts `C'` to `2 * password (mod N)`. Dividing by `2` gives the original plaintext password!

studio@pwnbox:~/cylab-rsa-oracle$
#!/usr/bin/env python3
# Chosen Ciphertext Attack on RSA Oracle
from Crypto.Util.number import long_to_bytes

def exploit_oracle(oracle_conn, C_target, e, n):
    # Choose multiplier 2
    c_mult = pow(2, e, n)
    c_prime = (C_target * c_mult) % n

    # Send c_prime to oracle
    decrypted_double = oracle_conn.decrypt(c_prime)

    # Divide by 2
    password_int = decrypted_double // 2
    return long_to_bytes(password_int)
03

Phase 3: Decrypting the Secret Flag

Using the decrypted password, we decrypt `secret.enc` with standard AES or OpenSSL to retrieve the final flag.

studio@pwnbox:~/cylab-rsa-oracle$
Flag: [REDACTED - Click "Reveal Flag" below]

Final Target Proof of Compromise

Target Root Capture Flag
STUDIO{pwn3d_fl4g_h1dd3n_h3x_00000}
AUKA CTF Writeup Vault — Official Field Handbook
[ Open Terminal Shell ]•[ Back to Top ]