Transform vulnerability write-ups into fully functional, runnable security labs
LabGenie is a terminal-first, interactive CLI tool that takes a vulnerability write-up URL and produces a complete, runnable lab environment ready for security research and education.
- Python 3.10 or higher
- Option A: Google Gemini API key (Get one here) - Recommended
- Option B: Google Cloud Project with Vertex AI enabled
- Clone or navigate to this directory
cd /path/to/LabGenie- Run the setup script
bash setup.shThis will:
- Create a Python virtual environment
- Install all dependencies
- Check for required API keys
- Make the CLI executable
- Configure your AI provider
Option A: Gemini API (Recommended)
export GOOGLE_API_KEY='your-gemini-api-key'Option B: Vertex AI (Enterprise)
export GOOGLE_CLOUD_PROJECT='your-gcp-project-id'
gcloud auth application-default loginOr create a .env file:
cp .env.example .env
# Edit .env and add your API key# Activate virtual environment (if not already active)
source venv/bin/activate
# Interactive mode (default)
python labgenie.py
# Direct URL mode
python labgenie.py --url https://example.com/vuln-writeup
# Debug mode for detailed output
python labgenie.py --debugSimply run the CLI and provide a vulnerability write-up URL:
$ python labgenie.py
🔗 Write-up URL: https://example.com/blog/sqli-vulnerabilityThe CLI will then:
- Convert the write-up to structured markdown
- Parse vulnerability information and reproduction steps
- Plan the lab architecture and components
- Build complete, runnable lab artifacts
All generated files are saved to ./output/{labname}/:
output/
└── sqli_vulnerability_lab/ # Lab name extracted from vulnerability
├── lab_manifest.json # Complete lab metadata
├── README.md # Lab setup instructions
├── docker-compose.yml # Container orchestration
└── src/ # Application source code
LabGenie implements a four-stage AI agent workflow. For detailed information about the system architecture, agent designs, and technical implementation, see:
- Architecture - System design and agent workflow
- Troubleshooting - Common issues and solutions
Contributions are welcome!
LabGenie is inspired by the paper From CVE Entries to Verifiable Exploits. Shoutout to the researchers at UC Santa Barbara who created it—it's a wonderful multi-agent framework that generates POC code from CVE entries. Their approach inspired LabGenie, which tackles a related challenge from a different angle. Huge thanks to the contributors of the whitepaper for lighting the way.
Made with 🧞 magic by LabGenie