Reference

Snippets

Reusable ASM building blocks shipped with Shell[SNIP], per platform.

Snippets

Snippets are reusable ASM building blocks referenced via [[SNIPPET_NAME]]. Names are matched case-insensitively against the .asm file basename in templates/snippets/{os}_{arch}/.

win_64

SnippetPurpose
setup_hash_resolverPEB walk to find kernel32.dll base + parse_module ROR13 routine.
setup_kernel_resolverPEB walk to find kernel32.dll base and set up the resolver routine.
resolve_api_hashResolve an API by ROR13 hash via parse_module.
resolve_func_api_addrResolve a function API address.
resolve_func_from_dllResolve a function from a loaded DLL handle via GetProcAddress.
resolve_kernel_apiResolve a kernel32 API by hash.
get_addrtable_from_exporttableExtract the address table from an export table.
get_kernel_base_addrLocate the kernel base address.
get_kernel_exporttable_addrLocate the kernel export-table address.
load_dllLoadLibraryA wrapper (params: name, lla).
wsa_startupWSAStartup call.
wsa_socket_tcpWSASocketA (AF_INET, SOCK_STREAM).
wsa_connectWSAConnect with a sockaddr_in.
create_process_redirectCreateProcessA with I/O redirection.
open_processOpenProcess wrapper.
virtual_alloc_exVirtualAllocEx (RW) wrapper.
write_process_memoryWriteProcessMemory wrapper.
virtual_protect_exVirtualProtectEx (RW → RX) wrapper.
create_remote_threadCreateRemoteThread wrapper.

posix_64

SnippetPurpose
socket_tcpsocket syscall (AF_INET, SOCK_STREAM).
connect_tcpconnect syscall with a sockaddr_in.
dup2_stdiodup2 loop over stdin/stdout/stderr.
execve_shexecve("/bin/sh", ...) with a command string (param cmd_reg).
execve_bin_shexecve("/bin/sh", NULL, NULL).
exit_cleanexit(0) syscall.
ptrace_attachptrace(PTRACE_ATTACH, pid).
ptrace_getregsptrace(PTRACE_GETREGS) → user_regs_struct.
ptrace_poketextptrace(PTRACE_POKETEXT) write loop.
ptrace_setregsptrace(PTRACE_SETREGS) to redirect RIP.
ptrace_detachptrace(PTRACE_DETACH) to resume the target.
wait_processwait4(pid, WUNTRACED).
setup_elf_resolverELF resolver: find_lib + elf_lookup routines.
find_lib_baseFind a shared library base via /proc/self/maps.
resolve_elf_hashResolve an ELF symbol by djb2 hash.

The full list can also be discovered at runtime with the MCP list_snippets tool or by reading the templates/snippets/{os}_{arch}/ directory directly.

Copyright © 2026