10 Machine Learning Blueprints You Should Know for Cybersecurity - Rajvardhan Oak - E-Book

10 Machine Learning Blueprints You Should Know for Cybersecurity E-Book

Rajvardhan Oak

0,0
35,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Machine learning in security is harder than other domains because of the changing nature and abilities of adversaries, high stakes, and a lack of ground-truth data. This book will prepare machine learning practitioners to effectively handle tasks in the challenging yet exciting cybersecurity space.
The book begins by helping you understand how advanced ML algorithms work and shows you practical examples of how they can be applied to security-specific problems with Python – by using open source datasets or instructing you to create your own. In one exercise, you’ll also use GPT 3.5, the secret sauce behind ChatGPT, to generate an artificial dataset of fabricated news. Later, you’ll find out how to apply the expert knowledge and human-in-the-loop decision-making that is necessary in the cybersecurity space. This book is designed to address the lack of proper resources available for individuals interested in transitioning into a data scientist role in cybersecurity. It concludes with case studies, interview questions, and blueprints for four projects that you can use to enhance your portfolio.
By the end of this book, you’ll be able to apply machine learning algorithms to detect malware, fake news, deep fakes, and more, along with implementing privacy-preserving machine learning techniques such as differentially private ML.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB

Seitenzahl: 447

Veröffentlichungsjahr: 2023

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



10 Machine Learning Blueprints You Should Know for Cybersecurity

Protect your systems and boost your defenses with cutting-edge AI techniques

Rajvardhan Oak

BIRMINGHAM—MUMBAI

10 Machine Learning Blueprints You Should Know for Cybersecurity

Copyright © 2023 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Ali Abidi

Senior Editor: Rohit Singh

Technical Editor: Kavyashree K S

Copy Editor: Safis Editing

Project Coordinator: Kirti Pisat

Proofreader: Safis Editing

Indexer: Rekha Nair

Production Designer: Arunkumar Govinda Bhat

Developer Relations Marketing Executives: Shifa Ansari and Vinishka Kalra

First published: May 2023

Production reference: 1300523

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

ISBN 978-1-80461-947-6

www.packtpub.com

This book has been a long journey, and I would like to thank my lovely wife, Mrunmayee, for her constant support and unwavering belief in me throughout the process. In a world of chaos, she keeps me sane and inspires me to do great things. This book would not have been possible without her by my side.

– Rajvardhan Oak

Contributors

About the author

Rajvardhan Oak is a cybersecurity expert and researcher passionate about making the Internet a safer place for everyone. His research is focused on using machine learning to solve problems in computer security such as malware, botnets, reputation manipulation, and fake news. He obtained his bachelor's degree from the University of Pune, India, and his master's degree from the University of California, Berkeley. He has been invited to deliver training sessions at summits by the NSF and has served on the program committees of multiple technical conferences. His work has been featured by prominent news outlets such as WIRED magazine and the Daily Mail. In 2022, he received the ISC2 Global Achievement Award for Excellence in Cybersecurity, and in 2023, the honorary Doktor der Akademie from the Akademie für Hochschulbildung, Switzerland. He is based in Seattle and works as an applied scientist in the ads fraud division for Microsoft.

About the reviewers

Dr. Simone Raponi is currently a senior cybersecurity machine learning engineer at Equixely and an ex-machine learning scientist at the NATO Center for Maritime Research and Experimentation. He received both his bachelor’s and master’s degrees with honor in computer science at the University of Rome, La Sapienza, researching applied security and privacy, and his PhD in computer science and engineering at Hamad Bin Khalifa University in Doha, Qatar, with a focus on cybersecurity and AI. He was awarded the Best PhD in Computer Science and Engineering Award and the Computer Science and Engineering Outstanding Performance Award. His research interest includes cybersecurity, AI, and cyber-threat intelligence.

Duc Haba is a lifelong technologist and researcher. He has been a programmer, enterprise mobility solution architect, AI solution architect, principal, VP, CTO, and CEO. The companies he has worked for range from start-ups and IPOs to enterprise companies.

Duc’s career started with Xerox PARC, researching and building expert systems (ruled-based) for copier diagnostic, and skunk works for the USA Department of Defense. Afterward, he joined Oracle, following Viant consulting as a founding member. He dove deep into the entrepreneurial culture in Silicon Valley. There were slightly more failures than successes, but the highlights were Viant and RRKidz. Currently, he is happy working at YML.co as the AI solution architect.

Abhishek Singh is a seasoned professional with almost 15 years of experience in various software engineering roles. Currently, Abhishek serves as a principal software engineer for Azure AI, working on the development of a large-scale distributed AI platform. Previously, Abhishek made significant contributions to cloud and enterprise Security, including founding the Fileless Attack detection capability in Azure Security Center. With a collaborative spirit and a deep-seated understanding of AI, cloud security, and OS internals, Abhishek continuously learns from and contributes to the collective success of various Microsoft products.

Table of Contents

Preface

1

On Cybersecurity and Machine Learning

The basics of cybersecurity

Traditional principles of cybersecurity

Modern cybersecurity – a multi-faceted issue

Privacy

An overview of machine learning

Machine learning workflow

Supervised learning

Unsupervised learning

Semi-supervised learning

Evaluation metrics12

Machine learning – cybersecurity versus other domains

Summary

2

Detecting Suspicious Activity

Technical requirements

Basics of anomaly detection

What is anomaly detection?

Introducing the NSL-KDD dataset

Statistical algorithms for intrusion detection

Univariate outlier detection

Elliptic envelope

Local outlier factor30

Machine learning algorithms for intrusion detection

Density-based scan (DBSCAN)

One-class SVM

Isolation forest

Autoencoders

Summary

3

Malware Detection Using Transformers and BERT

Technical requirements

Basics of malware

What is malware?

Types of malware

Malware detection

Malware detection methods

Malware analysis

Transformers and attention

Understanding attention

Understanding transformers

Understanding BERT

Detecting malware with BERT

Malware as language

The relevance of BERT

Getting the data

Preprocessing the data

Building a classifier

Summary

4

Detecting Fake Reviews

Technical requirements

Reviews and integrity

Why fake reviews exist

Evolution of fake reviews

Statistical analysis

Exploratory data analysis

Feature extraction

Statistical tests

Modeling fake reviews with regression

Ordinary Least Squares regression

OLS assumptions

Interpreting OLS regression

Implementing OLS regression

Summary

5

Detecting Deepfakes

Technical requirements

All about deepfakes

A foray into GANs

How are deepfakes created?

The social impact of deepfakes

Detecting fake images

A naive model to detect fake images

Detecting deepfake videos

Building deepfake detectors

Summary

6

Detecting Machine-Generated Text

Technical requirements

Text generation models

Understanding GPT

Naïve detection

Creating the dataset

Feature exploration

Using machine learning models for detecting text

Playing around with the model

Automatic feature extraction

Transformer methods for detecting automated text

Compare and contrast

Summary

7

Attributing Authorship and How to Evade It

Technical requirements

Authorship attribution and obfuscation

What is authorship attribution?

What is authorship obfuscation?

Techniques for authorship attribution

Dataset

Feature extraction

Training the attributor

Improving authorship attribution

Techniques for authorship obfuscation

Improving obfuscation techniques

Summary

8

Detecting Fake News with Graph Neural Networks

Technical requirements

An introduction to graphs

What is a graph?

Representing graphs

Graphs in the real world

Machine learning on graphs

Traditional graph learning

Graph embeddings

GNNs

Fake news detection with GNN

Modeling a GNN

The UPFD framework

Dataset and setup

Implementing GNN-based fake news detection

Playing around with the model

Summary

9

Attacking Models with Adversarial Machine Learning

Technical requirements

Introduction to AML

The importance of ML

Adversarial attacks

Adversarial tactics

Attacking image models

FGSM

PGD

Attacking text models

Manipulating text

Further attacks

Developing robustness against adversarial attacks

Adversarial training

Defensive distillation

Gradient regularization

Input preprocessing

Ensemble methods

Certified defenses

Summary

10

Protecting User Privacy with Differential Privacy

Technical requirements

The basics of privacy

Core elements of data privacy2

Privacy and the GDPR

Privacy by design

Privacy and machine learning

Differential privacy

What is differential privacy?

Differential privacy – a real-world example

Benefits of differential privacy

Differentially private machine learning

IBM Diffprivlib

Credit card fraud detection with differential privacy1

Differentially private deep learning

DP-SGD algorithm

Implementation

Differential privacy in practice

Summary

11

Protecting User Privacy with Federated Machine Learning

Technical requirements

An introduction to federated machine learning

Privacy challenges in machine learning

How federated machine learning works

The benefits of federated learning

Challenges in federated learning

Implementing federated averaging

Importing libraries

Dataset setup

Client setup

Model implementation

Weight scaling

Global model initialization

Setting up the experiment

Putting it all together

Reviewing the privacy-utility trade-off in federated learning

Global model (no privacy)

Local model (full privacy)

Understanding the trade-off

Beyond the MNIST dataset

Summary

12

Breaking into the Sec-ML Industry

Study guide for machine learning and cybersecurity

Machine learning theory

Hands-on machine learning

Cybersecurity

Interview questions

Theory-based questions

Experience-based questions

Conceptual questions

Additional project blueprints

Improved intrusion detection

Adversarial attacks on intrusion detection

Hate speech and toxicity detection

Detecting fake news and misinformation

Summary

Index

Other Books You May Enjoy