# AI LLM Red Team Handbook - Scripts Production-ready security testing scripts for LLM applications, extracted from the AI LLM Red Team Handbook. ## ๐Ÿ“š Quick Links - **[Full Documentation](docs/README.md)** - Complete guide to all scripts - **[Quick Start Guide](docs/QUICKSTART.md)** - Get started in minutes - **[Testing Guide](docs/TESTING_GUIDE.md)** - Comprehensive testing framework - **[Configuration Guide](docs/Configuration.md)** - Setup and configuration details ## ๐Ÿš€ Quick Start ```bash # Install dependencies ./tools/install.sh # Activate environment source venv/bin/activate # Run a script example python3 prompt_injection/inject_prompt.py --help # Or run a utility python3 utils/api_client.py --help ``` ## ๐Ÿ“ Directory Structure ```text scripts/ โ”œโ”€โ”€ docs/ # Documentation โ”œโ”€โ”€ config/ # Configuration files โ”œโ”€โ”€ tools/ # Development & validation tools โ”œโ”€โ”€ examples/ # Example scripts โ”œโ”€โ”€ tests/ # Testing framework โ”œโ”€โ”€ logs/ # Runtime logs โ”‚ โ”œโ”€โ”€ automation/ # Attack orchestration (4 scripts) โ”œโ”€โ”€ compliance/ # Security standards (16 scripts) โ”œโ”€โ”€ data_extraction/ # Data leakage techniques (53 scripts) โ”œโ”€โ”€ evasion/ # Filter bypass methods (14 scripts) โ”œโ”€โ”€ jailbreak/ # Guardrail bypasses (21 scripts) โ”œโ”€โ”€ model_attacks/ # Model theft & DoS (23 scripts) โ”œโ”€โ”€ multimodal/ # Cross-modal attacks (15 scripts) โ”œโ”€โ”€ plugin_exploitation/ # Plugin/API exploits (128 scripts) โ”œโ”€โ”€ post_exploitation/ # Persistence techniques (6 scripts) โ”œโ”€โ”€ prompt_injection/ # Prompt injection (41 scripts) โ”œโ”€โ”€ rag_attacks/ # RAG poisoning (13 scripts) โ”œโ”€โ”€ reconnaissance/ # LLM fingerprinting (2 scripts) โ”œโ”€โ”€ social_engineering/ # Manipulation techniques (8 scripts) โ”œโ”€โ”€ supply_chain/ # Supply chain attacks (29 scripts) โ””โ”€โ”€ utils/ # Common utilities (13 scripts) ``` **Total:** 386+ production-ready scripts across 15 attack categories ## ๐Ÿ”ง Configuration - **Python:** 3.8+ - **Dependencies:** See [config/requirements.txt](config/requirements.txt) - **Testing:** See [config/pytest.ini](config/pytest.ini) ## ๐Ÿงช Testing Run comprehensive tests: ```bash ./tests/run_comprehensive_tests.sh ``` See [docs/TESTING_GUIDE.md](docs/TESTING_GUIDE.md) for detailed testing options. ## ๐Ÿ› ๏ธ Development Tools Located in `tools/`: - **`install.sh`** - Automated installation script - **`validation/`** - Health checks, link validation, linting - **`build/`** - Script generation and build tools (archived) ## ๐Ÿ“– Examples Example implementations in `examples/`: - **`c2_server_elite.py`** - Advanced C2 server demonstration - **`runner.py`** - Test runner framework - **`models.py`** - Data models for testing ## โš ๏ธ Security Warning **These scripts are for authorized security testing only.** - Only use against systems you own or have explicit permission to test - Follow all applicable laws and regulations - Respect rules of engagement and scope boundaries - Document all activities for evidence and audit trails ## ๐Ÿ“„ License Refer to the main repository license. ## ๐Ÿค Contributing See the [full documentation](docs/README.md) for contribution guidelines. --- **Source:** AI LLM Red Team Handbook **Scripts:** 386+ from 53 handbook chapters **Last Updated:** 2026-01-07