Skip to content
Back to skills

Exploit Development

ASecurity

Develop working exploits using pwntools. Includes exploit template and common patterns.

  • 666 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added February 8, 2026
developmentpythonshelldebugging

Works with

  • cli

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill exploit-development --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Exploit Development?

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

Security grade badge for Exploit Development
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-exploit-development/badge)](https://www.skillsdirectory.com/skills/majiayu000-exploit-development)

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: exploit-development
description: Develop working exploits using pwntools. Includes exploit template and common patterns.
---

# Exploit Development

Build working exploits based on vulnerability analysis.

## Exploit Development Process

1. **Start from template** - Use `templates/exploit.py`
2. **Find offset** - Use cyclic pattern
3. **Identify target** - Win function, ROP chain, shellcode
4. **Handle mitigations** - Leak addresses if needed
5. **Build payload** - Padding + control flow hijack
6. **Test locally** - With and without GDB
7. **Test remote** - Adjust for remote environment

## Stack Consistency (CRITICAL)

**Always use fixed argv[0] and empty environment:**

```python
ARGV0 = "/pwn"
ENV = {}

def conn():
    if args.GDB:
        return gdb.debug([EXECUTABLE], env=ENV, argv=[ARGV0], gdbscript='...')
    else:
        return process([EXECUTABLE], env=ENV, argv=[ARGV0])
```

This ensures stack addresses match between normal run and GDB debug.

## Finding Offset

```python
# Generate pattern
from pwn import cyclic, cyclic_find
payload = cyclic(200)

# After crash, find offset
# In GDB: cyclic -l 0x61616168
offset = cyclic_find(0x61616168)
```

## Common Payload Patterns

### Simple ret2win
```python
payload = b'A' * offset
payload += p64(win_addr)
```

### ret2win with alignment
```python
payload = b'A' * offset
payload += p64(ret_gadget)  # 16-byte alignment
payload += p64(win_addr)
```

### ret2libc
```python
payload = b'A' * offset
payload += p64(ret_gadget)
payload += p64(pop_rdi)
payload += p64(binsh_addr)
payload += p64(system_addr)
```

### ROP with pwntools
```python
rop = ROP(elf)
rop.call('function', [arg1, arg2])
payload = b'A' * offset + rop.chain()
```

## Debugging Tips

- `context.log_level = 'debug'` for verbose output
- `gdb.attach(p)` to attach to running process
- `pause()` to stop and inspect
- Print addresses: `print(f"addr: {hex(addr)}")`

## Output

Produce `exploit.py` using the template.

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.

Comments

Loading comments…

Newsletter

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