Skip to content
Back to skills

Basic Exploitation

ASecurity

Classic stack buffer-overflow methodology (Tier 2, crash-risky) — fuzz to crash, find the EIP/RIP offset, identify bad characters, locate a jump, and land a safe PoC (control transfer / calc) in a lab. Use for custom/legacy binaries and CTF-style targets where a stack overflow is suspected. Gated: full exploitation only in a lab or with explicit authorization.

  • 16 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 17, 2026
securityshellapibackend

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill basic-exploitation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Basic Exploitation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Basic Exploitation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-basic-exploitation/badge)](https://www.skillsdirectory.com/skills/anandjogawade-basic-exploitation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: basic-exploitation
description: "Classic stack buffer-overflow methodology (Tier 2, crash-risky) — fuzz to crash, find the EIP/RIP offset, identify bad characters, locate a jump, and land a safe PoC (control transfer / calc) in a lab. Use for custom/legacy binaries and CTF-style targets where a stack overflow is suspected. Gated: full exploitation only in a lab or with explicit authorization."
---

# Basic Stack Buffer Overflow (lab methodology)

The canonical stack-smash: overflow a local buffer, overwrite the saved return address, and redirect execution. This can crash the target — treat production carefully. The PoC should prove control (EIP/RIP = 0x42424242, or a benign payload), not deliver weaponized shellcode.

## Trigger phrases
`buffer overflow, stack overflow, eip control, offset, bad characters, jmp esp, seh overflow, pattern_create, vanilla bof`

## Execution gate
Before any crash-inducing step, confirm and record in `./.zazy/scope.md`:
(a) **Lab/authorized to exploit?** → if yes, run the full workflow below.
(b) If no → **dry run only**: identify the vulnerable version/component and the unsafe input path (static/version check), and stop before sending crash input. Never detonate on production without written RoE.

## Method (lab)
1. **Fuzz to crash:** send growing cyclic/`A`*N input to the input vector; attach a debugger (`gdb-peda`/`gef`/`pwndbg` on Linux, `x64dbg`/Immunity+mona on Windows) and catch the access violation / EIP overwrite.
2. **Find the offset:** `msf-pattern_create -l <N>` → crash → read EIP/RIP → `msf-pattern_offset -q <value>` (or `mona pattern`/`!mona findmsp`).
3. **Confirm control:** set the return field to `BBBB` → verify EIP/RIP = `0x42424242`.
4. **Bad characters:** send `\x00..\xff` in the buffer, compare memory, remove mangled bytes (`!mona bytearray` / manual diff).
5. **Find the jump:** locate `jmp esp`/`call esp` (or equivalent) in a non-ASLR, bad-char-free module (`!mona jmp -r esp`, `ropper`, `objdump`). Note DEP/ASLR/stack-canary status.
6. **Land a safe PoC:** place a short NOP sled + a benign demonstrator (e.g., `int3`/breakpoint, or `calc`/`/bin/sh` only in lab) after the saved RA. For DEP, pivot to a minimal ROP (→ `exploit-development`).
7. **SEH variant (Windows):** overwrite SEH → `pop pop ret` gadget → short jump to shellcode (`!mona seh`).

## Modern / rare techniques
- **[NEW] Mitigation triage first:** `checksec`/`!mona mod` — DEP/NX, ASLR/PIE, stack canary, SafeSEH/SEHOP decide whether a plain ret-overwrite works or you need ROP/info-leak (→ `exploit-development`).
- **[RARE] Partial EIP overwrite / off-by-one** when only a few bytes are controllable.
- **[NEW] Egghunter** when buffer space is tiny (`!mona egg`).

## Escalation / chaining
Full exploit (ROP/DEP/ASLR bypass) → `exploit-development`. Crash triage/exploitability → `crash-analysis`. Finding the bug by fuzzing → `fuzzing`/`overflow-probe`. Memory-corruption gadget discovery via RE → `reverse-engineer-anything`.

## Backend & tooling
Kali/WSL-Kali lab VM or a snapshot clone: `gdb` + `gef`/`pwndbg`/`peda`, `pwntools`, `ropper`/`ROPgadget`, `msf-pattern_*`; Windows lab: `x64dbg`/Immunity + `mona.py`. Never fuzz production from `zazy-orchestrator` without the gate cleared.

## Verification (background, before reporting)
Reproduce the crash and the controlled EIP/RIP at least twice from a clean state; confirm the bad-char set and gadget address are stable across runs. Demonstrate control with a benign PoC before claiming exploitability. Report confirmed, reproducible control only.

## Evidence
Crash dump + register state, offset, bad-char list, gadget address/module, and the benign PoC proving control + its reproduction steps. Remediation: compiler mitigations (stack canaries, DEP/NX, ASLR/PIE, FORTIFY), safe string APIs/bounds checks, input length validation, and patching the vulnerable version.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.