There and Back Again: Reverse Engineering Python Binaries
summary
Shows how to recover readable .py from .pyc by hand with a concrete pipeline: segmentation, translation, control-flow reconstruction and demonstrates practical tools like the dis module, uncompyle6, bilingual and a compile-then-compare verification. Reports surprising churn in opcodes (roughly under 10% yearly, ~25% in 3.11), explains handling exception tables and block stack changes, and shows a neural decompiler that mostly works while leaving small omissions that are fixable by hand. Targets CPython bytecode; nonstandard compilers or obfuscation break verification.
AI-written summary · about
chapters (8)
- 0:00Reverse engineering Python binaries
- 2:38Python bytecode compilation
- 10:25Python bytecode execution
- 15:43Manual bytecode decompilation
- 21:18Control flow reconstruction
- 27:19Stitching code objects
- 28:47Automating decompilation
- 33:53Summary
related talks
41mA Glance at Interpreted Language Bytecode Trickery
51mReverse Engineering Binaries
48mHow to Build A Decompiler
47mA Look at Jython-Enhanced Reverse Engineering with Ghidra
37mBehind Enemy Lines - Reverse Engineering C++ in Modern Ages
40mMalware Reverse Engineering with PE Tree—OSS Inspired by COVID
33mBe a Binary Rockstar
21mDemystify Today's Binary Disassembling and How Modern ABI Makes it Easier
