Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Environment:0sec labs 0 pwntools

From Leeroopedia
Knowledge Sources
Domains Binary_Analysis, Dynamic_Analysis, PoV
Last Updated 2026-10-30 00:00 GMT

Overview

pwntools >= 4.12 for dynamic PoV (proof-of-vulnerability) confirmation and standalone replay script generation in the 0verse pipeline.

Description

pwntools is the PoC/exploit development library used by 0verse's dynamic confirmation stage. When a hypothesis is confirmed by the crash oracle, the `write_pov_script` function renders a standalone pwntools replay script to disk (`chmod +x`) so a PoV can be re-executed independently. The PoV includes input bytes, argv, environment, crash class, and the replay script. This realizes the PoV-is-truth principle: a finding without a reproducing PoV is a hypothesis, not a finding. pwntools is imported lazily so the core package loads without it.

Usage

Use this environment for the Dynamic_Confirmation stage of the Binary Vulnerability Discovery workflow. It is the mandatory prerequisite for executing LLM-proposed trigger inputs against target binaries and producing reproducible PoV scripts.

System Requirements

Category Requirement Notes
OS Linux pwntools relies on Linux process control primitives
Hardware 4 CPU cores, 4GB RAM Dynamic execution is lightweight
Disk 1GB pwntools + test binaries

Dependencies

System Packages

Python Packages

  • `pwntools` >= 4.12 (exploit development + process interaction library)

Credentials

No credentials required. This is a local dynamic execution environment.

Quick Install

# Install the PoC extra
pip install "0verse[poc]"

# Verify
python -c "from pwn import *; print('pwntools ready')"

Code Evidence

PoC extra declaration from `0verse/pyproject.toml:34`:

poc = ["pwntools>=4.12"]

mypy override for untyped pwntools from `0verse/pyproject.toml:110-112`:

[[tool.mypy.overrides]]
module = ["angr", "angr.*", "claripy", "claripy.*", "pwn", "pwnlib.*"]
follow_imports = "skip"
ignore_missing_imports = true

PoV replay script generation (from implementation page `0sec_labs_0_Dynamic_Confirmation.md`):

def write_pov_script(
    path: str | Path,
    binary: str | Path,
    pov: PoV,
) -> Path:
    """Write a standalone pwntools replay script (chmod +x) and return it."""

Common Errors

Error Message Cause Solution
`ImportError: No module named 'pwn'` pwntools not installed `pip install 0verse[poc]`
Replay script fails to reproduce crash Environment mismatch (different binary/OS) Re-run on the same target binary and OS
`mypy: Module 'pwn' has no attribute` pwntools is untyped Configured via `ignore_missing_imports = true` — not a real error

Compatibility Notes

  • macOS: Limited support; pwntools process control primitives are Linux-oriented.
  • Lazy import: The module imports pwntools lazily; the core package remains importable without it.
  • mypy: pwntools is untyped and excluded from strict type checking.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment