Attack surface / defenses / workflow

Security topics

The handbook is organized around the places AI systems fail: the model, the prompt, application boundaries, retrieval and data, tools, agents, automation, and the human workflow around finding and reporting bugs.

What you will work on

A security map, not a buzzword list.

Each topic below is grounded in the chapter structure and points back to the parts of the book where the subject is developed.

AI Security

The book treats AI systems as a security surface that spans the model, prompts, data, tools, and agents.

BOOK MAP Ch. 1–6, 30–32

LLM Security

Understand the attacker’s view of tokens, context, sampling, system prompts, and model behavior before testing the application around the model.

BOOK MAP Ch. 2, 7–12, 30

Prompt Injection

Direct injection, instruction override, context switching, reliable payloads, and practical defenses are developed from first principles.

BOOK MAP Ch. 7, 30

Indirect Prompt Injection

Study poisoned documents, pages, messages, images, and audio, including zero-click chains and exfiltration paths.

BOOK MAP Ch. 8, 13, 24–25

Jailbreaking

Explore roleplay, multi-turn, many-shot, refusal suppression, context flooding, and how to measure jailbreaks honestly.

BOOK MAP Ch. 9

System Prompt Security

Treat hidden prompts as security-sensitive inputs that can expose internal logic, tools, and other secrets.

BOOK MAP Ch. 4, 5, 12

RAG Security

Covers retrieval-pipeline failures, document poisoning, embedding manipulation, and cross-tenant or cross-user retrieval.

BOOK MAP Ch. 2, 14–15, 30

AI Agent Security

Threat-model agents by their permissions and blast radius, then test tool calls, memory, orchestration, browsers, and coding assistants.

BOOK MAP Ch. 19–25, 31

MCP Security

Focuses on MCP servers, tool poisoning, impersonation, rug pulls, tool shadowing, unsafe composition, and authentication flows.

BOOK MAP Ch. 21, 31

Tool and Function Abuse

Investigate parameter injection, argument smuggling, chained calls, unintended actions, and dangerous-call gating.

BOOK MAP Ch. 20, 31

Memory and Persistence

Examine long-term memory, persistent injection, shared memory poisoning, and durable agent state.

BOOK MAP Ch. 23, 31

Data Exfiltration

Follow sensitive data through prompts, sessions, tenants, tools, content, and multi-stage attack chains.

BOOK MAP Ch. 8, 13–15, 19–25

AI Supply Chain Security

Assess malicious model files, backdoored fine-tunes, poisoned adapters, hub trust, provenance, signing, and safe loading.

BOOK MAP Ch. 17, 31

AI Red Teaming and Pentesting

Build a repeatable methodology, choose attacks by target, use dedicated tooling, and turn manual findings into harnesses and campaigns.

BOOK MAP Ch. 5, 26–29

AI Vulnerability Research and Bug Bounties

Move from technical reproduction to scope analysis, impact proof, severity scoring, reporting, triage, and target selection.

BOOK MAP Ch. 5–6, 33–36

AI Application Security

Trace model output into browsers, databases, shells, links, images, and other sinks where ordinary web vulnerabilities can reappear.

BOOK MAP Ch. 13–18, 30–32

AI Security Automation

Scale testing with payload libraries, fuzzing, attack harnesses, automated red-teaming, scoring, and CI/CD release gates.

BOOK MAP Ch. 11, 26–29

A practical path

From model behavior to real impact.

The book starts by building an attacker’s model of AI systems, then moves outward into applications and agents. Later chapters turn individual techniques into repeatable automation, defenses, and reports that can survive triage.

01

Understand
Model, context, prompts, retrieval, tools and agency.

02

Attack
Injection, jailbreaks, extraction, poisoning and agent abuse.

03

Scale
Harnesses, fuzzing, red-teaming and CI/CD.

04

Report
Impact, reproduction, scoring, triage and disclosure.

Explore the structure

See the complete chapter map.

Use the chapter directory to jump from a security topic to the exact chapter and key areas covered there.