| name | llm-and-ai-security |
| description | Security and safety assessment for LLM applications, AI agents, and AI-integrated systems. Covers OWASP LLM Top 10 2025, prompt injection, jailbreaking, training data attacks, model extraction, AI plugin abuse, agentic system risks, and AI red teaming methodology.
|
| applyTo | **/* |
LLM & AI Security Assessment
Purpose
Test the security and safety posture of systems that embed, expose, or rely on large language models and other AI/ML components. AI introduces an entirely new class of attack vectors beyond traditional web vulnerabilities: adversarial inputs that manipulate model behavior, data leakage through inference, agentic systems that execute actions on behalf of the model, and safety failures that cause harm or legal exposure. This skill applies the OWASP LLM Top 10 (2025) and AI red teaming methodology to assess AI-integrated targets.
Triggers
- Target application uses an LLM (ChatGPT, Claude, Gemini, open-source models)
- AI chatbot, copilot, or assistant interface discovered during recon
- AI agents or agentic workflows in scope (tools, plugins, function-calling)
- Text-to-image, code generation, or other GenAI features in scope
- AI red teaming exercise requested
- Recon identifies AI API endpoints (OpenAI, Anthropic, Cohere, Mistral, etc.)
- Mobile/web app with conversational AI interface
- AI model deployed behind internal API
Required Inputs
| Input | Description | Required |
|---|
governance_context | Active engagement governance record | Yes |
ai_target | Application, API endpoint, or model interface | Yes |
ai_type | LLM chatbot / AI agent / GenAI feature / fine-tuned model | Auto-detected |
model_info | Model provider and name if known (GPT-4, Claude, Gemini, etc.) | Recommended |
system_prompt | System prompt if accessible or inferable | Recommended |
integration_context | What tools/APIs the AI can access (RAG, web, code exec, email, etc.) | Recommended |
source_code | Application code calling the AI API | Recommended |
AI Safety vs AI Security
Before testing, classify the scope:
| Domain | Focus | Risk Profile |
|---|
| AI Security | Protecting the AI system from external threats | Confidentiality, Integrity, Availability of the system the AI is embedded in |
| AI Safety | Protecting the world from the AI system | Harmful content generation, policy violations, unintended behavior, bias |
55% of AI vulnerabilities reported on HackerOne are AI safety issues. Both domains require testing. Clarify with governance which is in scope, or test both.
Workflow
1. Scope & Governance Verification
- Confirm AI system is within authorized scope
- Confirm AI safety testing is authorized (distinct from AI security — check with stakeholder)
- Document: model provider, integration depth, data sensitivity, regulatory context (EU AI Act, NIST AI RMF applicability)
- Identify if target must comply with EU AI Act (high-risk category?), NIST AI RMF, or OWASP AI standards
2. AI Attack Surface Mapping
- Identify all input vectors to the AI (text, images, documents, audio, API parameters)
- Map what tools/APIs the AI can invoke (file system, email, web browsing, code execution, databases)
- Identify where context comes from (user prompt, RAG retrieval, system prompt, conversation history)
- Determine the AI's trust model: what does it trust unconditionally vs. treat as untrusted input?
- List externally-sourced data the AI processes (emails, web pages, uploaded files, search results)
3. OWASP LLM Top 10 (2025) Review
LLM01: Prompt Injection
LLM02: Sensitive Information Disclosure
LLM03: Supply Chain Vulnerabilities
LLM04: Data and Model Poisoning
LLM05: Insecure Output Handling
LLM06: Excessive Agency
LLM07: System Prompt Leakage
LLM08: Vector and Embedding Weaknesses
LLM09: Misinformation
LLM10: Unbounded Consumption
4. Jailbreaking Assessment (AI Safety)
5. Agentic System Testing (if applicable)
6. AI Integration Security
7. AI Regulatory Compliance Check (advisory)
8. Classify & Route — Per severity-matrix.md, route to bug-bounty-triage
Severity Guidance for AI Findings
| Finding Type | Baseline Severity | Escalation Conditions |
|---|
| System prompt full extraction | S3 | Escalate to S2 if prompt contains credentials or PII |
| Direct prompt injection | S3 | Escalate to S1 if enables tool misuse, data exfiltration, or RCE |
| Indirect prompt injection → data exfiltration | S1–S2 | Impact-dependent |
| Jailbreak (safety bypass only) | S3–S4 | Escalate if enables CBRN content or mass harm |
| Agent unauthorized tool execution | S1–S2 | Depends on tool impact |
| PII leakage via model output | S2–S3 | Depends on sensitivity and volume |
| Training data extraction | S2 | Escalate if trade secrets or PII recovered |
| AI endpoint missing auth | S2 | Escalate if tenant isolation broken |
Allowed Actions
- Probe AI interfaces with crafted inputs and adversarial prompts
- Test prompt injection, jailbreaking, and safety bypass (within authorized scope)
- Attempt system prompt extraction
- Test agent tool-use boundaries
- Analyze model responses for data leakage
- Review source code for insecure AI integration patterns
- Test AI API endpoints for standard web vulns (IDOR, auth bypass, etc.)
- Test indirect injection via documents, emails, URLs (within scope)
- Generate hallucination test cases
- Analyze AI pipeline configuration
Forbidden Actions
- Extract or retain actual user data obtained through model vulnerabilities
- Register packages with hallucinated names (even for proof-of-concept)
- Attempt to extract CBRN or other genuinely harmful information beyond authorization
- Test AI systems not within authorized scope
- Poison production data stores (RAG, fine-tuning datasets) without explicit authorization
- Perform unbounded resource consumption attacks (test once, document, stop)
- Use AI-assisted techniques to attack out-of-scope systems
Output Format
### [FINDING-ID]: [Title]
| Field | Value |
|-------|-------|
| **Severity** | [S1-S5] |
| **Confidence** | [C1-C4] |
| **Status** | Suspected / Confirmed |
| **Category** | [OWASP LLM Top 10 category / AI Safety / AI Security] |
| **Model/System** | [Model name or AI feature affected] |
| **AI Type** | LLM Chatbot / AI Agent / GenAI Feature / RAG System |
| **Domain** | AI Security / AI Safety / Both |
#### Issue Summary
[What the vulnerability is and how it manifests in the AI system]
#### Evidence
**Injection/Attack Payload:**
\```
[Exact prompt or input used]
\```
**Model Response:**
\```
[Model output — redact any sensitive data extracted]
\```
**Reproduction Steps:**
1. [Authenticate / access AI interface]
2. [Send payload as described]
3. [Observe response demonstrating the issue]
#### Impact
[What an attacker can achieve: data exfiltration, model manipulation, unauthorized action, safety bypass, etc.]
#### Remediation
[Specific mitigation: input validation, output filtering, reduced agent permissions, human-in-the-loop, system prompt hardening, etc.]
#### Validation Notes
[How to verify the fix: expected model behavior after mitigation]
References
references/llm-owasp-top-10.md — OWASP LLM Top 10 2025 detailed checklist
references/severity-matrix.md — Severity classification
references/tool-recommendations.md — AI/LLM testing tools (Garak, PyRIT, promptfoo)