/mnt/ain challenge library. Reverse engineering.
legal-protocol
The password ran to 26 words, but its only secret was the time. The lab needed 10 minutes.
Published 2 November 2026. Challenge by .fuzzli.
The brief
In a world dominated by digital rights and data privacy, the newly formed Legal Department at CyberTech Inc. has encountered a sophisticated security protocol. Your task is to dissect the encryption scheme and extract the necessary credentials to access these documents, ensuring the company can proceed with its operations without legal hurdles.
- legal-protocol.tar.gz, 6.2 KB
In short
The archiver locks files under AES-256 with a password of 26 common English words. Every word comes from Python's random module, seeded by the clock, and the zip file records when it was written.
An archiver and one locked file
The handout holds protector.pyc, a Legal Department archiver compiled for Python 3.12, and flag.zip, 219 bytes under WinZip AES-256. The lab read the bytecode one function at a time, 13 functions in all.
Eight strings behind decoy keys
Eight strings are XORed with the SHA-512 of decoy keys such as "hello there" and "bee's are great". Undone, they spell requests, get, unixtime and the address of a public list of the 1,000 most common English words.
One number seeds the whole password
create_password seeds Python's random module with one number, draws 200 bytes, stirs them and reads them out as words from that list. The same number always gives the same password.
The seed is the clock
That number is the Unix time plus a shift of up to 2,211 seconds, modulo 13,371,322. The zip header dates flag.zip to 23:20:20 on 8 July 2024, so 4,623 seeds were left. The match came after 19 seconds.
Basis 8,946,568 opens the archive
Time 1,720,475,784 gives basis 8,946,568 and a password that starts loud cell law believe. Its verifier and HMAC match, AES-256 decrypts, and LZMA unpacks 35 bytes with CRC-32 0x4da00723, as the header says.
The insight
A password built by Python's random module is only as secret as its seed, and this seed was the clock, which the zip itself records.
The flag
shc2024{cl0s5d_s0urce_is_the_b3st!}