PE-Packer is a simple packer for Windows PE files. The new PE file after packing can obstruct the process of reverse engineering.
It will do the following things when packing a PE file:
- Transforming the original import table.
- Encrypting the sections.
- Clearing the section names.
- Installing the shell-entry.
When running a packed PE file, the shell-entry will decrypt and load the original program as follows:
- Decrypting the sections.
- Initializing the original import table.
- Relocation.
Before packing, using some disassembly tools can disassemble the executable file to analyze the code, such as IDA Pro.
After packing, the static analysis will be obstructed.
This project is just a demo for beginners to study PE Format and Assembly Language. It still has some compatibility problems and bugs that cannot be used in practice.
The project must configure on/for Windows and can only process 32-bit programs now.
..\PE-Packer> mkdir -p build
..\PE-Packer> cd build
..\PE-Packer\build> cmake .. -D CMAKE_C_COMPILER=gcc -G "MinGW Makefiles"
..\PE-Packer\build> cmake --build .
To pack a program, you must specify its name and the output name.
PE-Packer input-file output-file
For example:
PE-Packer hello.exe hello-pack.exe
You can use Doxygen to generate the document.
《加密与解密(第3版)》段钢
PE Format - Windows Dev Center
Distributed under the GNU General Public License. See LICENSE
for more information.
GitHub: https://github.com/czs108/
E-Mail: chenzs108@outlook.com
WeChat: chenzs108