After discussing the various aspects of Python as a scripting language, we will now pay attention to the analysis of compiled Python. In this section, we will go through the practical analysis techniques from a Python perspective.
Analyzing compiled Python
Static analysis
In many cases, the analysts don't get the compiled Python modules straight away. Instead, they get a sample, which is a Python script that's been converted into an executable using either py2exe or PyInstaller solutions. So, before digging into bytecode modules themselves, we need to obtain bytecode modules. Luckily, there are several projects that are able to perform this task:
- unpy2exe.py: This script can handle samples built using py2exe.
- pyinstxtractor...