Raffael Marty
AI & ML in Cyber Security
Why Algorithms Are Dangerous
Cancun, Mexico
March, 2018
A Brief Summary
2
• We don’t have artificial intelligence (yet)
• Algorithms are getting ‘smarter’, but experts are more
important
• Stop throwing algorithms on the wall - they are not
spaghetti
• Understand your data and your algorithms
• Invest in people who know security (and have experience)
• Build “export knowledge” absorbing systems
• Focus on advancing insights
3
The master of Kennin temple was Mokurai. He had a little
protégé named Toyo who was only twelve years old. Toyo
saw how students entered the masters room each day and
received instructions and guidance in Zen. The young boy
wished to do zazen (meditation) as well. Upon convincing
Mokuri, he went in front of the master who gave him the
following koan to ponder:
"You can hear the sound of two hands when
they clap together," said Mokurai. "Now show
me the sound of one hand."
Outline
4
An Example
Let’s Get Practical
Statistics, Machine Learning & AI
Defining the Concepts
1
2 The Algorithmic Problem
Understanding the Data and the Algorithms
3
5http://theconversation.com/your-questions-answered-on-artificial-intelligence-49645
Statistics

Machine Learning &

Artificial Intelligence
6
“Everyone calls their stuff ‘machine learning’ or
even better ‘artificial intelligence’ - It’s not cool to
use statistics!”


“Companies are throwing algorithms on the wall to
see what sticks - see security analytics market”
ML and AI – What Is It?
7
• Machine Learning – Algorithmic ways to “describe” data
o Supervised - learning from training data
o Unsupervised - optimization problem to solve (clustering, dim reduction)
• Deep Learning – a ‘newer’ machine learning algorithm
o Eliminates the feature engineering step
o Verifiability / explainability issues
• Data Mining – Methods to explore data – automatically and interactively
• Artificial Intelligence – “Just calling something AI doesn’t make it AI.”
”A program that doesn't simply classify or compute model parameters,
but comes up with novel knowledge that a security analyst finds
insightful.”
What “AI” Does Today
8
•Kick a human's ass at Go
•Design more effective drugs
•Make Siri smarter
Machine Learning Uses in Security
9
• Supervised
o Malware classification (deep learning poster child)
o Spam identification
o MLSec project on firewall data
• Unsupervised
o DNS analytics (domain name classification, lookup frequencies, etc.)
o Threat Intelligence feed curation (IOC prioritization, deduplication, …)
o Tier 1 analyst automation (reducing 600M events to 100 incidents)*
o User and Entity Behavior Analytics (UEBA)
* See Respond Software Inc.
The Algorithmic Problem
Understanding the Data and the Algorithms
10
Algorithms Are Dangerous
11
Famous AI (Algorithm) Failures
12
neil.fraser.name/writing/tank/
US government in October 2016 published a comprehensive report titled 

“Preparing for the future of artificial intelligence”
What Makes Algorithms Dangerous?
13
• Algorithms make assumptions about the data
• Assume ‘clean’ data (src/dst confusion, user feedback, etc.)
• Often assume a certain type of data and their distribution
• Don’t deal with outliers
• Machine learning assumes enough, representative data
• Needs contextual features (e.g., not just IP addresses)
• Assume all input features are ‘normalized’ the same way
• Algorithms are too easy to use these days (tensorflow, torch, ML on AWS, etc.)
• The process is more important than the algorithm (e.g., feature engineering, supervision, drop outs, parameter
choices, etc.)
• Algorithms do not take domain knowledge into account
• Defining meaningful and representative distance functions, for example
• e.g., each L4 protocol exhibits different behavior. Train it separately.
• e.g., interpretation is often unvalidated - beware of overfitting and biased models.
• Ports look like numerical features, they are not, same is true for IPs, processIDs, HTTP return codes, etc.
Models Are Just Approximations
14
High Bias -  increasing the
number of input features.
How do you know in what case you operate?
• ML explainability problem
• Compute error margins
model

classifies future instances
high 

error failure

to generalize
High Variance reduce the number of input
features, increasing the number of training examples
Cognitive Biases
15
• How biased is your data set? How do you know?
• Only a single customer’s data
• Learning from an ‘infected’
data set
• Collection errors
• Missing data (e.g., due to
misconfiguration)
• What’s the context the data
operates in?
• FTP although generally
considered old and insecure,
isn’t always problematic
• Don’t trust your IDS (e.g. “UDP
bomb”)
Don’t Use Machine Learning If …
16
• Not enough or no quality labeled data
• Don’t use for network traffic analysis - you don’t have labeled data - really,
you don’t!
• No well trained domain experts and data scientists to oversee the
implementation
• Not enough domain expertise to engineer good features
• Need to understand what ML actually learned (explainability)
Also remember
• Data cleanliness issues (timestamps, normalization across fields, etc.)
• Operational challenges (scalability and adaptability) of implementing machine
learning models in practice
Adversarial Machine Learning
17
• An example of an attack on deep learning
Example
Let’s Get Practical
18
Network Traffic - Finding Anomalies / Attacks
19
• Given: Netflow
• Task: Find anomalies / attacks
2 2005-10-22 23:09:45.903 -1.000 UDP 192.168.0.2 62569 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0
3 2005-10-22 23:09:53.003 -1.000 UDP 192.168.0.2 52457 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0
4 2005-10-22 23:09:58.435 -1.000 ICMP 192.168.2.2 0 -> 192.168.2.1 3.3 0 0 2 0 .A.... 192 0 0
5 2005-10-22 23:10:00.103 -1.000 UDP 192.168.0.2 59028 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0
6 2005-10-22 23:10:03.839 -1.000 UDP 192.168.2.2 138 -> 192.168.2.255 138 0 0 2 0 .A.... 0 0 0
7 2005-10-22 23:10:04.971 -1.000 UDP 192.168.0.2 17500 -> 255.255.255.255 17500 0 0 1 0 .A.... 0 0 0
8 2005-10-22 23:10:04.971 -1.000 UDP 192.168.0.2 17500 -> 192.168.0.255 17500 0 0 1 0 .A.... 0 0 0
9 2005-10-22 23:10:07.207 -1.000 UDP 192.168.0.2 62319 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0
10 2005-10-22 23:10:14.311 -1.000 UDP 192.168.0.2 50273 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0
11 2005-10-22 23:10:21.403 -1.000 UDP 192.168.0.2 56243 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0
12 2005-10-22 23:10:25.267 -1.000 ICMP 192.168.0.2 0 -> 192.168.2.1 8.0 0 0 1 0 .A.... 0 0 0
13 2005-10-22 23:10:28.043 0.004 ICMP 192.168.0.2 0 -> 192.168.2.2 8.0 0 0 1 2 .A.... 0 1338 1
14 2005-10-22 23:10:28.499 -1.000 UDP 192.168.0.2 62390 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0
15 2005-10-22 23:10:35.019 -1.000 UDP 192.168.0.2 17500 -> 255.255.255.255 17500 0 0 1 0 .A.... 0 0 0
16 2005-10-22 23:10:35.019 -1.000 UDP 192.168.0.2 17500 -> 192.168.0.255 17500 0 0 1 0 .A.... 0 0 0
?
Network Traffic - Deep Learning
20
• Solution: Deep Learning
• No feature engineering - really?
• Lots of data available
• What are the labels?
Most security problems can’t be solved with
Deep Learning
Analytics Challenges
21
• Data cleansing
• Wrong features -> wrong results
• Distance functions (for unsupervised approaches)
• Selecting the right algorithm (there is more than k-means!)
• Algorithmic stability across iterations (iterative)?
• Parameter choices for algorithm
VAST Challenge 2013 Submission – Spot the Problems?
22
dest port!
Port 70000?
src ports!
http://vis.pku.edu.cn/people/simingchen/docs/vastchallenge13-mc3.pdf
Distance Functions
23
• Need a domain-centric similarity
function
• URLs (simple levenshtein distance
versus domain based?)
• Ports (and IPs, ASNs) are NOT
numerical features
• Treat user names as categories,
not strings
outlier?!
Distance Functions
24
Illustration of Parameter Choices and Their Failures
• t-SNE clustering of network traffic from two types of machines
perplexity = 3
epsilon = 3
No clear separation
perplexity = 3
epsilon = 19
3 clusters instead of 2
perplexity = 93
epsilon = 19
What a mess
Illustration of Parameter Choices and Their Failures
• Dangerous clusters
Network Traffic - Unsupervised Attempt
27
The graph shows an abstract space with
colors being machine identified
clusters.
Preparation:
• Feature engineering
• Distance functions (what’s similar?)
• Algorithm parameters
Hard Questions:
• What are these clusters?
• What are good clusters?
• What’s anomalous? What are the
attacks?
The Real Problems
28
• Missing context
• Asset inventory
• User information
• Missing expert knowledge
• Domain expertise
Possible Solutions
• Enable data exploration
• Improved Human Computer Interfaces &
visualization
• (Bayesian) Belief Networks
In Summary
29
Summary
• Build solutions for actual problems with real data that produce actionable insight
• Encode expert knowledge - leverage experienced experts
• Use simple systems - how about letting users give input? Push problem to the edge
• Don’t start with the algorithms - EVER
• Start with the problem at hand and choose the right approach (hardly ever ML)
• From the problem gather the right data and context
• Use ML for problems where you have a large corpus of well labeled data
• Chose meaningful distance functions
• Verify your models - use visualization to help with that
• Measure through user feedback, what you have implemented makes sense and pleases users
• Allow for expert supervision - feedback loops
• Share your insights with your peers – security is not your competitive advantage
BlackHat Workshop
31
Applied Machine Learning 

for 

Identity and Access Management
August 4,5 & August 6,7 - Las Vegas, USA
ML | AI | IAM
http://secviz.org
Questions?
32
http://slideshare.net/zrlram
@raffaelmarty
"You can hear the sound of two hands
when they clap together," said Mokurai.
"Now show me the sound of one hand."

More Related Content

PDF
Machine Learning in Cyber Security Domain
PPTX
AI and ML in Cybersecurity
PPTX
Machine Learning
PPTX
Artificial Intelligence and Cybersecurity
PPTX
Difference between Artificial Intelligence, Machine Learning, Deep Learning a...
PPTX
Use of Artificial Intelligence in Cyber Security - Avantika University
PPT
Machine learning
PDF
Machine learning
Machine Learning in Cyber Security Domain
AI and ML in Cybersecurity
Machine Learning
Artificial Intelligence and Cybersecurity
Difference between Artificial Intelligence, Machine Learning, Deep Learning a...
Use of Artificial Intelligence in Cyber Security - Avantika University
Machine learning
Machine learning

What's hot (20)

PPTX
Application of Machine Learning in Cybersecurity
PDF
Supervised and Unsupervised Machine Learning
PPT
Machine learning
PPTX
Intro/Overview on Machine Learning Presentation
PDF
Introduction to Machine Learning
PDF
AI Vs ML Vs DL PowerPoint Presentation Slide Templates Complete Deck
PPTX
Introduction to-machine-learning
PPT
machine-learning-with-python (1).ppt
PDF
Machine Learning Deep Learning AI and Data Science
PPTX
Overview of Artificial Intelligence in Cybersecurity
PPTX
Artificial intelligence and concept of machine learning
PDF
Lecture 1: What is Machine Learning?
PDF
Machine Learning
PDF
Machine Learning in Cybersecurity.pdf
PPTX
Feature enginnering and selection
PPTX
Introduction to Machine Learning
PDF
Lecture1 introduction to machine learning
PPTX
Linear Regression Analysis | Linear Regression in Python | Machine Learning A...
PDF
Linear Regression Algorithm | Linear Regression in Python | Machine Learning ...
PPTX
Fraud Detection in Insurance with Machine Learning for WARTA - Artur Suchwalko
Application of Machine Learning in Cybersecurity
Supervised and Unsupervised Machine Learning
Machine learning
Intro/Overview on Machine Learning Presentation
Introduction to Machine Learning
AI Vs ML Vs DL PowerPoint Presentation Slide Templates Complete Deck
Introduction to-machine-learning
machine-learning-with-python (1).ppt
Machine Learning Deep Learning AI and Data Science
Overview of Artificial Intelligence in Cybersecurity
Artificial intelligence and concept of machine learning
Lecture 1: What is Machine Learning?
Machine Learning
Machine Learning in Cybersecurity.pdf
Feature enginnering and selection
Introduction to Machine Learning
Lecture1 introduction to machine learning
Linear Regression Analysis | Linear Regression in Python | Machine Learning A...
Linear Regression Algorithm | Linear Regression in Python | Machine Learning ...
Fraud Detection in Insurance with Machine Learning for WARTA - Artur Suchwalko
Ad

Similar to AI & ML in Cyber Security - Why Algorithms Are Dangerous (20)

PPTX
Rise of the machines -- Owasp israel -- June 2014 meetup
PDF
influence of AI in IS
PDF
Webinar: Machine Learning para Microcontroladores
PPTX
BsidesLVPresso2016_JZeditsv6
PPTX
Algorithm Marketplace and the new "Algorithm Economy"
PPTX
are algorithms really a black box
PDF
INCOSE IS 2019: AI and Systems Engineering
PDF
2020 09-16-ai-engineering challanges
PDF
AI4SE: Challenges and opportunities in the integration of Systems Engineering...
PDF
Visualization in the Age of Big Data
PPTX
Delivering Security Insights with Data Analytics and Visualization
PDF
Machine Learning for Your Enterprise: Operations and Security for Mainframe E...
PDF
Applications of Machine Learning and Metaheuristic Search to Security Testing
PDF
The Scope for Robotic Process Automation & Machine Learning in Telecom Operat...
PDF
H2O for IoT - Jo-Fai (Joe) Chow, H2O
PDF
AI in the Enterprise: Past, Present & Future - StampedeCon AI Summit 2017
PDF
Machine Learning for (DF)IR with Velociraptor: From Setting Expectations to a...
PDF
On the Application of AI for Failure Management: Problems, Solutions and Algo...
PDF
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
PDF
Network Automation Journey, A systems engineer NetOps perspective
Rise of the machines -- Owasp israel -- June 2014 meetup
influence of AI in IS
Webinar: Machine Learning para Microcontroladores
BsidesLVPresso2016_JZeditsv6
Algorithm Marketplace and the new "Algorithm Economy"
are algorithms really a black box
INCOSE IS 2019: AI and Systems Engineering
2020 09-16-ai-engineering challanges
AI4SE: Challenges and opportunities in the integration of Systems Engineering...
Visualization in the Age of Big Data
Delivering Security Insights with Data Analytics and Visualization
Machine Learning for Your Enterprise: Operations and Security for Mainframe E...
Applications of Machine Learning and Metaheuristic Search to Security Testing
The Scope for Robotic Process Automation & Machine Learning in Telecom Operat...
H2O for IoT - Jo-Fai (Joe) Chow, H2O
AI in the Enterprise: Past, Present & Future - StampedeCon AI Summit 2017
Machine Learning for (DF)IR with Velociraptor: From Setting Expectations to a...
On the Application of AI for Failure Management: Problems, Solutions and Algo...
Information Security Response Team Nepal_npCERT_Vice_President_Sudan_Jha.pdf
Network Automation Journey, A systems engineer NetOps perspective
Ad

More from Raffael Marty (20)

PDF
Exploring the Defender's Advantage
PDF
Extended Detection and Response (XDR) An Overhyped Product Category With Ulti...
PPTX
How To Drive Value with Security Data
PDF
Cyber Security Beyond 2020 – Will We Learn From Our Mistakes?
PDF
Artificial Intelligence – Time Bomb or The Promised Land?
PDF
Understanding the "Intelligence" in AI
PDF
Security Chat 5.0
PDF
AI & ML in Cyber Security - Why Algorithms are Dangerous
PPTX
AI & ML in Cyber Security - Welcome Back to 1999 - Security Hasn't Changed
PDF
Security Insights at Scale
PDF
Creating Your Own Threat Intel Through Hunting & Visualization
PDF
Creating Your Own Threat Intel Through Hunting & Visualization
PDF
Big Data Visualization
PDF
The Heatmap
 - Why is Security Visualization so Hard?
PDF
Workshop: Big Data Visualization for Security
PDF
Visualization for Security
PDF
The Heatmap
 - Why is Security Visualization so Hard?
PDF
DAVIX - Data Analysis and Visualization Linux
PDF
Cloud - Security - Big Data
PDF
Cyber Security – How Visual Analytics Unlock Insight
Exploring the Defender's Advantage
Extended Detection and Response (XDR) An Overhyped Product Category With Ulti...
How To Drive Value with Security Data
Cyber Security Beyond 2020 – Will We Learn From Our Mistakes?
Artificial Intelligence – Time Bomb or The Promised Land?
Understanding the "Intelligence" in AI
Security Chat 5.0
AI & ML in Cyber Security - Why Algorithms are Dangerous
AI & ML in Cyber Security - Welcome Back to 1999 - Security Hasn't Changed
Security Insights at Scale
Creating Your Own Threat Intel Through Hunting & Visualization
Creating Your Own Threat Intel Through Hunting & Visualization
Big Data Visualization
The Heatmap
 - Why is Security Visualization so Hard?
Workshop: Big Data Visualization for Security
Visualization for Security
The Heatmap
 - Why is Security Visualization so Hard?
DAVIX - Data Analysis and Visualization Linux
Cloud - Security - Big Data
Cyber Security – How Visual Analytics Unlock Insight

Recently uploaded (20)

PPT
Comparison of 2 Population Kuch toh bhadwa chodi karwa raha
PDF
Technical SEO Explained: How To Make Your Website Search-Friendly
PDF
AGENT SLOT TERPERCAYA INDONESIA – MAIN MUDAH, WD CEPAT, HANYA DI KANCA4D
PPTX
WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx
PPTX
Going_to_Greece presentation Greek mythology
PPTX
Digital Project Mastery using Autodesk Docs Workshops
PDF
How Technology Shapes Our Information Age
PPTX
Networking2-LECTURE2 this is our lessons
PPTX
IOT LECTURE IOT LECTURE IOT LECTURE IOT LECTURE
PDF
ilide.info-huawei-odn-solution-introduction-pdf-pr_a17152ead66ea2617ffbd01e8c...
PDF
B450721.pdf American Journal of Multidisciplinary Research and Review
PDF
Toolkit of the MultiCloud DevOps Professional.pdf
PPTX
REE IN CARBONATITE EEPOSIT AND INCLUDE CASE STUDY ON AMBADUNGAR
PPTX
Dating App Development Cost: Factors, Features & Estimates
PPTX
FreePBX_Project_Presentation_With_Gantt.pptx
PPT
Expect The Impossiblesssssssssssssss.ppt
PPTX
PORTFOLIO SAMPLE…….………………………………. …pptx
PDF
B2B Marketing mba class material for study
PPTX
购买林肯大学毕业证|i20Lincoln成绩单GPA修改本科毕业证书购买学历认证
PPT
chapter 5: system unit computing essentials
Comparison of 2 Population Kuch toh bhadwa chodi karwa raha
Technical SEO Explained: How To Make Your Website Search-Friendly
AGENT SLOT TERPERCAYA INDONESIA – MAIN MUDAH, WD CEPAT, HANYA DI KANCA4D
WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx WEEK 15.pptx
Going_to_Greece presentation Greek mythology
Digital Project Mastery using Autodesk Docs Workshops
How Technology Shapes Our Information Age
Networking2-LECTURE2 this is our lessons
IOT LECTURE IOT LECTURE IOT LECTURE IOT LECTURE
ilide.info-huawei-odn-solution-introduction-pdf-pr_a17152ead66ea2617ffbd01e8c...
B450721.pdf American Journal of Multidisciplinary Research and Review
Toolkit of the MultiCloud DevOps Professional.pdf
REE IN CARBONATITE EEPOSIT AND INCLUDE CASE STUDY ON AMBADUNGAR
Dating App Development Cost: Factors, Features & Estimates
FreePBX_Project_Presentation_With_Gantt.pptx
Expect The Impossiblesssssssssssssss.ppt
PORTFOLIO SAMPLE…….………………………………. …pptx
B2B Marketing mba class material for study
购买林肯大学毕业证|i20Lincoln成绩单GPA修改本科毕业证书购买学历认证
chapter 5: system unit computing essentials

AI & ML in Cyber Security - Why Algorithms Are Dangerous

  • 1. Raffael Marty AI & ML in Cyber Security Why Algorithms Are Dangerous Cancun, Mexico March, 2018
  • 2. A Brief Summary 2 • We don’t have artificial intelligence (yet) • Algorithms are getting ‘smarter’, but experts are more important • Stop throwing algorithms on the wall - they are not spaghetti • Understand your data and your algorithms • Invest in people who know security (and have experience) • Build “export knowledge” absorbing systems • Focus on advancing insights
  • 3. 3 The master of Kennin temple was Mokurai. He had a little protégé named Toyo who was only twelve years old. Toyo saw how students entered the masters room each day and received instructions and guidance in Zen. The young boy wished to do zazen (meditation) as well. Upon convincing Mokuri, he went in front of the master who gave him the following koan to ponder: "You can hear the sound of two hands when they clap together," said Mokurai. "Now show me the sound of one hand."
  • 4. Outline 4 An Example Let’s Get Practical Statistics, Machine Learning & AI Defining the Concepts 1 2 The Algorithmic Problem Understanding the Data and the Algorithms 3
  • 6. 6 “Everyone calls their stuff ‘machine learning’ or even better ‘artificial intelligence’ - It’s not cool to use statistics!” 
 “Companies are throwing algorithms on the wall to see what sticks - see security analytics market”
  • 7. ML and AI – What Is It? 7 • Machine Learning – Algorithmic ways to “describe” data o Supervised - learning from training data o Unsupervised - optimization problem to solve (clustering, dim reduction) • Deep Learning – a ‘newer’ machine learning algorithm o Eliminates the feature engineering step o Verifiability / explainability issues • Data Mining – Methods to explore data – automatically and interactively • Artificial Intelligence – “Just calling something AI doesn’t make it AI.” ”A program that doesn't simply classify or compute model parameters, but comes up with novel knowledge that a security analyst finds insightful.”
  • 8. What “AI” Does Today 8 •Kick a human's ass at Go •Design more effective drugs •Make Siri smarter
  • 9. Machine Learning Uses in Security 9 • Supervised o Malware classification (deep learning poster child) o Spam identification o MLSec project on firewall data • Unsupervised o DNS analytics (domain name classification, lookup frequencies, etc.) o Threat Intelligence feed curation (IOC prioritization, deduplication, …) o Tier 1 analyst automation (reducing 600M events to 100 incidents)* o User and Entity Behavior Analytics (UEBA) * See Respond Software Inc.
  • 10. The Algorithmic Problem Understanding the Data and the Algorithms 10
  • 12. Famous AI (Algorithm) Failures 12 neil.fraser.name/writing/tank/ US government in October 2016 published a comprehensive report titled 
 “Preparing for the future of artificial intelligence”
  • 13. What Makes Algorithms Dangerous? 13 • Algorithms make assumptions about the data • Assume ‘clean’ data (src/dst confusion, user feedback, etc.) • Often assume a certain type of data and their distribution • Don’t deal with outliers • Machine learning assumes enough, representative data • Needs contextual features (e.g., not just IP addresses) • Assume all input features are ‘normalized’ the same way • Algorithms are too easy to use these days (tensorflow, torch, ML on AWS, etc.) • The process is more important than the algorithm (e.g., feature engineering, supervision, drop outs, parameter choices, etc.) • Algorithms do not take domain knowledge into account • Defining meaningful and representative distance functions, for example • e.g., each L4 protocol exhibits different behavior. Train it separately. • e.g., interpretation is often unvalidated - beware of overfitting and biased models. • Ports look like numerical features, they are not, same is true for IPs, processIDs, HTTP return codes, etc.
  • 14. Models Are Just Approximations 14 High Bias -  increasing the number of input features. How do you know in what case you operate? • ML explainability problem • Compute error margins model
 classifies future instances high 
 error failure
 to generalize High Variance reduce the number of input features, increasing the number of training examples
  • 15. Cognitive Biases 15 • How biased is your data set? How do you know? • Only a single customer’s data • Learning from an ‘infected’ data set • Collection errors • Missing data (e.g., due to misconfiguration) • What’s the context the data operates in? • FTP although generally considered old and insecure, isn’t always problematic • Don’t trust your IDS (e.g. “UDP bomb”)
  • 16. Don’t Use Machine Learning If … 16 • Not enough or no quality labeled data • Don’t use for network traffic analysis - you don’t have labeled data - really, you don’t! • No well trained domain experts and data scientists to oversee the implementation • Not enough domain expertise to engineer good features • Need to understand what ML actually learned (explainability) Also remember • Data cleanliness issues (timestamps, normalization across fields, etc.) • Operational challenges (scalability and adaptability) of implementing machine learning models in practice
  • 17. Adversarial Machine Learning 17 • An example of an attack on deep learning
  • 19. Network Traffic - Finding Anomalies / Attacks 19 • Given: Netflow • Task: Find anomalies / attacks 2 2005-10-22 23:09:45.903 -1.000 UDP 192.168.0.2 62569 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0 3 2005-10-22 23:09:53.003 -1.000 UDP 192.168.0.2 52457 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0 4 2005-10-22 23:09:58.435 -1.000 ICMP 192.168.2.2 0 -> 192.168.2.1 3.3 0 0 2 0 .A.... 192 0 0 5 2005-10-22 23:10:00.103 -1.000 UDP 192.168.0.2 59028 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0 6 2005-10-22 23:10:03.839 -1.000 UDP 192.168.2.2 138 -> 192.168.2.255 138 0 0 2 0 .A.... 0 0 0 7 2005-10-22 23:10:04.971 -1.000 UDP 192.168.0.2 17500 -> 255.255.255.255 17500 0 0 1 0 .A.... 0 0 0 8 2005-10-22 23:10:04.971 -1.000 UDP 192.168.0.2 17500 -> 192.168.0.255 17500 0 0 1 0 .A.... 0 0 0 9 2005-10-22 23:10:07.207 -1.000 UDP 192.168.0.2 62319 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0 10 2005-10-22 23:10:14.311 -1.000 UDP 192.168.0.2 50273 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0 11 2005-10-22 23:10:21.403 -1.000 UDP 192.168.0.2 56243 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0 12 2005-10-22 23:10:25.267 -1.000 ICMP 192.168.0.2 0 -> 192.168.2.1 8.0 0 0 1 0 .A.... 0 0 0 13 2005-10-22 23:10:28.043 0.004 ICMP 192.168.0.2 0 -> 192.168.2.2 8.0 0 0 1 2 .A.... 0 1338 1 14 2005-10-22 23:10:28.499 -1.000 UDP 192.168.0.2 62390 -> 192.168.0.255 8612 0 0 1 0 .A.... 0 0 0 15 2005-10-22 23:10:35.019 -1.000 UDP 192.168.0.2 17500 -> 255.255.255.255 17500 0 0 1 0 .A.... 0 0 0 16 2005-10-22 23:10:35.019 -1.000 UDP 192.168.0.2 17500 -> 192.168.0.255 17500 0 0 1 0 .A.... 0 0 0 ?
  • 20. Network Traffic - Deep Learning 20 • Solution: Deep Learning • No feature engineering - really? • Lots of data available • What are the labels? Most security problems can’t be solved with Deep Learning
  • 21. Analytics Challenges 21 • Data cleansing • Wrong features -> wrong results • Distance functions (for unsupervised approaches) • Selecting the right algorithm (there is more than k-means!) • Algorithmic stability across iterations (iterative)? • Parameter choices for algorithm
  • 22. VAST Challenge 2013 Submission – Spot the Problems? 22 dest port! Port 70000? src ports! http://vis.pku.edu.cn/people/simingchen/docs/vastchallenge13-mc3.pdf
  • 23. Distance Functions 23 • Need a domain-centric similarity function • URLs (simple levenshtein distance versus domain based?) • Ports (and IPs, ASNs) are NOT numerical features • Treat user names as categories, not strings outlier?!
  • 25. Illustration of Parameter Choices and Their Failures • t-SNE clustering of network traffic from two types of machines perplexity = 3 epsilon = 3 No clear separation perplexity = 3 epsilon = 19 3 clusters instead of 2 perplexity = 93 epsilon = 19 What a mess
  • 26. Illustration of Parameter Choices and Their Failures • Dangerous clusters
  • 27. Network Traffic - Unsupervised Attempt 27 The graph shows an abstract space with colors being machine identified clusters. Preparation: • Feature engineering • Distance functions (what’s similar?) • Algorithm parameters Hard Questions: • What are these clusters? • What are good clusters? • What’s anomalous? What are the attacks?
  • 28. The Real Problems 28 • Missing context • Asset inventory • User information • Missing expert knowledge • Domain expertise Possible Solutions • Enable data exploration • Improved Human Computer Interfaces & visualization • (Bayesian) Belief Networks
  • 30. Summary • Build solutions for actual problems with real data that produce actionable insight • Encode expert knowledge - leverage experienced experts • Use simple systems - how about letting users give input? Push problem to the edge • Don’t start with the algorithms - EVER • Start with the problem at hand and choose the right approach (hardly ever ML) • From the problem gather the right data and context • Use ML for problems where you have a large corpus of well labeled data • Chose meaningful distance functions • Verify your models - use visualization to help with that • Measure through user feedback, what you have implemented makes sense and pleases users • Allow for expert supervision - feedback loops • Share your insights with your peers – security is not your competitive advantage
  • 31. BlackHat Workshop 31 Applied Machine Learning 
 for 
 Identity and Access Management August 4,5 & August 6,7 - Las Vegas, USA ML | AI | IAM http://secviz.org
  • 32. Questions? 32 http://slideshare.net/zrlram @raffaelmarty "You can hear the sound of two hands when they clap together," said Mokurai. "Now show me the sound of one hand."