Skip to main content

ROYCREW

AI-Powered Penetration Testing Assistant

ROYCREW is an autonomous penetration testing agent that combines OpenAI GPT-4o with the Model Context Protocol (MCP) and a RAG knowledge base. It helps security professionals conduct authorized penetration tests through natural language commands.

Features

  • Interactive Chat Mode — Free-form conversation with the AI agent for guided pentesting
  • Automated Workflows — Pre-built pentest workflows (Recon, Web App, Network, Full Pentest)
  • Autonomous Agent Mode — Goal-driven autonomous operation using Pentesting Task Trees (PTT)
  • 18 Security Tools via MCP — Nmap, Nuclei, SQLMap, Hydra, Metasploit, FFUF, Masscan, HTTPx, Katana, Amass, Arjun, Assetfinder, AlterX, ShuffleDNS, SSL Scanner, and more
  • RAG Knowledge Base — Embedding-based retrieval for pentesting knowledge
  • Streaming Output — Real-time display of LLM responses and tool results
  • Automated Reporting — Markdown reports with findings, severity ratings, and remediation

Quick Start

1. Install Dependencies

cd roycrew
pip install -r requirements.txt

2. Configure API Key

cp .env.example .env
# Edit .env and add your OpenAI API key

3. Run

python main.py

4. Configure Tools (Optional)

From the main menu, select Option 4 to configure MCP tool servers. ROYCREW will auto-detect installed security tools on your system.

Project Structure

roycrew/
├── main.py                    # Entry point
├── config/
│   ├── app_config.py          # Singleton config (API keys, client)
│   └── constants.py           # Branding, prompts, limits
├── core/
│   ├── pentest_agent.py       # Main orchestrator
│   ├── agent_runner.py        # LLM query execution with streaming
│   ├── agent_mode_controller.py  # Autonomous agent loop
│   ├── model_manager.py       # Token counting (tiktoken)
│   ├── ptt_reasoning.py       # Task tree prompt engineering
│   └── task_tree_manager.py   # Hierarchical task tree
├── knowledge/
│   └── wordlist.txt           # Default knowledge base
├── rag/
│   ├── embedding.py           # Embedding test script
│   └── knowledge_base.py      # RAG with cosine similarity
├── reporting/
│   └── generators.py          # Markdown report generators
├── tools/
│   ├── mcp_manager.py         # MCP server connections
│   └── configure_mcp.py       # Interactive tool configuration
├── ui/
│   ├── conversation_manager.py # Token-aware chat history
│   └── menu_system.py         # Terminal UI
└── workflows/
    ├── workflow_definitions.py # 4 predefined workflows
    └── workflow_engine.py      # Sequential step execution

Supported Tools

Tool Category Description
Nmap Scanning Network port scanning and service detection
Masscan Scanning High-speed port scanning
Nuclei Vuln Scan Template-based vulnerability scanning
SQLMap Exploitation SQL injection testing
Hydra Exploitation Network brute forcing
Metasploit Exploitation Exploitation framework
FFUF Discovery Web fuzzing and directory brute-force
HTTPx Discovery HTTP probing and tech detection
Katana Discovery Web crawling
Amass Recon Subdomain enumeration
Assetfinder Recon Subdomain discovery
Arjun Discovery HTTP parameter discovery
AlterX Recon Subdomain wordlist generation
ShuffleDNS Recon DNS brute forcing
SSL Scanner Analysis SSL/TLS analysis
Scout Suite Cloud Cloud security auditing
Wayback URLs Recon Historical URL retrieval
Cert Transparency Recon Certificate log search

Operating Modes

Interactive Mode

Chat directly with the AI agent. Use natural language to describe what you want to test.

Automated Workflows

Choose from 4 pre-built workflows:

  1. Reconnaissance — Target information gathering
  2. Web Application — OWASP-focused web app testing
  3. Network Infrastructure — Network-level assessment
  4. Full Pentest — All phases combined

Agent Mode (Autonomous)

Provide a goal and target. The agent autonomously:

  • Generates a Pentesting Task Tree (PTT)
  • Selects and executes tasks by priority
  • Analyzes results and generates follow-up tasks
  • Produces a final report

Requirements

  • Python 3.10+
  • OpenAI API key
  • Node.js + npm (for MCP tool servers)
  • Security tools installed on your system

Disclaimer

ROYCREW is designed for authorized security testing only. Always ensure you have proper written authorization before conducting penetration tests. The authors are not responsible for any misuse of this tool.

License

MIT License

Metadata

Release files for roycrew 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for roycrew 1.0.1
File Size Uploaded
roycrew-1.0.1.tar.gz 63.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for roycrew 1.0.1
File Interpreter ABI Platform
roycrew-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 140.5 kB

Release files / roycrew-1.0.1.tar.gz

Download URL roycrew-1.0.1.tar.gz
Size 63.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b9d556f00c179c65644469f043f2ac981716d259f9ebac91f3c4f07661fcd5d3
BLAKE2b-256 checksum
How to use checksums
923ed6370b4d647107b46a3d916492de77a71de24d884aff6cb11713d8ce6e79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / roycrew-1.0.1-py3-none-any.whl

Download URL roycrew-1.0.1-py3-none-any.whl
Size 76.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3df69f5a3a171652a82f0e2f080ebaef746c8c92480fe22bd2a9d1a480c1f8ce
BLAKE2b-256 checksum
How to use checksums
79e0c2841ffa35544da276752b98d0634f0c9f2bba4ff1258151013b5b350fa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page