Main concept: how to decompile pyinstaller program
First, this is a typical pyinstaller program.
So first we need find the source code.
The source code is in pypuzzle.pyc
and the python version is python3.7 according to python37.dll
Due to bytecode header, using decompyle3 will show error.
So, in order to decompile, we need to bytecode header first.
- unzip base_library.zip, open any file using hex editor
- open PyPuzzle.py suing hex editor
not that, the file in base_library contains bytecode header. which is 42 0D 0D 0A 01 00 00 00
for python 3.7
- we need add
42 0D 0D 0A 01 00 00 00
to the PyPuzzle.py file and remove extra 0s
- save PyPuzzle.py and decompile again.
1 | # uncompyle6 version 3.7.4 |
use ciphey
to get the flag. FU trendmicro.