pyc2bytecode
1.0.0
Python字节码拆卸器通过拆卸和分析所有python版本(包括Python 3.10。*)的python byte-code(.pyc)文件来帮助反向工程解剖python二进制文件。
运行pyc2bytecode:
> Console Disassembled Output: python pyc2bytecode.py -p <pyc_file_path>
> Save Disassembled Output to a file: python pyc2bytecode.py -p <pyc_file_path> -o <output_file_path>
Pyc2ByTecode可以被研究人员使用用于逆向恶意的Python二进制文件,并将它们拆开,以了解静态的二元性能。
我们执行pyc2bytecode.py对只有fanfans.pyc ,该pyc从最近的python勒索软件示例中提取,伪装成okerains of pyinstxtractor.py.py
以下是pyc2bytecode执行后提取的分析结果:





将拆卸的输出提取到文本文件中


i)https://github.com/google/pytype/blob/main/pytype/pyc/magic.py-魔术数字
ii)https://nedbatchelder.com/blog/200804/the_structure_of_pyc_files.html- Pyc结构
iii)https://docs.python.org/3/library/dis.html- dis
iv)https://docs.python.org/3/library/marshal.html-元帅
谢谢,将不胜感激!希望您喜欢该工具:) - 骑士!