
A 42 school project that implements a binary packer for 64-bit ELF executables. The packer encrypts the executable's code sections and injects a decryption routine that executes at runtime.
Woody-Woodpacker is a program that takes a 64-bit ELF binary as input and creates a new encrypted version called woody. When executed, the woody binary:
This project explores:
Original Binary → [Woody-Woodpacker] → Encrypted Binary (woody)
woody executable./woody → Decrypt code → Print "....WOODY...." → Execute original program
# Clone the repository
git clone https://gitlab.com/Aurh1l/woody-woodpacker.git
cd woody-woodpacker
# Compile the project
make
# The woody_woodpacker executable is now ready
./woody_woodpacker
./woody_woodpacker <binary_file>
This creates a new file called woody in the current directory.
# Pack a binary
./woody_woodpacker /bin/ls
# Execute the packed binary
./woody
# Output: ....WOODY....
# [then normal ls output]
# Compare original and packed binary behavior
/bin/ls -la
./woody -la
# Both should produce the same output (after "....WOODY....")
The packer manipulates the following ELF components:
.text section containing executable codeThe project typically uses a simple encryption method such as:
Segment Padding Infection (Silvio Cesare method):
┌─────────────────────────┐
│ ELF Header │
├─────────────────────────┤
│ Program Headers │
├─────────────────────────┤
│ Decryption Stub │ ← Injected code
├─────────────────────────┤
│ Encrypted .text │ ← Original code (encrypted)
├─────────────────────────┤
│ Other sections │
├─────────────────────────┤
│ Section Headers │
└─────────────────────────┘
This project is part of the 42 school curriculum and is intended for educational purposes only.
This tool is created for educational purposes as part of the 42 school curriculum. Use responsibly and only on binaries you own or have permission to modify. The authors are not responsible for any misuse of this software.