Skip to content

42 project: Make a elf 64 bits packer (without compression)

Notifications You must be signed in to change notification settings

0x050f/woody-woodpacker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

woody-woodpacker

The goal of this project is to code a program that will encrypt a elf 64 bits binary given as parameter..A new program called woody will be generated from this execution. When this new program (woody) will be executed, it will print "....WOODY...." then decrypt itself (the .text section of woody) before running.

Disclaimer:

Only works on linux elf 64 bits binaries.

Compilation

make

Execution

usage: ./woody_woodpacker file

Demo

alt text

How does it works ?

alt text

We will add the injection after all sections in the first PT_LOAD executable segment, if the remaining space between the two PT_LOAD segments is not enough, we will just add padding (4096 bytes on linux 64 bits) on all sections offset and segments offset after it.

The woody-woodpacker program will encrypt .text section using XOR algorithm of a key of n bytes. Moving each bytes from key after each bytes encrypted. The injection would have to decrypt the .text section before moving to it. (using mprotect to be able to edit the mmaped region).

About

42 project: Make a elf 64 bits packer (without compression)

Topics

Resources

Stars

Watchers

Forks