Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Adversarial AI Attacks, Mitigations, and Defense Strategies
Adversarial AI Attacks, Mitigations, and Defense Strategies

Adversarial AI Attacks, Mitigations, and Defense Strategies: A cybersecurity professional's guide to AI attacks, threat modeling, and securing AI with MLSecOps

eBook
$9.99 $39.99
Paperback
$49.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Adversarial AI Attacks, Mitigations, and Defense Strategies

Getting Started with AI

In this increasingly digital age, cybersecurity has never been more critical. However, the meteoric rise of artificial intelligence (AI) and machine learning (ML) challenges cybersecurity with new technologies and concepts. Adversarial AI allows attackers to use advanced techniques to attack AI. This chapter introduces essential concepts of AI and ML that are aimed at cybersecurity and other technical professionals with little or no experience in AI.

By the end of this chapter, you will have a firm grasp of critical concepts such as models, training, validation, testing, inference, and various types of ML. We will cover popular algorithms that are used in ML, what deep learning is, and understand the roles and functions of popular neural networks such as convolutional neural networks (CNNs), recurrent neural networks (RNNs), and large language models (LLMs) such as Bidirectional Encoder Representations from Transformers (BERT) and ChatGPT.

You will also...

Understanding AI and ML

AI and ML are often used interchangeably. Let’s try to provide some simple definitions and examples to understand their relationship and how they fit into our work of defending AI from adversarial attacks.

AI is a field in computer science that involves techniques and approaches to creating intelligent machines and applications that can perform tasks with intelligence normally associated with humans. These tasks include understanding natural language and images, recognizing patterns, solving problems, and making decisions.

AI is integrated with applications and systems. In everyday life, we use AI for things such as predictive texting, email spam filters, and recommendations. With its constant progress, AI can be found in smart homes in Internet of Things (IoT) devices such as security cameras, doorbells, vacuum cleaners, and digital assistants such as Siri or Alexa. Autonomous cars and smart medical devices are other examples of using AI to create...

Types of ML and the ML life cycle

Depending on how models learn, ML can be classified into three types:

  • Supervised learning, where each data sample must have a label indicating the correct outcome. The model learns from labeled structured data, such as CSV files, by adjusting its internal parameters based on its error when it guesses the result. Supervised learning is by far the most used type of learning in classification images, voice and language recognition, numerical forecasting, and more.
  • Unsupervised learning, on the other hand, involves training on data, usually unstructured, without labels. Unsupervised learning uses clustering and other techniques to understand the underlying structure of data, identify patterns, and perform anomaly detection, fraud detection, social network analysis, market segmentation, and supervised learning.
  • Reinforcement learning relies on an agent to behave in an environment and learn by performing certain actions, observing the results...

Key algorithms in ML

Several algorithms in ML have pros and cons and suit different use cases.

In supervised learning, we have the following:

  • Linear regression, which predicts a continuous output variable based on input features. It’s used in economics for forecasting and in healthcare for predicting disease progression.
  • Logistic regression, which, despite its name, is an algorithm for binary classification problems and estimates the probability an instance belongs to a class. It’s used in credit scoring and medical testing.
  • Decision tree, which learns simple decision rules inferred from data features. It’s useful in business decision-making and customer segmentation.
  • Random forest, which uses multiple decision trees to prevent overfitting. This makes it an ensemble algorithm and is used in predicting disease risk, loan defaulters, and customer preferences.
  • Support vector machine (SVM), which can model complex decision boundaries and...

Neural networks and deep learning

Inspired by human brain biology, artificial neural networks (ANNs) are good at processing unstructured data such as images, audio, and text and are widely used in image recognition, speech recognition, and natural language processing (NLP). These are their fundamental blocks:

  • Neurons and layers: ANNs apply parallel processing by using nodes called neurons. Each node has a weight and a bias, both of which are used to produce their output based on outputs. Neurons are organized in layers, and typically, there is an initial input and final output layer, and layers in between called hidden layers where the actual computation takes place. Inputs to each layer are derived from the outputs of the previous layer.
  • Training and weights update: Training an ANN involves adjusting the weights and biases of neurons based on error. This consists of a process called backpropagation and an optimization method, such as batch gradient descent and/or stochastic...

ML development tools

We can develop ML models in many languages, ranging from Python, R, C++, Java, and Julia to scientific tools such as proprietary MATLAB and open source Octave. Python is by far the most widely used language in academia, the scientific community, and industry. This makes it a near de facto standard for mainstream ML development. We will be using Python throughout this book.

Python’s simplicity and readability contribute to its popularity, but what sets it apart is the rich ecosystem of scientific and data analysis libraries. NumPy for numeric computing, pandas for data analysis, and Matplotlib for charting are three libraries that are widely used in ML work.

These are available as standard Python packages. The default packager in Python is pip, and you can find and install packages from package repositories, such as the Python Package Index (PyPI). In some operating systems and environments, you may find pip as pip3.

Packages sometimes have other...

Summary

In this chapter, we set the foundations of AI for the rest of this book. We covered some important topics:

  • What AI is and its shift toward AGI.
  • How ML creates models adaptively by ingesting data and how it is the brain of AI. This makes it the focus of adversarial AI attacks and defenses.
  • The different types of ML based on how models learn – that is, supervised, unsupervised, and reinforcement learning.
  • The seven typical steps in the ML life cycle, which include data collection and pre-processing, selecting an algorithm based on the problem we are solving, model training, testing and evaluation, fine-tuning and optimization, and, finally, deploying and using the model.
  • Key ML algorithms and where they are used. This included linear and logistic regression, decision trees, and their ensemble version with random forests in supervised learning. We looked at K-means clustering and PCA, two popular unsupervised models, and Q-learning in reinforcement...

Further reading

To learn more about the topics that were covered in this chapter, take a look at the following resources:

  • Hands-On Data Preprocessing in Python, by Roy Jafari
  • Mastering Machine Learning Algorithms - Second Edition, by Giuseppe Bonaccorso
  • Deep Learning with TensorFlow 2 and Keras - Second Edition, by Antonio Gulli, Amita Kapoor, and Sujit Pal
Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Understand the connection between AI and security by learning about adversarial AI attacks
  • Discover the latest security challenges in adversarial AI by examining GenAI, deepfakes, and LLMs
  • Implement secure-by-design methods and threat modeling, using standards and MLSecOps to safeguard AI systems
  • Purchase of the print or Kindle book includes a free PDF eBook

Description

Adversarial attacks trick AI systems with malicious data, creating new security risks by exploiting how AI learns. This challenges cybersecurity as it forces us to defend against a whole new kind of threat. This book demystifies adversarial attacks and equips cybersecurity professionals with the skills to secure AI technologies, moving beyond research hype or business-as-usual strategies. The strategy-based book is a comprehensive guide to AI security, presenting a structured approach with practical examples to identify and counter adversarial attacks. This book goes beyond a random selection of threats and consolidates recent research and industry standards, incorporating taxonomies from MITRE, NIST, and OWASP. Next, a dedicated section introduces a secure-by-design AI strategy with threat modeling to demonstrate risk-based defenses and strategies, focusing on integrating MLSecOps and LLMOps into security systems. To gain deeper insights, you’ll cover examples of incorporating CI, MLOps, and security controls, including open-access LLMs and ML SBOMs. Based on the classic NIST pillars, the book provides a blueprint for maturing enterprise AI security, discussing the role of AI security in safety and ethics as part of Trustworthy AI. By the end of this book, you’ll be able to develop, deploy, and secure AI systems effectively.

Who is this book for?

This book tackles AI security from both angles - offense and defense. AI builders (developers and engineers) will learn how to create secure systems, while cybersecurity professionals, such as security architects, analysts, engineers, ethical hackers, penetration testers, and incident responders will discover methods to combat threats and mitigate risks posed by attackers. The book also provides a secure-by-design approach for leaders to build AI with security in mind. To get the most out of this book, you’ll need a basic understanding of security, ML concepts, and Python.

What you will learn

  • Understand poisoning, evasion, and privacy attacks and how to mitigate them
  • Discover how GANs can be used for attacks and deepfakes
  • Explore how LLMs change security, prompt injections, and data exposure
  • Master techniques to poison LLMs with RAG, embeddings, and fine-tuning
  • Explore supply-chain threats and the challenges of open-access LLMs
  • Implement MLSecOps with CIs, MLOps, and SBOMs

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 26, 2024
Length: 586 pages
Edition : 1st
Language : English
ISBN-13 : 9781835088678
Category :
Languages :
Concepts :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Jul 26, 2024
Length: 586 pages
Edition : 1st
Language : English
ISBN-13 : 9781835088678
Category :
Languages :
Concepts :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 139.97
Adversarial AI Attacks, Mitigations, and Defense Strategies
$49.99
Generative AI Foundations in Python
$39.99
Google Machine Learning and Generative AI for Solutions Architects
$49.99
Total $ 139.97 Stars icon
Banner background image

Table of Contents

26 Chapters
Part 1: Introduction to Adversarial AI Chevron down icon Chevron up icon
Chapter 1: Getting Started with AI Chevron down icon Chevron up icon
Chapter 2: Building Our Adversarial Playground Chevron down icon Chevron up icon
Chapter 3: Security and Adversarial AI Chevron down icon Chevron up icon
Part 2: Model Development Attacks Chevron down icon Chevron up icon
Chapter 4: Poisoning Attacks Chevron down icon Chevron up icon
Chapter 5: Model Tampering with Trojan Horses and Model Reprogramming Chevron down icon Chevron up icon
Chapter 6: Supply Chain Attacks and Adversarial AI Chevron down icon Chevron up icon
Part 3: Attacks on Deployed AI Chevron down icon Chevron up icon
Chapter 7: Evasion Attacks against Deployed AI Chevron down icon Chevron up icon
Chapter 8: Privacy Attacks – Stealing Models Chevron down icon Chevron up icon
Chapter 9: Privacy Attacks – Stealing Data Chevron down icon Chevron up icon
Chapter 10: Privacy-Preserving AI Chevron down icon Chevron up icon
Part 4: Generative AI and Adversarial Attacks Chevron down icon Chevron up icon
Chapter 11: Generative AI – A New Frontier Chevron down icon Chevron up icon
Chapter 12: Weaponizing GANs for Deepfakes and Adversarial Attacks Chevron down icon Chevron up icon
Chapter 13: LLM Foundations for Adversarial AI Chevron down icon Chevron up icon
Chapter 14: Adversarial Attacks with Prompts Chevron down icon Chevron up icon
Chapter 15: Poisoning Attacks and LLMs Chevron down icon Chevron up icon
Chapter 16: Advanced Generative AI Scenarios Chevron down icon Chevron up icon
Part 5: Secure-by-Design AI and MLSecOps Chevron down icon Chevron up icon
Chapter 17: Secure by Design and Trustworthy AI Chevron down icon Chevron up icon
Chapter 18: AI Security with MLSecOps Chevron down icon Chevron up icon
Chapter 19: Maturing AI Security Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.9
(13 Ratings)
5 star 92.3%
4 star 7.7%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Dwayne Natwick Sep 02, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I recently received a copy of @Packt Publishing’s Adversarial AI Attacks, Mitigations, and Defense Strategies from @John Sotiropoulos. This book outlines that various types of AI attacks along with the anatomy and design of these attacks. The author provides information on the architecture and setup that can be used for detailed analysis, mitigation, and defense of these attacks. There is also a complete section on generative AI and how it is used for a new level of attacks. Throughout this book, the author has done a great job of developing understanding and knowledge for the reader about these attacks, how they are created, and how you can protect your environment against them. This book is highly recommended for anyone that is looking for a level of understanding about how to architect, monitor, and defend against AI attacks.
Amazon Verified review Amazon
T J Coup Aug 01, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
A highly necessary book in the field, this comprehensive guide to AI security offers a structured understanding of key issues, complete with hands-on examples. A must-read for all IT professionals this summer.
Amazon Verified review Amazon
Matthew Kiely Oct 28, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is an essential read for anyone looking to deepen their understanding of adversarial AI.It goes beyond merely explaining how these attacks operate, it shows you how to set up a test environment to simulate these attacks and observe their impact on machine learning models.It’s indepth and not for the faint hearted!The hands-on approach allows you to see how adversarial techniques can corrupt AI systems.It is a well-rounded resource for both aspiring and seasoned AI professionals
Amazon Verified review Amazon
Andy Aug 29, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The author really knows his stuff and lays it out in a very approachable way. The writing and graphics are good, and the layout is very logical. That said, you better have solid AI design and cybersecurity in your recent past. Sample code for setting up the environment and defenses against the top AI attacks for predictive and generativeAI environments. Guidance is provided for DevSecOps, MLOps, and LLMOps, so you can build security in from the planning stage or apply mitigation strategies to environments already in operation. I love that he provides reference architecture diagrams that include the potential attacks (the snipped graphic on this review is from the book) and on which part of the architecture different attacks focus.The book is just under 600 pages, there isn’t any fluff, and it is very hands-on. It hits multiple audiences with various role focuses. That said, it is more like an encyclopedia for teams involved in AI at a company than it is a book for an individual, one that should be read end-to-end and then referenced as needed. Nice job.
Amazon Verified review Amazon
Brandon Lachterman Sep 06, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I really enjoyed this book, and it will be a fixture on my virtual shelf for reference. In a subject just getting more traction, this book gets down to brass tax and covers the subjects any reader is looking for, while leaving out the extra fluff. Very technical, but clear to understand. Highly recommend.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.