> For the complete documentation index, see [llms.txt](https://cph-sec.gitbook.io/ai-llm-red-team-handbook-and-field-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cph-sec.gitbook.io/ai-llm-red-team-handbook-and-field-manual/readme.md).

# README

![](https://633807366-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS47JFAYVSkba1eVNFwFM%2Fuploads%2Fgit-blob-076d4fd531d34a162ab4cafd4869c9182607d826%2Fbanner.svg?alt=media)

Welcome to the **AI LLM Red Team Handbook**.

We designed this toolkit for security consultants, red teamers, and AI engineers. It provides end-to-end methodologies for identifying, assessing, and mitigating risks in Large Language Models (LLMs) and Generative AI systems.

***

## 🚀 Choose Your Path

| **🔬 The Consultant's Handbook**                                                                                                                    | **⚔️ The Field Manual**                                                                                                                   |
| --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| <p><br><br>The foundational work. Theoretical deep-dives, detailed methodologies, compliance frameworks, and strategies for building a program.</p> | <p><br><br>The hands-on work. Operational playbooks, copy-paste payloads, quick reference cards, and checklists for live engagements.</p> |
| [**📖 Browse Handbook Chapters**](#-handbook-structure)                                                                                             | [**⚡ Go to Field Manuals**](https://github.com/Shiva108/ai-llm-red-team-handbook/blob/main/docs/Field_Manual_00_Index.md)                 |

***

## 📚 Handbook Structure

<details>

<summary>Part I: Foundations (Ethics, Legal, Mindset)</summary>

* [Chapter 1: Introduction to AI Red Teaming](/ai-llm-red-team-handbook-and-field-manual/chapter_01_introduction_to_ai_red_teaming.md)
* [Chapter 2: Ethics, Legal, and Stakeholder Communication](/ai-llm-red-team-handbook-and-field-manual/chapter_02_ethics_legal_and_stakeholder_communication.md)
* [Chapter 3: The Red Teamer's Mindset](/ai-llm-red-team-handbook-and-field-manual/chapter_03_the_red_teamers_mindset.md)

</details>

<details>

<summary>Part II: Project Preparation (Scoping, Threat Modeling)</summary>

* [Chapter 4: SOW, Rules of Engagement, and Client Onboarding](/ai-llm-red-team-handbook-and-field-manual/chapter_04_sow_rules_of_engagement_and_client_onboarding.md)
* [Chapter 5: Threat Modeling and Risk Analysis](/ai-llm-red-team-handbook-and-field-manual/chapter_05_threat_modeling_and_risk_analysis.md)
* [Chapter 6: Scoping an Engagement](/ai-llm-red-team-handbook-and-field-manual/chapter_06_scoping_an_engagement.md)
* [Chapter 7: Lab Setup and Environmental Safety](/ai-llm-red-team-handbook-and-field-manual/chapter_07_lab_setup_and_environmental_safety.md)
* [Chapter 8: Evidence, Documentation, and Chain of Custody](/ai-llm-red-team-handbook-and-field-manual/chapter_08_evidence_documentation_and_chain_of_custody.md)

</details>

<details>

<summary>Part III: Technical Fundamentals (Architecture, Tokenization)</summary>

* [Chapter 9: LLM Architectures and System Components](/ai-llm-red-team-handbook-and-field-manual/chapter_09_llm_architectures_and_system_components.md)
* [Chapter 10: Tokenization, Context, and Generation](/ai-llm-red-team-handbook-and-field-manual/chapter_10_tokenization_context_and_generation.md)
* [Chapter 11: Plugins, Extensions, and External APIs](/ai-llm-red-team-handbook-and-field-manual/chapter_11_plugins_extensions_and_external_apis.md)

</details>

<details>

<summary>Part IV: Pipeline Security (RAG, Supply Chain)</summary>

* [Chapter 12: Retrieval-Augmented Generation (RAG) Pipelines](/ai-llm-red-team-handbook-and-field-manual/chapter_12_retrieval_augmented_generation_rag_pipelines.md)
* [Chapter 13: Data Provenance and Supply Chain Security](/ai-llm-red-team-handbook-and-field-manual/chapter_13_data_provenance_and_supply_chain_security.md)

</details>

<details>

<summary>Part V: Attacks &#x26; Techniques (The Red Team Core)</summary>

* [Chapter 14: Prompt Injection](/ai-llm-red-team-handbook-and-field-manual/chapter_14_prompt_injection.md)
* [Chapter 15: Data Leakage and Extraction](/ai-llm-red-team-handbook-and-field-manual/chapter_15_data_leakage_and_extraction.md)
* [Chapter 16: Jailbreaks and Bypass Techniques](/ai-llm-red-team-handbook-and-field-manual/chapter_16_jailbreaks_and_bypass_techniques.md)
* [Chapter 17: Plugin and API Exploitation](/ai-llm-red-team-handbook-and-field-manual/chapter_17_01_fundamentals_and_architecture.md)
  * [Fundamentals and Architecture](/ai-llm-red-team-handbook-and-field-manual/chapter_17_01_fundamentals_and_architecture.md)
  * [API Authentication & Authorization](/ai-llm-red-team-handbook-and-field-manual/chapter_17_01_fundamentals_and_architecture/chapter_17_02_api_authentication_and_authorization.md)
  * [Plugin Vulnerabilities](/ai-llm-red-team-handbook-and-field-manual/chapter_17_01_fundamentals_and_architecture/chapter_17_03_plugin_vulnerabilities.md)
  * [API Exploitation & Function Calling](/ai-llm-red-team-handbook-and-field-manual/chapter_17_01_fundamentals_and_architecture/chapter_17_04_api_exploitation_and_function_calling.md)
  * [Third-Party Risks & Testing](/ai-llm-red-team-handbook-and-field-manual/chapter_17_01_fundamentals_and_architecture/chapter_17_05_third_party_risks_and_testing.md)
  * [Case Studies & Defense](/ai-llm-red-team-handbook-and-field-manual/chapter_17_01_fundamentals_and_architecture/chapter_17_06_case_studies_and_defense.md)
* [Chapter 18: Evasion, Obfuscation, and Adversarial Inputs](/ai-llm-red-team-handbook-and-field-manual/chapter_18_evasion_obfuscation_and_adversarial_inputs.md)
* [Chapter 19: Training Data Poisoning](/ai-llm-red-team-handbook-and-field-manual/chapter_19_training_data_poisoning.md)
* [Chapter 20: Model Theft and Membership Inference](/ai-llm-red-team-handbook-and-field-manual/chapter_20_model_theft_and_membership_inference.md)
* [Chapter 21: Model DoS and Resource Exhaustion](/ai-llm-red-team-handbook-and-field-manual/chapter_21_model_dos_resource_exhaustion.md)
* [Chapter 22: Cross-Modal and Multimodal Attacks](/ai-llm-red-team-handbook-and-field-manual/chapter_22_cross_modal_multimodal_attacks.md)
* [Chapter 23: Advanced Persistence and Chaining](/ai-llm-red-team-handbook-and-field-manual/chapter_23_advanced_persistence_chaining.md)
* [Chapter 24: Social Engineering with LLMs](/ai-llm-red-team-handbook-and-field-manual/chapter_24_social_engineering_llms.md)

</details>

<details>

<summary>Part VI: Defense &#x26; Mitigation</summary>

* [Chapter 25: Advanced Adversarial ML](/ai-llm-red-team-handbook-and-field-manual/chapter_25_advanced_adversarial_ml.md)
* [Chapter 26: Supply Chain Attacks on AI](/ai-llm-red-team-handbook-and-field-manual/chapter_26_supply_chain_attacks_on_ai.md)
* [Chapter 27: Federated Learning Attacks](/ai-llm-red-team-handbook-and-field-manual/chapter_27_federated_learning_attacks.md)
* [Chapter 28: AI Privacy Attacks](/ai-llm-red-team-handbook-and-field-manual/chapter_28_ai_privacy_attacks.md)
* [Chapter 29: Model Inversion Attacks](/ai-llm-red-team-handbook-and-field-manual/chapter_29_model_inversion_attacks.md)
* [Chapter 30: Backdoor Attacks](/ai-llm-red-team-handbook-and-field-manual/chapter_30_backdoor_attacks.md)

</details>

<details>

<summary>Part VII: Advanced Operations</summary>

* [Chapter 31: AI System Reconnaissance](/ai-llm-red-team-handbook-and-field-manual/chapter_31_ai_system_reconnaissance.md)
* [Chapter 32: Automated Attack Frameworks](/ai-llm-red-team-handbook-and-field-manual/chapter_32_automated_attack_frameworks.md)
* [Chapter 33: Red Team Automation](/ai-llm-red-team-handbook-and-field-manual/chapter_33_red_team_automation.md)
* [Chapter 34: Defense Evasion Techniques](/ai-llm-red-team-handbook-and-field-manual/chapter_34_defense_evasion_techniques.md)
* [Chapter 35: Post-Exploitation in AI Systems](/ai-llm-red-team-handbook-and-field-manual/chapter_35_post-exploitation_in_ai_systems.md)
* [Chapter 36: Reporting and Communication](/ai-llm-red-team-handbook-and-field-manual/chapter_36_reporting_and_communication.md)
* [Chapter 37: Remediation Strategies](/ai-llm-red-team-handbook-and-field-manual/chapter_37_remediation_strategies.md)
* [Chapter 38: Continuous Red Teaming](/ai-llm-red-team-handbook-and-field-manual/chapter_38_continuous_red_teaming.md)
* [Chapter 39: AI Bug Bounty Programs](/ai-llm-red-team-handbook-and-field-manual/chapter_39_ai_bug_bounty_programs.md)

</details>

<details>

<summary>Part VIII: Advanced Topics</summary>

* [Chapter 40: Compliance and Standards](/ai-llm-red-team-handbook-and-field-manual/chapter_40_compliance_and_standards.md)
* [Chapter 41: Industry Best Practices](/ai-llm-red-team-handbook-and-field-manual/chapter_41_industry_best_practices.md)
* [Chapter 42: Case Studies and War Stories](/ai-llm-red-team-handbook-and-field-manual/chapter_42_case_studies_and_war_stories.md)
* [Chapter 43: Future of AI Red Teaming](/ai-llm-red-team-handbook-and-field-manual/chapter_43_future_of_ai_red_teaming.md)
* [Chapter 44: Emerging Threats](/ai-llm-red-team-handbook-and-field-manual/chapter_44_emerging_threats.md)
* [Chapter 45: Building an AI Red Team Program](/ai-llm-red-team-handbook-and-field-manual/chapter_45_building_an_ai_red_team_program.md)
* [Chapter 46: Conclusion and Next Steps](/ai-llm-red-team-handbook-and-field-manual/chapter_46_conclusion_and_next_steps.md)

</details>

***

## 🧩 Reference & Resources

* [**Configuration Guide**](https://github.com/Shiva108/ai-llm-red-team-handbook/blob/main/scripts/docs/Configuration.md)
* [**Field Manual Index**](https://github.com/Shiva108/ai-llm-red-team-handbook/blob/main/docs/Field_Manual_00_Index.md)
