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-元帥
謝謝,將不勝感激!希望您喜歡該工具:) - 騎士!