Skip to content

bidr11/pe_packer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packer

This is a simple 64x Portable Executable packer that uses AES encryption and ZLIB compression.

How it works

The unpacking stub loads a ".unpacked" section, decrypts and decompresses it, then loads it into memory and redirects execution to its entry point.

The packing process is done using python.

Disclaimer: Not all cases are handled. This is a very minimal packer, might not work with every executable.

Building the project

This packer requires an installation of OpenSSL for correct building and execution.

cmake.exe --build ./build --config Debug --target ALL_BUILD -j 10 --

Make sure to install the needed python dependencies:

pip install -r packer_executable/requirements.txt

Tests

There are two tests defined in CMakeLists.txt, one is for packing the executable and the other is for running it. These tests can make sure that the project was built correctly.

add_test(NAME test_pack
  COMMAND python "${PROJECT_SOURCE_DIR}/packer_executable/main.py" "${PROJECT_BINARY_DIR}/Debug/dummy_executable.exe" -p "${PROJECT_BINARY_DIR}/Debug/stub.exe")


add_test(NAME test_packed
  COMMAND "${PROJECT_BINARY_DIR}/packed.exe")

Running the packer

Once the project is built, packing can be done through this command:

python packer_executable/main.py <executable_to_pack> -p build/Debug/stub.exe

About

Attempt at making a x64 PE packer.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published