Codsmp.zip ❲360p❳
$ strings -a payload_decrypted.bin | head -20 /lib64/ld-linux-x86-64.so.2 libc.so.6 GLIBC_2.2.5 puts printf ...
def extract_flag(buf): import re m = re.search(br'FLAG\[^]+\}', buf) return m.group(0).decode() if m else None codsmp.zip
Both variations are often required for the “extra points” tier of a CTF. 4.2 Decrypting archive.enc The file size of archive.enc (≈5 KB) matches the size of payload.bin after XOR with a 6‑byte key, which suggests archive.enc may be the same data encrypted with a different key (maybe a rotating key). Let’s brute‑force the key length. $ strings -a payload_decrypted
workdir/ ├─ README.txt ├─ payload.bin ├─ secret.py └─ archive.enc 2.1 README.txt Welcome to the CODSMP challenge! codsmp.zip
data = open('archive.enc','rb').read() key = b' ' decoded = bytes(b ^ 0x20 for b in data) print(decoded[:64]) Result: