Introduction
Introduction
ShellSNIP is a Shellcode Factory that generates PIC (Position Independent Code) shellcode from reusable NASM snippets, targeting Windows and Linux. Instead of hand-writing assembly for every payload, you assemble modular templates — recipes that reference reusable snippets — and let the tool handle parameter substitution, compilation via NASM, optional encoding, and validation.
What it does
ShellSNIP ships four built-in recipes:
| Recipe | Purpose |
|---|---|
exec | Execute a command (WinExec on Windows, execve on Linux) |
dlexec | Download a remote payload and execute it |
connect | Open a TCP reverse shell back to an attacker-controlled host |
inject | Inject shellcode into a running process (CreateRemoteThread / ptrace) |
Each recipe is built from snippets — reusable ASM blocks — resolved through a custom template engine that supports snippet inclusion, whitelisted Python helper calls, and parameter substitution.
Supported platforms
Templates are organized in {os}_{arch} directories. win_64 and posix_64 ship complete recipe and snippet sets; macos is accepted as a CLI/MCP option but has no template directory yet.
| OS | --os flag | Arch | NASM format |
|---|---|---|---|
| Windows | win | 64 | win64 |
| Linux | posix | 64 | elf64 |
How you can use it
- CLI (
generate.py) — generate, compile, encode, and write shellcode from the command line. - MCP server (
server.py) — expose recipes, snippets, helpers, encoders, and compilation as tools to AI clients such as Claude Code, Cursor, or Windsurf. - Python API — import
ShellSnip,TemplateManager, and the encoder classes directly into your own tooling.
Continue to Installation to set up the required toolchain.