Harriet Farlow is the CEO and founder of Mileva Security Labs, Australia’s first dedicated AI security company. Farlow’s PhD is in adversarial machine learning, and she’s led AI security assessments for Fortune 500 organizations and government agencies worldwide. She’s also a former DEF CON speaker and host of
The AI Security Podcast.
Break AI Systems. Then Secure Them.If you’re a security practitioner learning to operate in AI environments, or an ML engineer who needs to understand what adversaries actually do,
Practical AI Security gives you the technical foundation the field demands.
Built from first principles, this book takes you from how models fail to how they’re exploited to how they’re defended and audited. Every technique includes clear explanations and real-world examples, and you can run the attacks and defenses yourself with over 30 hands-on Python demos.
- Understand how different kinds of machine learning models create unique vulnerabilities, and explore how these models are integrated into more autonomous, agentic AI systems to introduce new weaknesses and risks.
- Identify, exploit, and defend against dozens of weaknesses and attacks across the AI life cycle, including data poisoning, model theft, and prompt injection.
- Evaluate AI systems for safety failures, bias, and alignment risks using structured benchmarking.
- Threat-model agentic systems, RAG pipelines, and multimodal architectures using MITRE ATLAS, OWASP, and the MAESTRO framework.
- Design and execute AI-specific red teaming campaigns, and understand what makes them distinct from traditional security tests.
- Conduct rapid risk audits and navigate AI governance frameworks for real deployments.
Whether you use, build, deploy, or oversee AI, this isn’t niche knowledge—it’s the foundation for defending the technologies that will define the next era of human progress.
Foreword
Acknowledgments
Introduction
Part I: AI and Security FundamentalsChapter 1: What Is AI?
Chapter 2: Working with Models
Chapter 3: AI Threats
Part II: Attacking and Defending AIChapter 4: Attacks and Weaknesses
Chapter 5: Defenses, Controls, and Mitigations
Part III: The AI Security EcosystemChapter 6: Red Teaming AI
Chapter 7: Attacking and Defending with AI
Chapter 8: AI Safety
Chapter 9: AI Governance
Chapter 10: What's Next for AI Security?
Conclusion: A New Kind of Hacker
Figure Credits
Index
“Essential reading for anyone wishing to understand the implicit risks associated with the adoption of AI ...”
—Marco “embyte” Balduzzi, co-founder and president, No Hat Conference“An accessible and engaging book that should be read by anyone building or deploying AI systems today.”
—David Evans, Olsen Bicentennial Professor of Engineering and Professor of Computer Science, University of Virginia