🧬 Mutation Machine
[HIGH SCHOOL SENIOR PROJECT] • [ARCHIVED] • [HISTORICAL REFERENCE]
A polymorphic engine for Linux binaries, exploring encryption and fileless execution.
This repository was my High School Senior Project. It represents a significant milestone in my early self-taught journey into systems programming, cybersecurity, and low-level logic.
While functional and an ambitious undertaking for its time, the code and architecture found here do not reflect my current professional standards or engineering practices.
For examples of my current work, please visit my Profile.
Mutation Machine is a polymorphic builder designed to "mutate" Linux binaries to evade signature-based detection. It transforms a compiled executable into a new, logically equivalent C program that decrypts and executes itself entirely in memory.
- Payload Preparation: A Python utility converts the target binaryinto a C-compatible comma-separated hex array.
- Go Mutation Engine: The engine (
main.go) performs several layers of obfuscation:- Dynamic XOR Encryption: Generates a random key (1-128 chars) and XORs the payload.
- Source-Level Polymorphism: The engine contains embedded C code strings that it injects into the template.
- Junk Code Injection: It scans the source for
//markertags and injects "dead code" (e.g.,if(5 == 10)or do-nothingwhileloops) to change the file's structure and cryptographic hash.
- Fileless Execution: The output C code utilizes
memfd_create(to create an anonymous RAM-based file) andfexecveto execute the payload without ever touching the disk.
- Go: The orchestration engine and polymorphic injector.
- Python: Pre-processor for hex-formatting.
- C: The "Stub" template (
decrypt-exec) used for the final loader. - Linux Internals: Exploration of memory-backed file descriptors and process execution.
Building this project was my first deep-dive into:
- Binary Analysis: Learning how ELF files are structured and how they run.
- Cryptography: Implementing stream ciphers and key management.
- Evasion Techniques: Understanding signature-based detection and the power of polymorphism.
- Self-Taught Architecture: Managing multi-language workflows (Go/Python/C) before I learned modern CI/CD.