Skills for Real Engineers. Straight from my .agents directory.
offensive-shellcode
Agent skill fromSnailSploit/Claude-Red
Shellcode development reference for offensive security engagements. Use when writing custom x86/x64 shellcode, implementing position-independent code (PIC), building shellcode loaders, evading AV/EDR detection, or converting PE files to shellcode. Covers null byte avoidance, API hashing, encoder/decoder patterns, staged vs stageless payloads, Windows PEB traversal, and cross-platform shellcode techniques.
How to install offensive-shellcode
npx skills add SnailSploit/Claude-Red# or add only this skill to Claude Code: copy the folder
Skills/infrastructure/offensive-shellcode/
# into
~/.claude/skills/offensive-shellcode/ (all projects)
.claude/skills/offensive-shellcode/ (one project)
1## Shellcode Development Workflow231. Define concept and target platform (x86/x64, Windows/Linux/macOS)42. Write assembly using position-independent techniques53. Extract binary and test in controlled environment64. Apply null byte avoidance and optimizations75. Encode/encrypt to evade static detection86. Package with loader and choose delivery method910---1112## Basic Concepts1314### Execution Pattern (Allocate-Write-Execute)1516Avoid direct `PAGE_EXECUTE_READWRITE` — prefer:171. Allocate with `PAGE_READWRITE`182. Write shellcode to allocated region193. Call `VirtualProtect` to switch to `PAGE_EXECUTE_READ`2021```c22char *dest = VirtualAlloc(NULL, 0x1234, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE);23memcpy(dest, shellcode, 0x1234);24VirtualProtect(dest, 0x1234, PAGE_EXECUTE_READ, &old);25((void(*)())dest)();26```2728### Position-Independent Code (PIC) Techniques2930| Method | Platform | Notes |31|--------|----------|-------|32| Call/Pop | Windows | Push next addr, pop into register |33| FPU state | Windows | `fstenv` saves instruction pointer |34| SEH | Windows | Exception handler stores EIP |35| GOT | Linux | Global Offset Table |36| VDSO | Linux | Kernel-provided shared object |3738---3940## Windows API Resolution (PEB Walk)4142Identifying `kernel32.dll` without imports:43441. Get `PEB` via `gs:[0x60]` (x64) or `fs:[0x30]` (x86)452. Walk `PEB->Ldr.InMemoryOrderModuleList` — order: exe → ntdll → kernel32463. Hash-compare module names to locate `kernel32`474. Parse the Export Address Table (EAT)48…
Excerpt shown under the repository's MIT license.
More skills in Claude-Red
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
