H7CTF 2026AI / Forensics
PyTorch Model Artifact
Title unconfirmedPickle post-load hook / zlib / Base64 / static inspection
- Competition
H7CTF 2026
- Category
- AI / ForensicsMedium · estimated
- Analysis status
- Flag extracted locally
- Document
- Original PDF
01Challenge analysis
The problem
The challenge file pytorch_model.bin contained a Pickle serialization path that could execute code upon an unsafe model load. The hidden payload used compression and textual encoding to obscure its contents.
02Exploit or recovery path
How I solved it
- 01
I treated the serialized PyTorch model as untrusted data and inspected its Pickle structure statically instead of blindly invoking torch.load on it.
- 02
I followed the malicious post-load hook references and located the payload which used Base64 and zlib layers.
- 03
I decoded the stored payload bytes in the correct order and recovered the OPERATOR value associated with the flag.
- 04
I extracted the exact H7CTF flag documented by the earlier solve session.
Result
RECOVERED FLAG
H7CTF{64080f42b43c8e48033c}
Flag extracted locally
- Local Verification
- Earlier chat records this exact decoded flag.
- Evidence Limitation
- Original challenge title was not retained; this is a descriptive file title, not an official claim.