Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add Miosa-osa/OSA --skill offensive-shellcodegit clone --depth 1 https://github.com/Miosa-osa/OSAWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/miosa-osa/osa/offensive-shellcode)<a href="https://agentmods.dev/skills/miosa-osa/osa/offensive-shellcode"><img src="https://agentmods.dev/badge/skills/miosa-osa/osa/offensive-shellcode/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/miosa-osa/osa/offensive-shellcode"><img src="https://agentmods.dev/badge/skills/miosa-osa/osa/offensive-shellcode.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00085 | $0.05760 |
| Opus 5.5 | $0.00034 | $0.02304 |
| Sonnet 5.5 | $0.00017 | $0.01152 |
| Haiku 4.5 | $0.00009 | $0.00576 |
Grade A, and why
offensive-shellcode scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
89% identical to offensive-shellcode — 40 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 516 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Shellcode Development Workflow
- Define concept and target platform (x86/x64, Windows/Linux/macOS)
- Write assembly using position-independent techniques
- Extract binary and test in controlled environment
- Apply null byte avoidance and optimizations
- Encode/encrypt to evade static detection
- Package with loader and choose delivery method
Basic Concepts
Execution Pattern (Allocate-Write-Execute)
Avoid direct PAGE_EXECUTE_READWRITE — prefer:
- Allocate with
PAGE_READWRITE - Write shellcode to allocated region
- Call
VirtualProtectto switch toPAGE_EXECUTE_READ
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:
- Get
PEBviags:[0x60](x64) orfs:[0x30](x86) - Walk
PEB->Ldr.InMemoryOrderModuleList— order: exe → ntdll → kernel32 - Hash-compare module names to locate
kernel32 - Parse the Export Address Table (EAT)
- Find
GetProcAddressby name hash, then resolveLoadLibraryA - Use
LoadLibraryAto loadWS2_32.dll, resolve Winsock functions
WinDbg helpers for debugging PEB walk:
dt nt!_TEB -y ProcessEnvironmentBlock @$teb
dt nt!_PEB -y Ldr <peb_addr>
dt -r _PEB_LDR_DATA <ldr_addr>
dt _LDR_DATA_TABLE_ENTRY (<init_flink_addr> - 0x10)
lm m kernel32 # verify base address
r @r8 # check register
Shellcode Loaders
Loader Responsibilities
- Environment verification / keying (sandbox detection)
- Shellcode decryption
- Safe memory allocation and injection
- Ends its duties after injecting
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 516 lines · 85 tokens per session scan A d41fd761f24c
offensive-shellcode is a skill published in the GitHub repository Miosa-osa/OSA (78 stars, last pushed 9d ago), licensed Apache-2.0. It adds 85 tokens to every session and 5,760 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 89% identical to offensive-shellcode, differing in 40 lines, and is treated as a copy.
Other skills, from other repositories
unit-converter
Converts between common units of measurement including temperature, distance, and weight.
code-review
Reviews code changes for quality, security, and best practices.
tui-design
This skill should be used when designing terminal user interfaces, creating TUI layouts, choosing TUI color schemes, implementing keyboard navigation, building terminal dashboards, or working with any TUI framework. Activates on mentions of TUI design, terminal UI, Ratatui layout, Ink components, Textual widgets…
bun-development
Fast, modern JavaScript/TypeScript development with the Bun runtime, inspired by oven-sh/bun.
worker-mcp-orchestrator
Guides the coordinator agent on how to orchestrate, delegate to, and supervise local worker agents using the worker-mcp server.
clack
Build and maintain interactive Node.js/Bun CLIs with Clack (@clack/prompts and @clack/core). Use when an AI agent needs to design prompt flows, implement cancellation-safe input handling, add spinners/log/note UX, apply Clack best practices, or generate runnable examples aligned with official Clack docs.