Complete Guide
Advanced

Offensive AI

A practitioner playbook for testing AI-enabled applications, RAG systems, model gateways, tool-using agents, AI-assisted pentest workflows, and developer copilots during authorized engagements.

Browse by topic — AI Systems & Supply Chain · Attack Techniques · Fundamentals & Method · Testing & Assurance · AI Offensive Tooling. The file numbers are historical; they imply no order.

Ethical and legal boundary

Offensive AI testing can affect real users, private documents, SaaS connectors, model logs, and automated actions. Confirm written authorization, approved test classes, data-handling rules, and emergency stop contacts before running any test.

Offensive AI Methodology

Offensive AI methodology - scope, trust-boundary mapping, failure testing, continuous evaluation, and reporting

The five-step engagement flow - scope the system, map trust boundaries, test AI failure modes, evaluate continuously, and report and harden - joined left to right, with a dashed regression re-test edge returning from evaluate to test.

Scroll sideways to see the whole diagram

Offensive Test Case Library

Authorized AI Abuse Cases

Use these as engagement seeds: each case needs written scope, controlled fixtures, and evidence capture before it becomes a finding.

Open full library
Architecture and data-flow documentation for an AI feature. /01-introduction/

Trust-boundary sketch

Draw where user prompts, system prompts, retrieved data, tool schemas, memory, and output consumers intersect.

Control to trip: Documented trust boundary between untrusted inputs and trusted context or actions.

Authorized setup: Work from architecture docs, approved interviews, and staging observations.

Expected result: A boundary diagram listing every untrusted-to-trusted transition, drawn from architecture docs and staging observation.

Evidence: Boundary diagram plus list of untrusted-to-trusted transitions for later testing.

Prompt, retrieval, and tool-use entry points. /01-introduction/

First abuse hypothesis

Write three testable hypotheses for prompt injection, retrieval abuse, or unsafe tool use.

Control to trip: Instruction hierarchy and output validation.

Authorized setup: Use only permitted fixtures and known test accounts.

Expected result: Three written, testable abuse hypotheses, each naming the expected control and the observation that would confirm or refute it.

Evidence: Hypothesis, expected control, observed behavior, and next test decision.

Agent tool-invocation boundary. /02-hexstrike/

Tool allowlist boundary test

Verify whether the agent can invoke only approved tools and arguments for the engagement.

Control to trip: A restricted tool/argument allowlist enforced outside the model.

Authorized setup: Configure a lab target and a deliberately restricted tool profile.

Expected result: Only approved tools and arguments execute; every other call is denied and logged.

Evidence: Allowed/denied tool calls, arguments, approval prompts, and audit records.

A multi-step autonomous agent plan. /02-hexstrike/

Autonomous chain review

Run a harmless recon-to-report chain and identify where human approval should interrupt escalation.

Control to trip: A human-approval checkpoint before any escalation.

Authorized setup: Use a training target, read-only tooling, and disabled exploit actions.

Expected result: A documented plan and tool sequence in which every escalation step requires and receives human approval.

Evidence: Agent plan, tool sequence, operator approvals, and final report artifacts.

AI copilot review output measured against known vulnerable and known safe fixtures. /03-pentestgpt/

Copilot false-positive/false-negative benchmark

Give the copilot a known vulnerable and known safe fixture, then measure missed and hallucinated findings.

Control to trip: Human verification before any copilot finding becomes a report entry.

Authorized setup: Use lab apps or sanitized client snippets approved for AI processing.

Expected result: A measured false-positive and false-negative count against ground truth, with every accepted or rejected finding carrying a verification note.

Evidence: Prompt, model output, ground truth, verification notes, and reporting decision.

Captured HTTP traffic from an approved target or lab replay. /03-pentestgpt/

Proxy evidence enrichment

Use AI to summarize suspicious traffic and identify follow-up tests without auto-executing unsafe requests.

Control to trip: No auto-execution of AI-suggested requests.

Authorized setup: Use captured traffic from an approved target or lab replay.

Expected result: AI-derived follow-up tests are proposed and reviewed; no suggested request is sent without explicit operator action.

Evidence: Request/response IDs, AI rationale, manual validation, and final finding status.

Guide Sections

Groups mirror the sidebar categories. Browse by topic — there is no prescribed order, and file numbers imply none.

Tools and Evidence Matrix

PhaseToolingPurposeWhen to use
PlanAI Engagement PlannerBrowser-local test-plan generatorUse first for AI app and agent scoping
TestPyRIT / Garak / PromptfooRepeatable red-team and regression evaluationUse after a finding to prevent drift
RAGRetrieval traces + custom fixturesValidate ACLs, citations, and poisoning defensesUse for knowledge assistants
AgentMCP logs + sandbox policyReview tool calls, approvals, and memoryUse for copilots and workflow agents
GatewayAPI logs + route policyCheck tenant, retention, fallback, and cost controlsUse for model platforms
Supply ChainModelScan / Fickling / hashesReview model artifacts and unsafe loadersUse before local model adoption

Local and private model guidance

Prefer approved enterprise endpoints or local runtimes when client data, source code, credentials, regulated data, or engagement evidence is involved. The goal is privacy, reproducibility, and evidence control, not bypassing safety controls.

Report-Ready Deliverables

AI RoE addendum
AI attack-surface map
Prompt/RAG finding templates
Regression eval pack