$npx -y skills add ShulkwiSEC/bb-huge --skill ai-prompt-leakingSystematically extract hidden system prompts, core directives, and invisible context intentionally concealed within Large Language Model (LLM) applications. This skill utilizes targeted linguistic engineering and boundary manipulation to bypass prompt opacity.
| 1 | # AI Prompt Leaking |
| 2 | |
| 3 | ## When to Use |
| 4 | - When analyzing an AI-powered system (customer support bot, coding assistant, data analyst) to uncover its proprietary internal instructions, hidden API keys, or pre-configured biases. |
| 5 | - To demonstrate how seemingly secure conversational agents can be tricked into revealing their foundational programming. |
| 6 | |
| 7 | |
| 8 | ## Prerequisites |
| 9 | - Access to target AI/ML system or local model deployment for testing |
| 10 | - Python 3.9+ with relevant ML libraries (transformers, torch, openai) |
| 11 | - Understanding of LLM architecture and prompt processing pipelines |
| 12 | - Authorized scope and rules of engagement for AI red team testing |
| 13 | |
| 14 | ## Workflow |
| 15 | |
| 16 | ### Phase 1: Context Boundary Testing |
| 17 | |
| 18 | ```text |
| 19 | # Concept: The LLM ``` |
| 20 | |
| 21 | ### Phase 2: Targeted Extraction Prompts |
| 22 | |
| 23 | ```text |
| 24 | # ``` |
| 25 | |
| 26 | ### Phase 3: Translation and Obfuscation Exploitation |
| 27 | |
| 28 | ```text |
| 29 | # ``` |
| 30 | |
| 31 | ### Phase 4: Summarization Attacks |
| 32 | |
| 33 | ```text |
| 34 | # ``` |
| 35 | |
| 36 | #### Decision Point 🔀 |
| 37 | ```mermaid |
| 38 | flowchart TD |
| 39 | A[Formulate Prompt ] --> B{Prompt Leaked ]} |
| 40 | B -->|Yes| C[Document System ] |
| 41 | B -->|No| D[Refine ] |
| 42 | C --> E[Exploit Further ] |
| 43 | ``` |
| 44 | |
| 45 | ## 🔵 Blue Team Detection & Defense |
| 46 | - **Strict Delimiters**: **Heuristic Output Filtering**: Key Concepts |
| 47 | | Concept | Description | |
| 48 | |---------|-------------| |
| 49 | ## Output Format |
| 50 | ``` |
| 51 | Ai Prompt Leaking — Assessment Report |
| 52 | ============================================================ |
| 53 | Target: [Target identifier] |
| 54 | Assessor: [Operator name] |
| 55 | Date: [Assessment date] |
| 56 | Scope: [Authorized scope] |
| 57 | MITRE ATT&CK: [Relevant technique IDs] |
| 58 | |
| 59 | Findings Summary: |
| 60 | [Finding 1]: [Severity] — [Brief description] |
| 61 | [Finding 2]: [Severity] — [Brief description] |
| 62 | |
| 63 | Detailed Results: |
| 64 | Phase 1: [Phase name] |
| 65 | - Result: [Outcome] |
| 66 | - Evidence: [Screenshot/log reference] |
| 67 | - Impact: [Business impact assessment] |
| 68 | |
| 69 | Phase 2: [Phase name] |
| 70 | - Result: [Outcome] |
| 71 | - Evidence: [Screenshot/log reference] |
| 72 | - Impact: [Business impact assessment] |
| 73 | |
| 74 | Risk Rating: [Critical/High/Medium/Low/Informational] |
| 75 | Recommendations: |
| 76 | 1. [Immediate remediation step] |
| 77 | 2. [Long-term hardening measure] |
| 78 | 3. [Monitoring/detection improvement] |
| 79 | ``` |
| 80 | |
| 81 | |
| 82 | ## 📚 Shared Resources |
| 83 | > For cross-cutting methodology applicable to all vulnerability classes, see: |
| 84 | > - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain patterns |
| 85 | > - [`_shared/references/elite-report-writing.md`](../_shared/references/elite-report-writing.md) — HackerOne-optimized report writing, CWE quick reference |
| 86 | > - [`_shared/references/real-world-bounties.md`](../_shared/references/real-world-bounties.md) — Verified disclosed bounties by vulnerability class |
| 87 | |
| 88 | ## References |
| 89 | - Learn Prompting: [Prompt Leaking](https://learnprompting.org/docs/prompt_hacking/leaking) |