MalForge is a tool designed to manipulate and corrupt ELF binaries, making reverse engineering and binary analysis more challenging. The tool provides multiple corruption techniques, including header modification, symbol table obfuscation, and the addition of decoy sections.
-
ELF Header Corruption
- Randomly modifies ELF magic bytes and nullifies the section header offset to hinder ELF analysis tools.
-
Section Header Overwriting
- Overwrites random chunks of the section headers to confuse disassemblers and debuggers.
-
Symbol Table Obfuscation
- Uses XOR encryption to obfuscate the symbol table, preventing extraction of function names and variable identifiers.
-
Decoy Section Addition
- Adds a new section filled with random junk data to mislead reverse engineers.
-
Prerequisites:
- GCC (GNU Compiler Collection) installed on your system.
- An ELF binary to modify.
-
Compilation:
Compile MalForge using the following command:gcc -o malforge malforge.c
To run MalForge, provide the path to an ELF binary as an argument:
./malforge <elf_binary>
Example
./malforge test101
This command will apply all the corruption techniques to the provided ELF binary.
- ELF Header Corruption MalForge modifies the ELF header by:
- Changing the ELF magic bytes to random values.
- Nullifying the section header table offset.
- This makes the binary harder to parse by tools that rely on the ELF format.
-
Section Header Overwriting The section headers are partially overwritten with random bytes, rendering the sections unidentifiable and breaking tools that rely on these headers.
-
Symbol Table Obfuscation The
.symtab
section, which contains the binary’s symbol information, is XOR-encrypted with a key. This prevents reverse engineers from easily accessing function and variable names. -
Decoy Section Addition A decoy section filled with random junk data is added to the binary at an arbitrary offset. This can mislead reverse engineers and make binary analysis more confusing.
MalForge is intended for educational and research purposes only. Unauthorized modification of binaries is illegal in many jurisdictions. Use this tool responsibly and ensure that you have permission before modifying any binary files.