Bazzy is a Nim shellcode loader for Windows. It offers four execution modes: remote thread injection into explorer.exe (default), remote thread injection into a freshly spawned suspended process, Early Bird APC injection, and direct callback-based execution without injection.
- Multiple execution modes:
- Remote thread injection into
explorer.exe(default) - Suspended process creation and injection via
CreateRemoteThread - Early Bird APC injection via
QueueUserAPCagainst a suspended primary thread - Direct shellcode execution via
EnumSystemGeoIDcallback (no injection)
- Remote thread injection into
- Accepts custom base64-encoded shellcode, with a baked-in x64 demo payload as fallback
- Suspended target selection from
%WINDIR%\System32
- Windows (x64 for the default payload)
- Nim: Nim Programming Language
- Winim: Windows API bindings for Nim
nimble install winim
git clone https://github.com/jeffaf/bazzy.git
cd bazzy
nim c bazzy.nim# Show help
bazzy -h
# Default: inject the baked-in payload into explorer.exe
bazzy
# Inject a custom payload into explorer.exe
bazzy -p "your_base64_payload"
# Spawn a suspended target and inject via CreateRemoteThread
bazzy -p "your_base64_payload" -t "notepad.exe"
# Early Bird APC injection (defaults to notepad.exe target)
bazzy -p "your_base64_payload" -a
# Early Bird APC injection into a specific suspended target
bazzy -p "your_base64_payload" -a -t "calc.exe"
# Execute shellcode directly in bazzy's own process (no injection)
bazzy -p "your_base64_payload" -eThe baked-in default payload is an x64 msfvenom reverse shell stub — replace it in bazzy.nim or pass your own via -p before using against any real target.
- Default (no flag): Injects into the running
explorer.exeviaOpenProcess+VirtualAllocEx+WriteProcessMemory+CreateRemoteThread - Suspended Target (
-t): Spawns%WINDIR%\System32\<process>withCREATE_SUSPENDED, injects viaCreateRemoteThread, then resumes the primary thread - Early Bird APC (
-a): Spawns a suspended target, queues the shellcode as a user-mode APC on its primary thread viaQueueUserAPC, then resumes.NtTestAlertfires during process initialization and runs the shellcode before most user-mode EDR hooks are installed. Defaults tonotepad.exeif-tis omitted. - Direct Execution (
-e): Runs shellcode in bazzy's own process viaEnumSystemGeoIDcallback — no injection
-h, --help: Show help-p, --payload <base64>: Base64-encoded shellcode payload-t, --target <process>: Spawn<process>from%WINDIR%\System32as a suspended target-e, --execute: Execute shellcode directly (no injection)-a, --apc: Early Bird APC injection (uses-ttarget, defaults tonotepad.exe)
For educational and authorized security research only. Use exclusively on systems you own or have explicit permission to test.
Issues and pull requests welcome.
Inspired by: