liveBook · Manning

What you will learn in AI Agents for Offensive Security

Understanding AI-powered attacks and how to stop them

by Mark Foudy · Manning Early Access Program (MEAP)

Chapter by chapter

Chapter 1: Threat-modeling agentic pipelines

This chapter introduces AI-assisted offensive-security pipelines in which artifacts, agents, humans, and tools have distinct roles in controlled decision-making.

1.1 Offensive Security · 1.1.1 Traditional offensive security workflows · 1.1.2 Best practices for offensive security · 1.1.3 Why Tools Alone Are No Longer Enough · 1.2 Large language models (LLMs) as security tools · 1.2.1 Intelligence as a Component · 1.3 Introducing AI Agents: Reasoning That Acts · 1.3.1 What Is An AI Agent? · 1.3.2 Why agents matter in offensive security · 1.3.3 Agentic Offensive-Security Workflow · 1.4 Pipelines: Information Routing Systems · 1.4.1 Pipelines as the Organizing Principle · 1.4.2 From Autonomy to Architecture · 1.4.3 Why pipelines matter · 1.5 Artifacts provide precise decision-making in offensive security · 1.5.1 Artifacts as the Unit of Movement · 1.5.2 Where Intelligence Enters the System · 1.6 Why This Matters to You · 1.6.1 Penetration Testers and Red Teams · 1.6.2 Purple Teams and Detection Engineers · 1.6.3 Blue Teams and SOC Analysts · 1.7 Summary

What you learn in chapter 1 →

Chapter 2: Building your first AI agent

This chapter introduces the construction of a controlled, inspectable AI agent by contrasting it with scripts and framing agent execution as a component-based decision loop.

2.1 Limitations of script-based automation · 2.2 What is an agent? · 2.3 Anatomy of an agent · 2.3.1 Core components · 2.3.2 The ReAct agent loop · 2.3.3 The scope and responsibility of an agent · 2.4 The minimal agent specification · 2.5 Building the minimal agent · 2.5.1 What this agent does · 2.5.2 Messages and observations · 2.5.3 Tools · 2.5.4 Tool A: extract URLs · 2.5.5 Tool B: summarize URLs · 2.5.6 Artifacts and logging · 2.5.7 The minimal agent loop · 2.5.8 Putting it together · 2.6 Safety and governance · 2.6.1 Why safety matters · 2.6.2 Building safety gates · 2.6.3 Sandboxing and isolation · 2.6.4 Comprehensive logging · 2.6.5 Operational policies · 2.6.6 Implementing kill switches · 2.6.7 Safety and governance summary · 2.7 The triage agent · 2.7.1 What is triage? · 2.7.2 nmap output · 2.7.3 Agent decision scope and constraints · 2.7.4 Triage artifacts · 2.7.5 Practical benefits and safety constraints · 2.8 Summary

What you learn in chapter 2 →

Chapter 3: Multi-agent pipelines and orchestration

This chapter introduces multi-agent offensive-security pipelines in which specialized agents exchange artifacts under orchestration, safety controls, and observable failure handling.

3.1 Why multi-agent systems? · 3.2 Multi-agent mental model · 3.3 Artifacts as agent interfaces · 3.4 Artifact provenance, replay, and auditability · 3.5 Agent orchestration and execution control · 3.5.1 What the orchestrator does · 3.5.2 3.6.2 Why do we need an orchestrator? · 3.6 Shared state and memory boundaries · 3.7 Safety gates and authorization control · 3.7.1 Applying safety gates in multi-agent systems · 3.7.2 Human in the loop · 3.8 Error handling and resilience · 3.8.1 Retry logic and exponential backoff · 3.8.2 Checkpointing · 3.8.3 Error classes and mitigation strategies · 3.8.4 Monitoring, metrics, and alerts · 3.8.5 Building confidence in AI agents through resilience · 3.9 Metric visualization and auditing AI agents · 3.9.1 Generating simple traces · 3.9.2 Graph-based views · 3.9.3 Correlating artifacts and logs · 3.9.4 Defense through transparency · 3.9.5 Practical visualization tips · 3.10 Reconnaissance multi-agent pipeline · 3.10.1 Pipeline overview · 3.10.2 ReconNormalizeAgent · 3.10.3 TriageAgent · 3.10.4 ReportAgent · 3.11 Failure modes in multi-agent systems · 3.11.1 Silent artifact drift · 3.11.2 Orchestration hidden inside agents · 3.11.3 Safety gates treated as formalities · 3.11.4 Memory accumulation without correction · 3.11.5 Overloaded agents · 3.12 Summary

What you learn in chapter 3 →

Chapter 4: Passive reconnaissance agents

This chapter introduction frames passive reconnaissance as an auditable, human-supervised pipeline that records safe evidence and prepares the reader for later enumeration and scoring work.

4.1 Why an AI reconnaissance agent? · 4.2 The minimal agent architecture · 4.2.1 Pipelines vs. scripts · 4.2.2 The four building blocks to building ReAct agents · 4.2.3 Artifacts provide persistent memory to an agent · 4.2.4 Safety gates · 4.2.5 Two scripts, one story · 4.3 Building the minimal AI recon pipeline · 4.3.1 Getting started · 4.3.2 Starting the artifact helper · 4.3.3 Creating the passive reconnaissance pipeline · 4.3.4 Diving into the passive reconnaissance results · 4.4 Inspecting your reconnaissance results · 4.4.1 Viewing results · 4.4.2 Checking for patterns · 4.4.3 Clean up and prepare for next steps · 4.5 Reading the pipeline like a story · 4.5.1 Artifacts as episodes of reasoning · 4.5.2 Example: following the trail · 4.6 Safety, scope, and ethics · 4.6.1 Scope defines the battlefield · 4.6.2 Gates keep humans in the loop · 4.6.3 Handling and storing data safely · 4.6.4 AI models and responsibility · 4.7 Summary

What you learn in chapter 4 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.