Exploiting Python's MT19937 PRNG and RSA Vulnerability in CTF Challenges
Python Random Number Prediction and RSA Factorization
Challenge 1: Reversing Python's Mersenne Twister
The vulnerable code snippet reveals a critical security flaw:
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad
import random
flag = b'WKCTF{}'
pad_flag = pad(flag, 16)
key = random.randbytes(16)
cipher = AES.new(key, AES.MODE ...
Posted on Sat, 13 Jun 2026 16:33:38 +0000 by aperales10