AES-based shellcode loader generator for Windows security research
Project description
ShellcodeRunner (AES)
Overview
ShellcodeRunner is a research-focused project designed to help security enthusiasts, red teamers, and malware researchers understand how custom shellcode loaders work on Windows.
This repository demonstrates:
- Encrypting raw shellcode using AES
- Generating a native C++ loader
- Executing shellcode fully from memory
- Leveraging NT Native APIs for execution
Primary Goal: To provide a practical idea of how shellcode loaders can be built in a way that can easily bypass Windows Defender–based solutions by avoiding static signatures, plaintext payloads, and common high-level APIs.
This project is intended for educational and defensive research purposes only.
Proof of Concept [Video]
Key Features
- AES-128-CBC encrypted shellcode
- Password-based key derivation (SHA-256)
- No plaintext shellcode on disk
- Native Windows CryptoAPI decryption
- NTAPI-based memory allocation and execution
- Simple and clean workflow
Repository Structure
shellcoderunner/
├── shellcoderunneraes.py # Python builder (encrypts shellcode & generates C++ loader)
├── aes_nt_runner.cpp # Generated C++ loader
├── meow.inc # Encrypted shellcode + IV (auto-generated)
└── runner.exe # Final compiled executable
Installation
Required Dependencies (Linux):
sudo apt update && sudo apt install -y python3 python3-pip mingw-w64
python3 -m pip install pycryptodome
Clone the repository:
git clone https://github.com/jaytiwari05/shellcoderunner.git
cd shellcoderunner
Make the script globally accessible:
cp shellcoderunneraes.py /usr/local/bin/shellcoderunneraes.py && chmod +x /usr/local/bin/shellcoderunneraes.py
Usage
Generate and compile a shellcode loader using AES encryption:
shellcoderunneraes.py <C2_shellcode>.bin --aes pain05 --compile
Arguments
<C2_shellcode>.bin— Raw shellcode file generated by a C2 framework (e.g., Sliver, Adaptix, Cobalt Strike).--aes— Password used for AES key derivation--compile— Compiles the generated C++ loader into an executable
The final output will be a standalone Windows executable that decrypts and executes the shellcode entirely in memory.
Why This Works Against Defender
This project highlights techniques commonly used to bypass Windows Defender–based detection:
- Encrypted payload stored on disk
- Runtime decryption using legitimate Windows APIs
- No RWX memory allocation
- Execution via NT Native APIs
- No use of high-level Win32 execution helpers
These techniques help reduce static signatures and behavioral indicators commonly relied upon by Defender.
Disclaimer
This project is provided strictly for educational, research, and defensive security purposes. Do not use this code for unauthorized or malicious activities. The author is not responsible for misuse.
Author
PaiN05 Security Research | Offensive Tradecraft | Malware Development Research
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shellcoderunner_aes-2.0.0.tar.gz.
File metadata
- Download URL: shellcoderunner_aes-2.0.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dee6cecc63d3db496c28dc60ac796277361a6407859d600758d855b5810176fb
|
|
| MD5 |
268ec6abcf49e6debd752d2c527339d6
|
|
| BLAKE2b-256 |
0719c5d48b99321b35802ba20e3b932bcf4e62d14d3816ecaa556356859aff4f
|
File details
Details for the file shellcoderunner_aes-2.0.0-py3-none-any.whl.
File metadata
- Download URL: shellcoderunner_aes-2.0.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4339e03ed887a9f8d2ac85f8585949eba23ca9ae0e0a1f70853018e3f23196a8
|
|
| MD5 |
f0bdc97244cfd415c46fd596e4911218
|
|
| BLAKE2b-256 |
a39d74c015e5a75b3315b056d36e2d5b5a719ee4af04ed870f85fc3d80877e23
|