MISSION WRITEUP ID: cylab-mind-your-ps-and-qsPublished: 2026-08-10 by AUKA
Mind your Ps and Qs: RSA Small Modulus Factorization
Factorizing a small RSA modulus N to recover prime factors p and q, computing the private exponent d, and decrypting the ciphertext.
Target Mission Dossier
CryptoMedium
Target Host / IP
Offline Challenge File
Operating System
N/A
Architecture
N/A
Primary Vulnerability
Insufficient Key Size (RSA Small Modulus)
Exposed Services:Mathematical Analysis
Attack Kill Chain Progress1 / 4 Steps
01
Phase 1: RSA Parameter Extraction
We are provided with a text file `values` containing the standard RSA public parameters and ciphertext:
studio@pwnbox:~/cylab-mind-your-ps-and-qs$
02
Phase 2: Modulus Factorization via FactorDB
The modulus `n` is approximately 81 digits (around 270 bits), which is trivial to factor using public databases like FactorDB or Pollard's rho algorithm. Querying FactorDB yields the two prime factors `p` and `q`.
studio@pwnbox:~/cylab-mind-your-ps-and-qs$
03
Phase 3: Private Key Derivation & Decryption
Using `p` and `q`, we compute Euler's totient `phi = (p-1)*(q-1)`, find the modular multiplicative inverse `d = pow(e, -1, phi)`, and decrypt `m = pow(c, d, n)`.
studio@pwnbox:~/cylab-mind-your-ps-and-qs$
04
Phase 4: Flag Verification
Executing the script recovers the plaintext flag:
studio@pwnbox:~/cylab-mind-your-ps-and-qs$
Final Target Proof of Compromise
Target Root Capture Flag
STUDIO{pwn3d_fl4g_h1dd3n_h3x_00000}