Skip to main content
ClaudeWave
EN, English
Skill8k repo starsupdated 16d ago

offensive-ai-security

This Claude Code skill provides a structured methodology for conducting security assessments of AI and language model systems. It covers offensive techniques including prompt injection, jailbreaking, model extraction, training data poisoning, and adversarial input testing. Use this skill when performing red-team evaluations of LLM systems, assessing AI application security, or researching vulnerabilities in machine learning deployments and their integration points.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/SnailSploit/Claude-Red /tmp/offensive-ai-security && cp -r /tmp/offensive-ai-security/Skills/ai/offensive-ai-security ~/.claude/skills/offensive-ai-security
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# SKILL: AI Pentest

## Metadata
- **Skill Name**: ai-security
- **Folder**: offensive-ai-security
- **Source**: https://github.com/SnailSploit/offensive-checklist/blob/main/ai.md

## Description
AI/LLM security offensive checklist: prompt injection, jailbreaking, model extraction, training data poisoning, adversarial inputs, LLM-assisted attack automation, and AI system reconnaissance. Use when assessing AI/ML systems, red-teaming LLMs, or researching AI attack vectors.

## Trigger Phrases
Use this skill when the conversation involves any of:
`AI security, LLM security, prompt injection, jailbreak, model extraction, training data poisoning, adversarial input, AI red team, ML security, RAG poisoning, AI attack`

## Instructions for Claude

When this skill is active:
1. Load and apply the full methodology below as your operational checklist
2. Follow steps in order unless the user specifies otherwise
3. For each technique, consider applicability to the current target/context
4. Track which checklist items have been completed
5. Suggest next steps based on findings

---

## Full Methodology

# AI Pentest

## Shortcut

- Understand the AI system, its components (LLM, APIs, data sources, plugins), and functionalities. Identify critical assets and potential business impacts.
- Collect details about the model, underlying technologies, APIs, and data flow.
- Vulnerability Assessment:
  - Use tools like `garak`, `LLMFuzzer` to identify common vulnerabilities.
  - Craft prompts to test for injections, jailbreaks, and biased outputs.
  - Probe for data leakage and insecure output handling.
  - Assess plugin security and excessive agency.
- Attempt to exploit identified vulnerabilities and chain them for greater impact (e.g., prompt injection leading to data exfiltration via excessive agency).
- If access is gained, explore possibilities like model theft, further data exfiltration, or lateral movement.

## Mechanisms

AI/LLM vulnerabilities stem from several core mechanisms:

- **Instruction Following & Ambiguity**: LLMs are designed to follow instructions (prompts). Ambiguous, malicious, or cleverly crafted prompts can trick them into unintended actions. The boundary between instruction and data is often blurry.
- **Data Dependency**: Models learn from vast datasets.
  - **Training Data Issues**: Biased, poisoned, or sensitive data in training sets can lead to skewed, insecure, or privacy-violating outputs.
  - **Input Data Issues**: Untrusted input data (user prompts, documents, web content) can be a vector for attacks like indirect prompt injection.
- **Complexity and Lack of Transparency ("Black Box" Nature)**: The internal workings of large models are complex and not always fully understood, making it hard to predict all possible outputs or identify all vulnerabilities.
- **Integration with External Systems (Agency & Plugins)**: LLMs are often given "agency" – the ability to interact with other systems, APIs, and tools (plugins). If these integrations are insecure or the LLM has excessive permissions, it can become a powerful attack vector.
- **Output Handling**: How the LLM's output is used by downstream applications is critical. If unvalidated output is fed into other systems, it can lead to code execution, XSS, SSRF, etc.
- **Resource Consumption**: LLMs can be resource-intensive. Specially crafted inputs can lead to denial of service by exhausting computational resources.
- **Supply Chain**: Vulnerabilities can exist in pre-trained models, third-party datasets, or the MLOps pipeline components.
- **Overreliance**: Humans placing undue trust in LLM outputs without verification can lead to the propagation of misinformation or the execution of flawed, AI-generated advice/code.
- **Policy‑Layer Conflicts** – layered provider, vendor and application rules can clash, creating latent bypass windows.
- **Sparse Fine‑Tuning Drift** – lightweight adapter training frequently overrides base‑model safety alignment.
- **Multi‑Modal Expansion** – V‑L and audio‑language models inherit text flaws while adding steganographic channels.
- **Model Extraction via Embeddings** – probing embedding space boundaries through carefully crafted prompts can leak training data membership or approximate model parameters.
- **Virtualization Attacks** – convincing the model it operates in a test/sandbox environment to bypass production safety rules.
- **Constitutional Jailbreaks** – exploiting conflicts between layered safety rules (provider policy vs. developer system prompt vs. user context).
- **Tool Chaining Escalation** – multi-agent frameworks allowing Agent A to delegate to Agent B to reach privileged Agent C, bypassing single-hop restrictions.
- **Memory Poisoning** – injecting persistent malicious instructions into agent memory systems (AutoGPT, CrewAI, LangChain Memory).
- **Tokenization Exploits** – zero-width characters, Unicode normalization mismatches between input sanitizers and model tokenizers.

## Hunt

### Preparation

1.  **Understand the Target AI System**:
    - What type of model is it (e.g., text generation, code generation, chat)?
    - What are its intended functions and capabilities?
    - What data does it process (input/output)? Sensitive data?
    - What external tools, APIs, or plugins does it interact with?
    - Are there any documented security measures or content filters?
2.  **Review OWASP Top 10 for LLM Applications**: Familiarize yourself with common attack vectors.
3.  **Gather Information/Reconnaissance**:
    - Identify API endpoints, input parameters, and output formats.
    - Look for publicly available information about the model, its version, and underlying technologies.
    - Understand the context in which the LLM operates (e.g., a chatbot on a website, a code assistant in an IDE).
4.  **Check Emerging Regulatory/Governance Requirements (EU AI Act 2025, ISO/IEC 42001)** – log any class‑specific controls or audit obligations the target claims to meet.
5.  **Map Trust Boundaries
offensive-active-directorySkill

Active Directory attack methodology for internal network red team engagements. Covers reconnaissance (BloodHound, PowerView, ADExplorer), credential abuse (Kerberoasting, ASREProasting, NTLM relay, LLMNR/NBT-NS poisoning), privilege escalation (ACL abuse, GPO abuse, unconstrained/constrained delegation), lateral movement (Pass-the-Hash, Pass-the-Ticket, Overpass-the-Hash, WMI/WinRM/PsExec), persistence (Golden/Silver/Diamond Tickets, DCSync, DCShadow, AdminSDHolder, Skeleton Key), forest trust attacks, ADCS abuse (ESC1-ESC15), and modern MDI/Defender for Identity evasion. Use when assessing on-prem AD, hybrid AD/Entra ID environments, or ADCS deployments.

offensive-advanced-redteamSkill

Comprehensive red team operations methodology covering full engagement lifecycle from planning through reporting. Addresses engagement scoping and rules of engagement negotiation, multi-tier C2 infrastructure design with redirectors and domain fronting, malleable traffic profiles and beacon tradecraft, OPSEC discipline including attribution avoidance and indicator management, EDR and AMSI evasion techniques using direct syscalls and unhooking, data collection with chain-of-custody controls, and structured reporting with purple team debrief workflows. Covers assumed-breach, external-to-internal, insider threat, and hybrid physical-cyber engagement scenarios with MITRE ATT&CK mapping throughout. Targets operators planning or executing adversary simulation engagements against mature defenders.

offensive-anti-forensicsSkill

Anti-forensics and evidence destruction techniques for red team operators conducting authorized engagements. Covers log clearing on Windows (wevtutil, Clear-EventLog, ETW provider patching) and Linux (journal truncation, utmp/wtmp binary editing, syslog manipulation), timestamp manipulation via Timestomp and SetMACE to defeat timeline analysis, filesystem-level anti-forensics including NTFS Alternate Data Streams for payload hiding and secure deletion with sdelete/shred, memory artifact removal to counter live forensics, disk artifact manipulation targeting MFT entries and USN journal records, network forensics evasion through encrypted C2 channels and DNS-over-HTTPS tunneling, and anti-VM/sandbox detection to avoid dynamic analysis environments. Tools: Timestomp, wevtutil, sdelete, shred, MimiPenguin, Invoke-Phant0m. Aligns to MITRE ATT&CK T1070 (Indicator Removal), T1027 (Obfuscated Files or Information), T1497 (Virtualization/Sandbox Evasion). Each technique includes the forensic artifact it targets, the destruction or manipulation method, and the defender perspective so operators understand detection gaps they must account for.

offensive-api-abuseSkill

Advanced API exploitation methodology focused on business logic abuse and sophisticated attack patterns that bypass traditional security controls. Covers business logic bypass through API call chaining and workflow manipulation. Addresses GraphQL-specific attacks including batching for credential brute-force, query depth exploitation, and introspection abuse. Includes pagination exploitation for data exfiltration, webhook hijacking for SSRF and data interception, and resource exhaustion through algorithmic complexity attacks. Covers race conditions in API transactions using parallel request techniques. Provides comprehensive JWT manipulation including algorithm confusion, kid injection, jku/x5u abuse, and claim tampering. Details API key leakage detection across source repositories, client-side code, and error messages. Covers undocumented endpoint discovery through predictable naming, debug routes, and source map analysis. Tooling includes Arjun, ParamSpider, jwt_tool, and GraphQL Voyager. Designed for authorized penetration testers targeting business logic layers that automated scanners miss.

offensive-api-securitySkill

Comprehensive API security testing methodology covering REST, gRPC, and WebSocket attack surfaces. Addresses the full OWASP API Security Top 10 2023 including BOLA/IDOR, broken authentication, excessive data exposure, rate limiting bypass, BFLA, mass assignment, SSRF, and security misconfiguration. Includes REST-specific attacks such as HTTP verb tampering, content-type switching, and parameter pollution. Covers gRPC exploitation through protobuf interception, reflection API enumeration, and metadata injection. Addresses WebSocket vulnerabilities including origin bypass, message injection, and cross-site WebSocket hijacking. Provides tooling guidance for Burp Suite, Postman, grpcurl, websocat, and mitmproxy. Each technique includes detection signatures and defensive indicators so you understand what artifacts your testing leaves behind. Designed for authorized penetration testing engagements against API-driven architectures.

offensive-basic-exploitationSkill
offensive-bluetooth-bleSkill

Bluetooth Low Energy (BLE) attack methodology — GATT enumeration, characteristic read/write without auth, pairing downgrade (Just Works forced), LE Secure Connections bypass, MITM via active relay, sniffing with Sniffle (TI CC1352) / Ubertooth / Frontline, encryption key extraction (LE Legacy Pairing crackable, LE Secure Connections strong), proximity authentication abuse (cars, locks), and companion-app trust analysis. Use for IoT BLE devices, smart locks, fitness trackers, medical devices, BLE beacons, or any device pairing over BLE.

offensive-bluetooth-classicSkill

Bluetooth Classic (BR/EDR) attack methodology — device discovery, service enumeration via SDP, LMP/L2CAP layer attacks, legacy PIN cracking (BlueBorne / KNOB), Bluetooth file-transfer abuse (BlueSnarfing legacy), unauthenticated profile abuse (HSP, HFP, OPP), and modern relevance against older industrial / automotive / accessory targets. Use when in-scope devices use Bluetooth Classic (Bluetooth ≤ 4.0 BR/EDR) — common in legacy car kits, industrial sensors, older medical devices, and audio accessories.