offensive-shellcode

Featured

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.

Data & Documents 719 stars 91 forks Updated 1 months ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
95
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

## Shellcode Development Workflow 1. Define concept and target platform (x86/x64, Windows/Linux/macOS) 2. Write assembly using position-independent techniques 3. Extract binary and test in controlled environment 4. Apply null byte avoidance and optimizations 5. Encode/encrypt to evade static detection 6. Package with loader and choose delivery method --- ## Basic Concepts ### Execution Pattern (Allocate-Write-Execute) Avoid direct `PAGE_EXECUTE_READWRITE` — prefer: 1. Allocate with `PAGE_READWRITE` 2. Write shellcode to allocated region 3. Call `VirtualProtect` to switch to `PAGE_EXECUTE_READ` ```c char *dest = VirtualAlloc(NULL, 0x1234, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE); memcpy(dest, shellcode, 0x1234); VirtualProtect(dest, 0x1234, PAGE_EXECUTE_READ, &old); ((void(*)())dest)(); ``` ### Position-Independent Code (PIC) Techniques | Method | Platform | Notes | |--------|----------|-------| | Call/Pop | Windows | Push next addr, pop into register | | FPU state | Windows | `fstenv` saves instruction pointer | | SEH | Windows | Exception handler stores EIP | | GOT | Linux | Global Offset Table | | VDSO | Linux | Kernel-provided shared object | --- ## Windows API Resolution (PEB Walk) Identifying `kernel32.dll` without imports: 1. Get `PEB` via `gs:[0x60]` (x64) or `fs:[0x30]` (x86) 2. Walk `PEB->Ldr.InMemoryOrderModuleList` — order: exe → ntdll → kernel32 3. Hash-compare module names to locate `kernel32` 4. Parse the Export Address Table (EAT) 5. Find `GetProcAdd...

Details

Author
0xwilliamortiz
Repository
0xwilliamortiz/claude-red
Created
1 months ago
Last Updated
1 months ago
Language
JavaScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Data & Documents Featured

offensive-shellcode

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.

3,234 Updated 1 weeks ago
SnailSploit
Data & Documents Featured

offensive-windows-privesc

Comprehensive Windows privilege escalation methodology for offensive security engagements. Covers the full attack surface from a standard user shell to NT AUTHORITY\SYSTEM: token impersonation via SeImpersonate and SeAssignPrimaryToken privileges using JuicyPotato, PrintSpoofer, GodPotato, SweetPotato, and RoguePotato; service misconfigurations including unquoted service paths, weak service DACLs, writable service binaries, and insecure service creation permissions; AlwaysInstallElevated MSI exploitation; DLL hijacking through search order abuse, phantom DLL loading, and writable PATH directory injection; UAC bypass techniques via fodhelper.exe, eventvwr.exe, CMSTP, and environment variable manipulation; scheduled task abuse for writable task actions and new task creation; registry autorun exploitation for persistence and escalation; PrintNightmare (CVE-2021-34527) for remote and local privilege escalation; and credential harvesting from SAM database extraction, DPAPI blob decryption, LSA secret dumping, and

3,234 Updated 1 weeks ago
SnailSploit
DevOps & Infrastructure Listed

code-reverse-engineering-binary

Trigger when the user asks to reverse engineer a closed-source Windows PE binary, DLL, COM server, or unknown binary format on Linux — where the target is NOT known to be Qt5. Use for: "analyze this DLL", "what does this EXE do", "decode this binary protocol", "trace Windows API calls", "find the network protocol", "reverse this file format", "hook send/recv on this process". For confirmed Qt5 targets, use code-re-qt5 instead.

8 Updated today
tstapler