0xpwn
AI-powered penetration testing engine. Point it at a target and let a ReAct agent drive reconnaissance, scanning, and vulnerability discovery — all tools run inside a Docker sandbox so nothing touches the host.
Input: Target URL, hostname, IP, or CIDR via CLI Output: Structured findings with CVE enrichment, phase-by-phase execution logs
CLI ──▶ ReAct Agent ──▶ Docker Sandbox ──▶ Target
(Typer) (LLM-driven (Kali + nmap, (your scope)
tool selection) nuclei, ffuf,
httpx, subfinder)
Installation
Option 1: Install from PyPI (recommended)
pip install 0xpwn
Option 2: Install with pipx (isolated environment)
pipx install 0xpwn
Verify installation
0xpwn --help
Setup
1. Build the Sandbox Image
All scan tools run inside a Docker container based on Kali Linux:
docker build -t oxpwn-sandbox:dev docker/
2. Configure an LLM Provider
0xpwn uses LiteLLM — any supported provider works:
# Google Gemini
export GEMINI_API_KEY=your_key_here
# OpenAI
export OPENAI_API_KEY=your_key_here
# Anthropic
export ANTHROPIC_API_KEY=your_key_here
# Or use the generic key
export OXPWN_API_KEY=your_key_here
3. Run the Setup Wizard (optional)
0xpwn config wizard
Saves model and API key preferences to ~/.config/oxpwn/config.yaml.
Usage
Run a scan
# Basic scan with model specified
0xpwn scan --target example.com --model gemini/gemini-2.5-flash
# Use environment variable for model
export OXPWN_MODEL=gemini/gemini-2.5-flash
0xpwn scan --target 192.168.1.0/24
# Custom sandbox settings
0xpwn scan --target example.com \
--model openai/gpt-4o \
--sandbox-image oxpwn-sandbox:dev \
--network-mode bridge \
--max-iterations-per-phase 15
If no model is configured, the interactive wizard runs automatically.
Manage configuration
# Show current config
0xpwn config show
# Run setup wizard
0xpwn config wizard
# Reset configuration
0xpwn config reset
Available Tools
The ReAct agent selects tools autonomously based on the scan phase. All tools execute inside the Docker sandbox:
| Tool | What it does |
|---|---|
nmap |
Port scanning and service detection |
subfinder |
Subdomain enumeration |
httpx |
HTTP probing and technology detection |
nuclei |
Vulnerability scanning with templates |
ffuf |
Web fuzzing and directory discovery |
How It Works
0xpwn uses a ReAct (Reasoning + Acting) agent that plans and executes penetration testing in phases:
- Reconnaissance — Subdomain enumeration, port scanning, service fingerprinting
- Scanning — Vulnerability detection, web probing, directory fuzzing
- Analysis — CVE enrichment via NVD, finding correlation, risk assessment
Each phase runs up to N iterations (default 10). The agent decides which tool to run, parses the output, and feeds results into the next decision. Findings are enriched with CVE data from the National Vulnerability Database.
Scan Options
| Flag | Description | Default |
|---|---|---|
--target |
Target URL, hostname, IP, or CIDR | Required |
--model |
LLM model identifier (LiteLLM format) | OXPWN_MODEL env / config |
--llm-base-url |
Override LiteLLM base URL | None |
--sandbox-image |
Docker image for the sandbox | oxpwn-sandbox:dev |
--network-mode |
Docker network mode | bridge |
--max-iterations-per-phase |
Max ReAct iterations per phase | 10 |
Environment Variables
| Variable | Description |
|---|---|
OXPWN_MODEL |
Default LLM model |
OXPWN_API_KEY |
Generic API key (fallback) |
OXPWN_LLM_BASE_URL |
Override LiteLLM base URL |
OXPWN_SANDBOX_IMAGE |
Default sandbox Docker image |
OXPWN_SANDBOX_NETWORK_MODE |
Default Docker network mode |
OXPWN_MAX_ITERATIONS_PER_PHASE |
Default max iterations |
GEMINI_API_KEY |
Google Gemini API key |
OPENAI_API_KEY |
OpenAI API key |
ANTHROPIC_API_KEY |
Anthropic API key |
Architecture
src/oxpwn/
├── cli/ # Typer CLI, Rich streaming output, setup wizard
├── agent/ # ReAct agent loop, tool dispatch, event system
├── llm/ # LiteLLM client wrapper with error taxonomy
├── sandbox/ # Docker container lifecycle management
│ └── tools/ # Tool parsers (nmap, nuclei, httpx, ffuf, subfinder)
├── enrichment/ # NVD CVE lookup, caching, finding extraction
├── config/ # YAML config manager with env/CLI precedence
└── core/ # Data models (ScanState, Finding, ToolResult)
docker/
└── Dockerfile # Kali-based sandbox with pre-installed tools
Key design decisions:
- Docker isolation — all offensive tools run in a sandboxed container, never on the host
- LiteLLM abstraction — swap LLM providers without code changes
- Structured error taxonomy — every failure mode has a typed exception with actionable CLI output
- Phase-based execution — the agent progresses through recon → scanning → analysis with bounded iterations
Troubleshooting
| Error | Fix |
|---|---|
Sandbox image 'oxpwn-sandbox:dev' was not found |
Run docker build -t oxpwn-sandbox:dev docker/ |
Docker sandbox error |
Verify Docker daemon is running: docker ps |
LLM authentication failed |
Export the correct API key for your provider |
LLM rate limited |
Wait and retry, or switch to a provider with more quota |
Missing model configuration |
Pass --model, set OXPWN_MODEL, or run 0xpwn config wizard |
Contributing
Build from source
git clone https://github.com/vahagn-madatyan/0xpwn.git
cd 0xpwn
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
# Install with dev dependencies
pip install -e ".[dev]"
# Build the sandbox image
docker build -t oxpwn-sandbox:dev docker/
# Run from source
0xpwn --help
Run tests
# Unit tests only
pytest tests/unit/ -v --tb=short
# All tests (requires Docker + running services)
pytest tests/ -v
# Specific test file
pytest tests/unit/test_react_agent.py -v
Making a release
Releases are published to PyPI automatically via GitHub Actions when a version tag is pushed:
# Update version in pyproject.toml and src/oxpwn/__init__.py
# Commit the version bump
git tag v0.2.0
git push origin v0.2.0
The CI pipeline builds the distribution, runs tests, publishes to TestPyPI on every push, and publishes to PyPI on tags matching v*.
License
Metadata
Release files for 0xpwn 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| 0xpwn-0.1.1.tar.gz | 46.9 kB | With provenance | Details for 0xpwn-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 0xpwn-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for 0xpwn-0.1.1-py3-none-any.whl |
Total release size: 108.3 kB
Release files / 0xpwn-0.1.1.tar.gz
| Download URL | 0xpwn-0.1.1.tar.gz |
|---|---|
| Size | 46.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a44c9f836d3618c2897e99b0fc46cb70da53b7064546c0b78321528c7c4224f4
|
|
BLAKE2b-256 checksum How to use checksums |
deb4f652fcb8447999fc10b455f65f0e43535ee725d6338a2f315502c8cb6542
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 27, 2026.
Transparency logRelease files / 0xpwn-0.1.1-py3-none-any.whl
| Download URL | 0xpwn-0.1.1-py3-none-any.whl |
|---|---|
| Size | 61.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92731f4505bfa11569700e4fee89aab13e1d3cd996a2003987159e2c8d6efba7
|
|
BLAKE2b-256 checksum How to use checksums |
91bdcb0e6258be55b2946e2a6c53da034aba1e2b9c31fcf47ed40e80698d8d61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 27, 2026.
Transparency logSecurity for 0xpwn 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for 0xpwn-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.