SlideShare a Scribd company logo
1 of 60
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Using ML with Amazon SageMakerand
GuardDuty to IdentifyAnomalous Traffic
Jeff Puchalski
Senior Security Engineer
AWS Security
S E P 3 0 2 - R
Neal Rothleder
Senior Security Consultant
AWS Professional Services
Relatedbreakouts
Tuesday, June 25
SEP302-R Using ML with Amazon SageMaker & GuardDuty to identify anomalous traffic
2:45pm – 4:45pm | Level 2, Room 210A
Wednesday, June 26
SEP302-R1 Using ML with Amazon SageMaker & GuardDuty to identify anomalous
traffic
8:45am – 10:45am | Level 1, Room 104A
Tuesday June 25
Wednesday (AM, PM) June 26
SEJ001- Security Jam
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
What’sour goal?
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Demonstrate Machine Learning in a Security Context
• Show the fundamentals of AWS CloudTrail, AWS Lambda, and Amazon
GuardDuty
• Teach you to build and deploy a machine learning model in Amazon
SageMaker
• Discuss how this could be integrated into a single architecture
What you will do
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Use the AWS Jam Platform to run the lab
• Walk through Amazon GuardDuty findings
• Download sample AWS CloudTrail logs and Amazon GuardDuty findings
• Make edits to AWS Lambda functions to do the data preparation needed prior to
machine learning
• Use Amazon SageMaker to identify users of AWS accounts coming from
anomalous IP addresses
• Fuse those findings with those coming from Amazon GuardDuty to create an
aggregated list of suspicious activity
What you will do
Logs
Findings
IP Insights
!
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
What we willcover
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS CloudTrail logging
• Review CloudTrail data feeds for format and content
• Load test CloudTrail data of good and bad activities
Amazon GuardDuty findings
• Review GuardDuty finding types and formats
• Hands-on lab - Use GuardDuty findings to create an aggregated list of suspicious activity
Amazon SageMaker
• High-level architecture review - building and deploying a model
• Hands-on lab – Use IP Insights algorithm to detect anomalous IP usage for GuardDuty findings, using
CloudTrail log data for model training
AWSJAMPlatform
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://jam.awsevents.com/
AWS CloudTrail
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS CloudTrail
Track user activity and API usage
What can you do?
• Simplify compliance audits and incident response by
automatically recording and storing activity logs for
your AWS account
• Logs API calls made to AWS services
• 90-day event history on by default
• Can create log “trails” stored to S3
• Optional KMS encryption
• Optional log file integrity validation
• Optional data-level event logging for S3 object calls
and Lambda invokes
• Can route events to CloudWatch Events
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Introto AWSCloudTrail
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS CloudTrail logs activity for supported services to an AWS account
Example API events that are logged:
iam:CreateUser
s3:ListBucket
CloudTrail is enabled by default on all AWS accounts (as of August 2017)
Event history of create, modify, and delete operations for last 90 days
Viewable, searchable, and downloadable
To access CloudTrail log files directly or for a longer time period, create a trail
You can also use Athena to query the logs directly in S3 buckets
AWSCloudTraillog files
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Gzipped JSON files created in the trail’s Amazon S3 bucket
Each file contains API event records covering ~5 minute time window
Log files encrypted by default (SSE with S3 or KMS managed key)
Optional log file integrity validation using signed digest file containing log-file hashes
AWSCloudTrailevents
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Each record in a CloudTrail log file represents a single event
All records contain some common fields:
• Timestamp
• Region
• Event name (i.e., the API call)
• Event source (i.e., the service)
• Source IP address
• User identity
Event-specific request and response parameters may also be included for some
events
What do CloudTraillogs look like?
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
{"Records": [{
"eventVersion": "1.0",
"userIdentity": {
"type": "IAMUser",
"principalId": "EX_PRINCIPAL_ID",
"arn": "arn:aws:iam::123456789012:user/Alice",
"accountId": "123456789012",
"accessKeyId": "EXAMPLE_KEY_ID",
"userName": "Alice”
},
"eventTime": "2017-11-29T11:29:42Z",
"eventSource": "iam.amazonaws.com",
"eventName": "CreateUser",
"awsRegion": "us-east-1",
"sourceIPAddress": ”192.168.0.1",
"userAgent": "aws-cli/1.3.2 Python/2.7.5 Windows/7",
"requestParameters": {"userName": "Bob”},
"responseElements": {"user": {"createDate": ”Nov 29, 2017 11:29:42 AM", "userName": "Bob",
"arn": "arn:aws:iam::123456789012:user/Bob", "path": "/", "userId": "EXAMPLEUSERID"}
}
}]}
What do CloudTraillogs look like?
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
{"Records": [{
"eventVersion": "1.0",
"userIdentity": {
"type": "IAMUser",
"principalId": "EX_PRINCIPAL_ID",
"arn": "arn:aws:iam::123456789012:user/Alice",
"accountId": "123456789012",
"accessKeyId": "EXAMPLE_KEY_ID",
"userName": "Alice”
},
"eventTime": "2017-11-29T11:29:42Z",
"eventSource": "iam.amazonaws.com",
"eventName": "CreateUser",
"awsRegion": "us-east-1",
"sourceIPAddress": ”192.168.0.1",
"userAgent": "aws-cli/1.3.2 Python/2.7.5 Windows/7",
"requestParameters": {"userName": "Bob”},
"responseElements": {"user": {"createDate": ”Nov 29, 2017 11:29:42 AM", "userName": "Bob",
"arn": "arn:aws:iam::123456789012:user/Bob", "path": "/", "userId": "EXAMPLEUSERID"}
}
}]}
What do CloudTraillogs look like?
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
{"Records": [{
"eventVersion": "1.0",
"userIdentity": {
"type": "IAMUser",
"principalId": "EX_PRINCIPAL_ID",
"arn": "arn:aws:iam::123456789012:user/Alice",
"accountId": "123456789012",
"accessKeyId": "EXAMPLE_KEY_ID",
"userName": "Alice”
},
"eventTime": "2017-11-29T11:29:42Z",
"eventSource": "iam.amazonaws.com",
"eventName": "CreateUser",
"awsRegion": "us-east-1",
"sourceIPAddress": ”192.168.0.1",
"userAgent": "aws-cli/1.3.2 Python/2.7.5 Windows/7",
"requestParameters": {"userName": "Bob”},
"responseElements": {"user": {"createDate": ”Nov 29, 2017 11:29:42 AM", "userName": "Bob",
"arn": "arn:aws:iam::123456789012:user/Bob", "path": "/", "userId": "EXAMPLEUSERID"}
}
}]}
Amazon GuardDuty
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon GuardDuty
Intelligent threat detection and
continuous monitoring to protect
your AWS accounts and workloads
What can you do?
• Continuous monitoring to rapidly detect threats
(needle) to your environments in the sea of log data
(haystack)
• Processes AWS CloudTrail logs, Amazon VPC flow
logs, and DNS logs
• Analyzes billions of events across your AWS accounts
for signs of risk
• Identifies unexpected and suspicious activity, such as
privilege escalation, exposed creds, and
communication with malicious IPs
• Can send findings to CloudWatch Events
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
GuardDutyThreat Detectionand Notification
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
GuardDutyData Sources
• Flow Logs for VPCs do not need to
Be Turned on to generate findings
Data is consumed through
independent duplicate stream.
• Suggested turning on VPC Flow
Logs to augment data analysis
(charges apply).
VPC Flow Logs DNS Logs
• DNS Logs are based on queries made
from EC2 instances to known
questionable domains.
• DNS Logs are in addition to Route 53
query logs. Route 53 is not required
for GuardDuty to generate DNS
based findings.
CloudTrail Logs
• CloudTrail history of AWS API calls
used to access the Management
Console, SDKs , CLI, etc. presented by
GuardDuty.
• Identification of user and account
activity including source IP address
used to make the calls.
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
TrustedIP and Threat IP Lists
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
GuardDuty uses AWS developed threat intelligence and threat intelligence feeds from:
CrowdStrike & Proofpoint
Expand Findings with Custom Trusted IP Lists and Known Threat Lists
• Trusted IP lists whitelisted for secure communication with infrastructure and applications
• No Findings will be presented for IP Addresses on trusted lists (no false positives!)
• Threat lists consist of known malicious IP addresses.
• GuardDuty generates findings based on threat lists.
Limits: 1 Trusted and 6 Threat Lists per Account
TRUSTED IP LISTS KNOWN THREATS
+
GuardDutyFindings
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Describes threats by their primary purpose:
ThreatPurpose:ResourceTypeAffected/ThreatFamilyName.ThreatFamilyVariant!Artifact
Backdoor: resource compromised and capable of contacting source home
Behavior: activity that differs from established baseline
Crypto Currency: detected software associated with Crypto currencies
Pentest: activity detected similar to that generated by known pen testing tools
Recon: attack scoping vulnerabilities by probing ports, listening, database tables, etc.
Stealth: attack trying to hide actions / tracks
Trojan: program detected carrying out suspicious activity
Unauthorized Access: suspicious activity / pattern by unauthorized user
GuardDutyFindingsin Console
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
GuardDutyFindingsin Console
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
{
"version": "0",
"id": "c8c4daa7-a20c-2f03-0070-b7393dd542ad",
"detail-type": "GuardDuty Finding",
"source": "aws.guardduty",
"account": "254599117341",
"time": ”2018-03-13T08:04:33Z",
"region": ”ca-central-1",
"resources": [],
"detail": {
"schemaVersion": "2.0",
"accountId": "254599117341",
"region": ”ca-central-1",
"partition": "aws",
"id": "16afba5c5c43e07c9e3e5e2e544e95df",
"arn": "arn:aws:guardduty:us-east-1:254599117341:detector/254599117341/finding/16afba5c5c43e07c9e3e5e2e544e95df",
"type": ”UnauthorizedAccess:EC2/TorIPCaller",
“resource”: { ... },
“service”: { ... },
"severity": 3,
"createdAt": "2018-03-13T08:04:16.000Z",
"updatedAt": "2018-03-13T08:04:16.000Z",
"title": ”UnauthorizedAccess:EC2/TorIPCaller",
"description": ”UnauthorizedAccess:EC2/TorIPCaller"
}}
GuardDutyFindingsfor this workshop
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Unauthorized Access: suspicious activity / pattern by unauthorized user
• UnauthorizedAccess:IAMUser/ConsoleLogin
• UnauthorizedAccess:IAMUser/ConsoleLoginSuccess.B
• UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration
• UnauthorizedAccess:IAMUser/MaliciousIPCaller
• UnauthorizedAccess:IAMUser/UnusualASNCaller
GuardDutyFindingsfor this Workshop
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Threat UnauthorizedAccess:IAMUser/ConsoleLogin
• This IAM user has no prior history of login activity
• Your IAM user credentials might be compromised
Severity
• Medium
• Unknown confidence
Strategy
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
GuardDuty+ AdditionalMachineLearning
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
GuardDuty severity scores are assigned by the type of finding
They do not factor in context beyond their finding conditions
We can add context and start to build a more holistic confidence score by using a
ML approach we can assign
Let’s combine the UnauthorizedAccess GuardDuty finding with an additional
estimate of the likelihood of seeing this [User + SourceIP] to further evaluate how
unusual the activity is.
Amazon SageMaker
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon SageMaker
Build, train, and deploy machine
learning models at scale
What can you do?
• Quickly build highly accurate training datasets
• Rapidly build, train, and deploy ML models
• Automated model training and tuning
• Supports all algorithms and frameworks
• Many built-in optimized algorithms
• Includes MXNet, TensorFlow, and others
• Experiment using hosted interactive notebooks
• Jupyter notebooks that support multiple
languages (e.g., Python, Scala)
• Built-in A/B testing capabilities
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
M L F R A M E W O R K S &
I N F R A S T R U C T U R E
A I S E R V I C E S
R E K O G N I T I O N
I M A G E P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D L E X
R E K O G N I T I O N
V I D E O
Vision Speech Language Chatbots
A M A Z O N
S A G E M A K E R
F O R E C A S T
Forecasting
T E X T R A C T P E R S O N A L I Z E
Recommendations
B U I L D
Pre- built algorithms & notebooks
Data labeling (G R O U N D T R U T H )
T R A I N
One- click model training & tuning
Optimization (N E O )
D E P L O Y
One- click deployment & hosting
ML S E R V I C E S
F r a m e w o r k s I n t e r f a c es I n f r a s t r u c t u r e
E C 2 P 3
& P 3 N
E C 2 C 5 F P G A s G R E E N G R A S S E L A S T I C
I N F E R E N C E
Reinforcement learning
Algorithms & models ( A W S M A R K E T P L A C E
F O R M A C H I N E L E A R N I N G )
The Amazon MachineLearningStack
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
SageMaker Workflow
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
SageMaker Dashboard
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
SageMaker (Jupyter) Notebook
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
ML Model
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
IP InsightsModel
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Learn a measure of association between users and IP addresses using legitimate
activity to answer the question of “How normal it is to see a given user using a
given IP”
Statistical modeling and neural networks to capture associations
If the vector <principal ID, IP address> are close together, then it is likely for the
principal to access the account from that IP address, even if it has never accessed
it before
Solution
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Exercise Workflow
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Using our “normal” CloudTrail data (User, IP address pairs), train Amazon SageMaker
– using the IP Insights ML algorithm - to build a baseline model of normal IP usage
• As Amazon GuardDuty alerts come in, feed the alerting <User, IP> pairs to our model
to determine a fit score. Low scores Anomalous
• [Blend anomaly score with findings from Amazon GuardDuty to create an
aggregated list of suspicious activity] – See the IP Insights tutorial
BuildingBlocks
Amazon GuardDuty
Amazon
SageMaker
AWS Lambda
AWS CloudTrail
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
What you will do
Logs
Findings
IP Insights
!
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Howthe lab works…
Atyour own pace, and … we will walk throughsome steps
1. Getting started with the AWS Jam Platform
2. Editing, Saving, and Running the first AWS Lambda Function
3. Checking Amazon S3 for Lambda Results
4. Starting Amazon SageMaker
5. Jupyter Notebooks**
6. Setting the right bucket
7. Training**
8. Understanding the Scores
Let’sget started!
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
If you came late, register/sign-in at …
https://jam.awsevents.com
(will have to wait a few minutes for lab to spin-up)
Once you’ve entered the AWS console in the Jam platform, Step-
by-step lab instructions
https://ml-threat-detection.awssecworkshops.com/
HowdoI interpretthescoresattheend?
1.0 1.5 1.75
-2.0 -0.5 0.0 0.2 0.5
IPInsights Score
Frequency
CloudTrail (“normal”)
GuardDuty (“suspicious”)
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Whatifwehadmoredata?
https://aws.amazon.com/blogs/machine-learning/detect-suspicious-ip-addresses-with-the-amazon-sagemaker-ip-insights-algorithm/
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Inourlabexample?(Illustrative)
CloudTrail Baseline
Confirmed GuardDuty
Findings
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Inourlabexample?(Illustrative)
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
CloudTrail Baseline
Confirmed GuardDuty
Findings
Inourlabexample?(Illustrative)
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
CloudTrail Baseline
Confirmed GuardDuty
Findings
How would you deploy?
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Model Training &
Evaluation
How would you deploy?
Findings
SageMaker
Endpoint
Amazon Security
Hub
SIEM
(e.g., Splunk)
Simple Alerter
(e.g., SNS)
Model Training &
Evaluation
Model Deployment
Event
(event-
based)
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
PuttingThis Into Practice
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Use this as-is: score specific console logins tagged by GuardDuty
• Tuning
• Parameters and training sets
• When to retrain the IP Insights model?
• Use IP Insights on different classes of behavior
• Specific application usage (e.g., monitoring apps, bastion hosts)
• Thinking bigger – Adding additional detectors and models
• Leverage GuardDuty, Macie findings
• Build your own
• Leverage broad classes of algorithms and prior work
• Build application-specific models
• Remember the importance of Subject Matter Expertise
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
https://github.com/aws-samples/aws-ml-detection-workshop/
Jeff: jski@amazon.com (AppSec Team)
Neal: nrothled@amazon.com (ProServe Team)
Jared: (ML Solutions Lab)
Zack: (ProServe Team)
Baris: (GuardDuty Team)
Rima: (Security Hub Team)
A bit more about IP Insights
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
ID uses IP
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Dot Product ↑
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Negative Sample
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
Dot Product ↓
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.

More Related Content

Similar to Using ML with AWS GuardDuty and SageMaker to Identify Anomalous Traffic

Getting Started with AWS Security
Getting Started with AWS SecurityGetting Started with AWS Security
Getting Started with AWS SecurityAmazon Web Services
 
Evolve Your Incident Response Process and Powers for AWS
Evolve Your Incident Response Process and Powers for AWS Evolve Your Incident Response Process and Powers for AWS
Evolve Your Incident Response Process and Powers for AWS Amazon Web Services
 
Evolve Your Incident Response Process and Powers for AWS - SID306 - Chicago A...
Evolve Your Incident Response Process and Powers for AWS - SID306 - Chicago A...Evolve Your Incident Response Process and Powers for AWS - SID306 - Chicago A...
Evolve Your Incident Response Process and Powers for AWS - SID306 - Chicago A...Amazon Web Services
 
Deep Dive on Amazon GuardDuty - AWS Online Tech Talks
Deep Dive on Amazon GuardDuty - AWS Online Tech TalksDeep Dive on Amazon GuardDuty - AWS Online Tech Talks
Deep Dive on Amazon GuardDuty - AWS Online Tech TalksAmazon Web Services
 
Best Practices for AWS IoT Core (IOT347-R1) - AWS re:Invent 2018
Best Practices for AWS IoT Core (IOT347-R1) - AWS re:Invent 2018Best Practices for AWS IoT Core (IOT347-R1) - AWS re:Invent 2018
Best Practices for AWS IoT Core (IOT347-R1) - AWS re:Invent 2018Amazon Web Services
 
"Analyzing your web and application logs", Javier Ramirez, AWS Dev Day Kyiv 2...
"Analyzing your web and application logs", Javier Ramirez, AWS Dev Day Kyiv 2..."Analyzing your web and application logs", Javier Ramirez, AWS Dev Day Kyiv 2...
"Analyzing your web and application logs", Javier Ramirez, AWS Dev Day Kyiv 2...Provectus
 
Privacy by design on AWS - FND202-R - AWS re:Inforce 2019
Privacy by design on AWS - FND202-R - AWS re:Inforce 2019 Privacy by design on AWS - FND202-R - AWS re:Inforce 2019
Privacy by design on AWS - FND202-R - AWS re:Inforce 2019 Amazon Web Services
 
A Case Study on Insider Threat Detection
A Case Study on Insider Threat DetectionA Case Study on Insider Threat Detection
A Case Study on Insider Threat DetectionAmazon Web Services
 
Security at Scale: Security Hub and the Well Architected Framework - AWS Summ...
Security at Scale: Security Hub and the Well Architected Framework - AWS Summ...Security at Scale: Security Hub and the Well Architected Framework - AWS Summ...
Security at Scale: Security Hub and the Well Architected Framework - AWS Summ...Amazon Web Services
 
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...Amazon Web Services
 
Threat Detection & Remediation Workshop - Module 2
Threat Detection & Remediation Workshop - Module 2Threat Detection & Remediation Workshop - Module 2
Threat Detection & Remediation Workshop - Module 2Amazon Web Services
 
Scaling threat detection and response on AWS
Scaling threat detection and response on AWSScaling threat detection and response on AWS
Scaling threat detection and response on AWSAmazon Web Services
 
Performing serverless analytics in AWS Glue - ADB202 - Chicago AWS Summit
Performing serverless analytics in AWS Glue - ADB202 - Chicago AWS SummitPerforming serverless analytics in AWS Glue - ADB202 - Chicago AWS Summit
Performing serverless analytics in AWS Glue - ADB202 - Chicago AWS SummitAmazon Web Services
 
Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018
Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018
Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018Amazon Web Services
 
Incident Response: Preparing and Simulating Threat Response
Incident Response: Preparing and Simulating Threat ResponseIncident Response: Preparing and Simulating Threat Response
Incident Response: Preparing and Simulating Threat ResponseAmazon Web Services
 
Find All the Threats: AWS Threat Detection and Remediation (SEC331) - AWS re:...
Find All the Threats: AWS Threat Detection and Remediation (SEC331) - AWS re:...Find All the Threats: AWS Threat Detection and Remediation (SEC331) - AWS re:...
Find All the Threats: AWS Threat Detection and Remediation (SEC331) - AWS re:...Amazon Web Services
 
IoT at scale - Monitor and manage devices with AWS IoT Device Management - SV...
IoT at scale - Monitor and manage devices with AWS IoT Device Management - SV...IoT at scale - Monitor and manage devices with AWS IoT Device Management - SV...
IoT at scale - Monitor and manage devices with AWS IoT Device Management - SV...Amazon Web Services
 
Secure Configuration and Automation Overview
Secure Configuration and Automation OverviewSecure Configuration and Automation Overview
Secure Configuration and Automation OverviewAmazon Web Services
 

Similar to Using ML with AWS GuardDuty and SageMaker to Identify Anomalous Traffic (20)

AWS Security by Design
AWS Security by Design AWS Security by Design
AWS Security by Design
 
Getting Started with AWS Security
Getting Started with AWS SecurityGetting Started with AWS Security
Getting Started with AWS Security
 
Evolve Your Incident Response Process and Powers for AWS
Evolve Your Incident Response Process and Powers for AWS Evolve Your Incident Response Process and Powers for AWS
Evolve Your Incident Response Process and Powers for AWS
 
Evolve Your Incident Response Process and Powers for AWS - SID306 - Chicago A...
Evolve Your Incident Response Process and Powers for AWS - SID306 - Chicago A...Evolve Your Incident Response Process and Powers for AWS - SID306 - Chicago A...
Evolve Your Incident Response Process and Powers for AWS - SID306 - Chicago A...
 
Deep Dive on Amazon GuardDuty - AWS Online Tech Talks
Deep Dive on Amazon GuardDuty - AWS Online Tech TalksDeep Dive on Amazon GuardDuty - AWS Online Tech Talks
Deep Dive on Amazon GuardDuty - AWS Online Tech Talks
 
Best Practices for AWS IoT Core (IOT347-R1) - AWS re:Invent 2018
Best Practices for AWS IoT Core (IOT347-R1) - AWS re:Invent 2018Best Practices for AWS IoT Core (IOT347-R1) - AWS re:Invent 2018
Best Practices for AWS IoT Core (IOT347-R1) - AWS re:Invent 2018
 
"Analyzing your web and application logs", Javier Ramirez, AWS Dev Day Kyiv 2...
"Analyzing your web and application logs", Javier Ramirez, AWS Dev Day Kyiv 2..."Analyzing your web and application logs", Javier Ramirez, AWS Dev Day Kyiv 2...
"Analyzing your web and application logs", Javier Ramirez, AWS Dev Day Kyiv 2...
 
Privacy by design on AWS - FND202-R - AWS re:Inforce 2019
Privacy by design on AWS - FND202-R - AWS re:Inforce 2019 Privacy by design on AWS - FND202-R - AWS re:Inforce 2019
Privacy by design on AWS - FND202-R - AWS re:Inforce 2019
 
Security@Scale
Security@ScaleSecurity@Scale
Security@Scale
 
A Case Study on Insider Threat Detection
A Case Study on Insider Threat DetectionA Case Study on Insider Threat Detection
A Case Study on Insider Threat Detection
 
Security at Scale: Security Hub and the Well Architected Framework - AWS Summ...
Security at Scale: Security Hub and the Well Architected Framework - AWS Summ...Security at Scale: Security Hub and the Well Architected Framework - AWS Summ...
Security at Scale: Security Hub and the Well Architected Framework - AWS Summ...
 
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
Operational Excellence for Identity & Access Management (SEC334) - AWS re:Inv...
 
Threat Detection & Remediation Workshop - Module 2
Threat Detection & Remediation Workshop - Module 2Threat Detection & Remediation Workshop - Module 2
Threat Detection & Remediation Workshop - Module 2
 
Scaling threat detection and response on AWS
Scaling threat detection and response on AWSScaling threat detection and response on AWS
Scaling threat detection and response on AWS
 
Performing serverless analytics in AWS Glue - ADB202 - Chicago AWS Summit
Performing serverless analytics in AWS Glue - ADB202 - Chicago AWS SummitPerforming serverless analytics in AWS Glue - ADB202 - Chicago AWS Summit
Performing serverless analytics in AWS Glue - ADB202 - Chicago AWS Summit
 
Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018
Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018
Best Practices to Secure Data Lake on AWS (ANT327) - AWS re:Invent 2018
 
Incident Response: Preparing and Simulating Threat Response
Incident Response: Preparing and Simulating Threat ResponseIncident Response: Preparing and Simulating Threat Response
Incident Response: Preparing and Simulating Threat Response
 
Find All the Threats: AWS Threat Detection and Remediation (SEC331) - AWS re:...
Find All the Threats: AWS Threat Detection and Remediation (SEC331) - AWS re:...Find All the Threats: AWS Threat Detection and Remediation (SEC331) - AWS re:...
Find All the Threats: AWS Threat Detection and Remediation (SEC331) - AWS re:...
 
IoT at scale - Monitor and manage devices with AWS IoT Device Management - SV...
IoT at scale - Monitor and manage devices with AWS IoT Device Management - SV...IoT at scale - Monitor and manage devices with AWS IoT Device Management - SV...
IoT at scale - Monitor and manage devices with AWS IoT Device Management - SV...
 
Secure Configuration and Automation Overview
Secure Configuration and Automation OverviewSecure Configuration and Automation Overview
Secure Configuration and Automation Overview
 

Recently uploaded

INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDRafezzaman
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024thyngster
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)jennyeacort
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxEmmanuel Dauda
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...Pooja Nehwal
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptSonatrach
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一F sss
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...Florian Roscheck
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改atducpo
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一F La
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 

Recently uploaded (20)

INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTDINTERNSHIP ON PURBASHA COMPOSITE TEX LTD
INTERNSHIP ON PURBASHA COMPOSITE TEX LTD
 
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
Consent & Privacy Signals on Google *Pixels* - MeasureCamp Amsterdam 2024
 
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
Call Us ➥97111√47426🤳Call Girls in Aerocity (Delhi NCR)
 
E-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptxE-Commerce Order PredictionShraddha Kamble.pptx
E-Commerce Order PredictionShraddha Kamble.pptx
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Customer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptxCustomer Service Analytics - Make Sense of All Your Data.pptx
Customer Service Analytics - Make Sense of All Your Data.pptx
 
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...{Pooja:  9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
{Pooja: 9892124323 } Call Girl in Mumbai | Jas Kaur Rate 4500 Free Hotel Del...
 
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.pptdokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
dokumen.tips_chapter-4-transient-heat-conduction-mehmet-kanoglu.ppt
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
办理学位证中佛罗里达大学毕业证,UCF成绩单原版一比一
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...From idea to production in a day – Leveraging Azure ML and Streamlit to build...
From idea to production in a day – Leveraging Azure ML and Streamlit to build...
 
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
代办国外大学文凭《原版美国UCLA文凭证书》加州大学洛杉矶分校毕业证制作成绩单修改
 
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Decoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in ActionDecoding Loan Approval: Predictive Modeling in Action
Decoding Loan Approval: Predictive Modeling in Action
 
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
办理(Vancouver毕业证书)加拿大温哥华岛大学毕业证成绩单原版一比一
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 

Using ML with AWS GuardDuty and SageMaker to Identify Anomalous Traffic

  • 1. © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. Using ML with Amazon SageMakerand GuardDuty to IdentifyAnomalous Traffic Jeff Puchalski Senior Security Engineer AWS Security S E P 3 0 2 - R Neal Rothleder Senior Security Consultant AWS Professional Services
  • 2. Relatedbreakouts Tuesday, June 25 SEP302-R Using ML with Amazon SageMaker & GuardDuty to identify anomalous traffic 2:45pm – 4:45pm | Level 2, Room 210A Wednesday, June 26 SEP302-R1 Using ML with Amazon SageMaker & GuardDuty to identify anomalous traffic 8:45am – 10:45am | Level 1, Room 104A Tuesday June 25 Wednesday (AM, PM) June 26 SEJ001- Security Jam © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 3. What’sour goal? © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. • Demonstrate Machine Learning in a Security Context • Show the fundamentals of AWS CloudTrail, AWS Lambda, and Amazon GuardDuty • Teach you to build and deploy a machine learning model in Amazon SageMaker • Discuss how this could be integrated into a single architecture
  • 4. What you will do © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. • Use the AWS Jam Platform to run the lab • Walk through Amazon GuardDuty findings • Download sample AWS CloudTrail logs and Amazon GuardDuty findings • Make edits to AWS Lambda functions to do the data preparation needed prior to machine learning • Use Amazon SageMaker to identify users of AWS accounts coming from anomalous IP addresses • Fuse those findings with those coming from Amazon GuardDuty to create an aggregated list of suspicious activity
  • 5. What you will do Logs Findings IP Insights ! © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 6. What we willcover © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS CloudTrail logging • Review CloudTrail data feeds for format and content • Load test CloudTrail data of good and bad activities Amazon GuardDuty findings • Review GuardDuty finding types and formats • Hands-on lab - Use GuardDuty findings to create an aggregated list of suspicious activity Amazon SageMaker • High-level architecture review - building and deploying a model • Hands-on lab – Use IP Insights algorithm to detect anomalous IP usage for GuardDuty findings, using CloudTrail log data for model training
  • 7. AWSJAMPlatform © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. https://jam.awsevents.com/
  • 8. AWS CloudTrail © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 9. AWS CloudTrail Track user activity and API usage What can you do? • Simplify compliance audits and incident response by automatically recording and storing activity logs for your AWS account • Logs API calls made to AWS services • 90-day event history on by default • Can create log “trails” stored to S3 • Optional KMS encryption • Optional log file integrity validation • Optional data-level event logging for S3 object calls and Lambda invokes • Can route events to CloudWatch Events © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 10. Introto AWSCloudTrail © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS CloudTrail logs activity for supported services to an AWS account Example API events that are logged: iam:CreateUser s3:ListBucket CloudTrail is enabled by default on all AWS accounts (as of August 2017) Event history of create, modify, and delete operations for last 90 days Viewable, searchable, and downloadable To access CloudTrail log files directly or for a longer time period, create a trail You can also use Athena to query the logs directly in S3 buckets
  • 11. AWSCloudTraillog files © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. Gzipped JSON files created in the trail’s Amazon S3 bucket Each file contains API event records covering ~5 minute time window Log files encrypted by default (SSE with S3 or KMS managed key) Optional log file integrity validation using signed digest file containing log-file hashes
  • 12. AWSCloudTrailevents © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. Each record in a CloudTrail log file represents a single event All records contain some common fields: • Timestamp • Region • Event name (i.e., the API call) • Event source (i.e., the service) • Source IP address • User identity Event-specific request and response parameters may also be included for some events
  • 13. What do CloudTraillogs look like? © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. {"Records": [{ "eventVersion": "1.0", "userIdentity": { "type": "IAMUser", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:user/Alice", "accountId": "123456789012", "accessKeyId": "EXAMPLE_KEY_ID", "userName": "Alice” }, "eventTime": "2017-11-29T11:29:42Z", "eventSource": "iam.amazonaws.com", "eventName": "CreateUser", "awsRegion": "us-east-1", "sourceIPAddress": ”192.168.0.1", "userAgent": "aws-cli/1.3.2 Python/2.7.5 Windows/7", "requestParameters": {"userName": "Bob”}, "responseElements": {"user": {"createDate": ”Nov 29, 2017 11:29:42 AM", "userName": "Bob", "arn": "arn:aws:iam::123456789012:user/Bob", "path": "/", "userId": "EXAMPLEUSERID"} } }]}
  • 14. What do CloudTraillogs look like? © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. {"Records": [{ "eventVersion": "1.0", "userIdentity": { "type": "IAMUser", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:user/Alice", "accountId": "123456789012", "accessKeyId": "EXAMPLE_KEY_ID", "userName": "Alice” }, "eventTime": "2017-11-29T11:29:42Z", "eventSource": "iam.amazonaws.com", "eventName": "CreateUser", "awsRegion": "us-east-1", "sourceIPAddress": ”192.168.0.1", "userAgent": "aws-cli/1.3.2 Python/2.7.5 Windows/7", "requestParameters": {"userName": "Bob”}, "responseElements": {"user": {"createDate": ”Nov 29, 2017 11:29:42 AM", "userName": "Bob", "arn": "arn:aws:iam::123456789012:user/Bob", "path": "/", "userId": "EXAMPLEUSERID"} } }]}
  • 15. What do CloudTraillogs look like? © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. {"Records": [{ "eventVersion": "1.0", "userIdentity": { "type": "IAMUser", "principalId": "EX_PRINCIPAL_ID", "arn": "arn:aws:iam::123456789012:user/Alice", "accountId": "123456789012", "accessKeyId": "EXAMPLE_KEY_ID", "userName": "Alice” }, "eventTime": "2017-11-29T11:29:42Z", "eventSource": "iam.amazonaws.com", "eventName": "CreateUser", "awsRegion": "us-east-1", "sourceIPAddress": ”192.168.0.1", "userAgent": "aws-cli/1.3.2 Python/2.7.5 Windows/7", "requestParameters": {"userName": "Bob”}, "responseElements": {"user": {"createDate": ”Nov 29, 2017 11:29:42 AM", "userName": "Bob", "arn": "arn:aws:iam::123456789012:user/Bob", "path": "/", "userId": "EXAMPLEUSERID"} } }]}
  • 16. Amazon GuardDuty © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 17. Amazon GuardDuty Intelligent threat detection and continuous monitoring to protect your AWS accounts and workloads What can you do? • Continuous monitoring to rapidly detect threats (needle) to your environments in the sea of log data (haystack) • Processes AWS CloudTrail logs, Amazon VPC flow logs, and DNS logs • Analyzes billions of events across your AWS accounts for signs of risk • Identifies unexpected and suspicious activity, such as privilege escalation, exposed creds, and communication with malicious IPs • Can send findings to CloudWatch Events © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 18. GuardDutyThreat Detectionand Notification © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 19. GuardDutyData Sources • Flow Logs for VPCs do not need to Be Turned on to generate findings Data is consumed through independent duplicate stream. • Suggested turning on VPC Flow Logs to augment data analysis (charges apply). VPC Flow Logs DNS Logs • DNS Logs are based on queries made from EC2 instances to known questionable domains. • DNS Logs are in addition to Route 53 query logs. Route 53 is not required for GuardDuty to generate DNS based findings. CloudTrail Logs • CloudTrail history of AWS API calls used to access the Management Console, SDKs , CLI, etc. presented by GuardDuty. • Identification of user and account activity including source IP address used to make the calls. © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 20. TrustedIP and Threat IP Lists © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. GuardDuty uses AWS developed threat intelligence and threat intelligence feeds from: CrowdStrike & Proofpoint Expand Findings with Custom Trusted IP Lists and Known Threat Lists • Trusted IP lists whitelisted for secure communication with infrastructure and applications • No Findings will be presented for IP Addresses on trusted lists (no false positives!) • Threat lists consist of known malicious IP addresses. • GuardDuty generates findings based on threat lists. Limits: 1 Trusted and 6 Threat Lists per Account TRUSTED IP LISTS KNOWN THREATS +
  • 21. GuardDutyFindings © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. Describes threats by their primary purpose: ThreatPurpose:ResourceTypeAffected/ThreatFamilyName.ThreatFamilyVariant!Artifact Backdoor: resource compromised and capable of contacting source home Behavior: activity that differs from established baseline Crypto Currency: detected software associated with Crypto currencies Pentest: activity detected similar to that generated by known pen testing tools Recon: attack scoping vulnerabilities by probing ports, listening, database tables, etc. Stealth: attack trying to hide actions / tracks Trojan: program detected carrying out suspicious activity Unauthorized Access: suspicious activity / pattern by unauthorized user
  • 22. GuardDutyFindingsin Console © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 23. GuardDutyFindingsin Console © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. { "version": "0", "id": "c8c4daa7-a20c-2f03-0070-b7393dd542ad", "detail-type": "GuardDuty Finding", "source": "aws.guardduty", "account": "254599117341", "time": ”2018-03-13T08:04:33Z", "region": ”ca-central-1", "resources": [], "detail": { "schemaVersion": "2.0", "accountId": "254599117341", "region": ”ca-central-1", "partition": "aws", "id": "16afba5c5c43e07c9e3e5e2e544e95df", "arn": "arn:aws:guardduty:us-east-1:254599117341:detector/254599117341/finding/16afba5c5c43e07c9e3e5e2e544e95df", "type": ”UnauthorizedAccess:EC2/TorIPCaller", “resource”: { ... }, “service”: { ... }, "severity": 3, "createdAt": "2018-03-13T08:04:16.000Z", "updatedAt": "2018-03-13T08:04:16.000Z", "title": ”UnauthorizedAccess:EC2/TorIPCaller", "description": ”UnauthorizedAccess:EC2/TorIPCaller" }}
  • 24. GuardDutyFindingsfor this workshop © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. Unauthorized Access: suspicious activity / pattern by unauthorized user • UnauthorizedAccess:IAMUser/ConsoleLogin • UnauthorizedAccess:IAMUser/ConsoleLoginSuccess.B • UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration • UnauthorizedAccess:IAMUser/MaliciousIPCaller • UnauthorizedAccess:IAMUser/UnusualASNCaller
  • 25. GuardDutyFindingsfor this Workshop © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. Threat UnauthorizedAccess:IAMUser/ConsoleLogin • This IAM user has no prior history of login activity • Your IAM user credentials might be compromised Severity • Medium • Unknown confidence
  • 26. Strategy © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 27. GuardDuty+ AdditionalMachineLearning © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. GuardDuty severity scores are assigned by the type of finding They do not factor in context beyond their finding conditions We can add context and start to build a more holistic confidence score by using a ML approach we can assign Let’s combine the UnauthorizedAccess GuardDuty finding with an additional estimate of the likelihood of seeing this [User + SourceIP] to further evaluate how unusual the activity is.
  • 28. Amazon SageMaker © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 29. Amazon SageMaker Build, train, and deploy machine learning models at scale What can you do? • Quickly build highly accurate training datasets • Rapidly build, train, and deploy ML models • Automated model training and tuning • Supports all algorithms and frameworks • Many built-in optimized algorithms • Includes MXNet, TensorFlow, and others • Experiment using hosted interactive notebooks • Jupyter notebooks that support multiple languages (e.g., Python, Scala) • Built-in A/B testing capabilities © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 30. M L F R A M E W O R K S & I N F R A S T R U C T U R E A I S E R V I C E S R E K O G N I T I O N I M A G E P O L L Y T R A N S C R I B E T R A N S L A T E C O M P R E H E N D L E X R E K O G N I T I O N V I D E O Vision Speech Language Chatbots A M A Z O N S A G E M A K E R F O R E C A S T Forecasting T E X T R A C T P E R S O N A L I Z E Recommendations B U I L D Pre- built algorithms & notebooks Data labeling (G R O U N D T R U T H ) T R A I N One- click model training & tuning Optimization (N E O ) D E P L O Y One- click deployment & hosting ML S E R V I C E S F r a m e w o r k s I n t e r f a c es I n f r a s t r u c t u r e E C 2 P 3 & P 3 N E C 2 C 5 F P G A s G R E E N G R A S S E L A S T I C I N F E R E N C E Reinforcement learning Algorithms & models ( A W S M A R K E T P L A C E F O R M A C H I N E L E A R N I N G ) The Amazon MachineLearningStack © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 31. SageMaker Workflow © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 32. SageMaker Dashboard © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 33. SageMaker (Jupyter) Notebook © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 34. ML Model © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 35. IP InsightsModel © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. Learn a measure of association between users and IP addresses using legitimate activity to answer the question of “How normal it is to see a given user using a given IP” Statistical modeling and neural networks to capture associations If the vector <principal ID, IP address> are close together, then it is likely for the principal to access the account from that IP address, even if it has never accessed it before
  • 36. Solution © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 37. Exercise Workflow © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. • Using our “normal” CloudTrail data (User, IP address pairs), train Amazon SageMaker – using the IP Insights ML algorithm - to build a baseline model of normal IP usage • As Amazon GuardDuty alerts come in, feed the alerting <User, IP> pairs to our model to determine a fit score. Low scores Anomalous • [Blend anomaly score with findings from Amazon GuardDuty to create an aggregated list of suspicious activity] – See the IP Insights tutorial
  • 38. BuildingBlocks Amazon GuardDuty Amazon SageMaker AWS Lambda AWS CloudTrail © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 39. What you will do Logs Findings IP Insights ! © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 40. © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. Howthe lab works… Atyour own pace, and … we will walk throughsome steps 1. Getting started with the AWS Jam Platform 2. Editing, Saving, and Running the first AWS Lambda Function 3. Checking Amazon S3 for Lambda Results 4. Starting Amazon SageMaker 5. Jupyter Notebooks** 6. Setting the right bucket 7. Training** 8. Understanding the Scores
  • 41. Let’sget started! © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. If you came late, register/sign-in at … https://jam.awsevents.com (will have to wait a few minutes for lab to spin-up) Once you’ve entered the AWS console in the Jam platform, Step- by-step lab instructions https://ml-threat-detection.awssecworkshops.com/
  • 42. HowdoI interpretthescoresattheend? 1.0 1.5 1.75 -2.0 -0.5 0.0 0.2 0.5 IPInsights Score Frequency CloudTrail (“normal”) GuardDuty (“suspicious”) © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 44. Inourlabexample?(Illustrative) CloudTrail Baseline Confirmed GuardDuty Findings © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 45. Inourlabexample?(Illustrative) © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. CloudTrail Baseline Confirmed GuardDuty Findings
  • 46. Inourlabexample?(Illustrative) © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. CloudTrail Baseline Confirmed GuardDuty Findings
  • 47. How would you deploy? © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. Model Training & Evaluation
  • 48. How would you deploy? Findings SageMaker Endpoint Amazon Security Hub SIEM (e.g., Splunk) Simple Alerter (e.g., SNS) Model Training & Evaluation Model Deployment Event (event- based) © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 49. PuttingThis Into Practice © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. • Use this as-is: score specific console logins tagged by GuardDuty • Tuning • Parameters and training sets • When to retrain the IP Insights model? • Use IP Insights on different classes of behavior • Specific application usage (e.g., monitoring apps, bastion hosts) • Thinking bigger – Adding additional detectors and models • Leverage GuardDuty, Macie findings • Build your own • Leverage broad classes of algorithms and prior work • Build application-specific models • Remember the importance of Subject Matter Expertise
  • 50. © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you! https://github.com/aws-samples/aws-ml-detection-workshop/ Jeff: jski@amazon.com (AppSec Team) Neal: nrothled@amazon.com (ProServe Team) Jared: (ML Solutions Lab) Zack: (ProServe Team) Baris: (GuardDuty Team) Rima: (Security Hub Team)
  • 51. A bit more about IP Insights © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 52. © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 53. ID uses IP © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 54. © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 55. Dot Product ↑ © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 56. © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 57. Negative Sample © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 58. © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 59. Dot Product ↓ © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 60. © 2019,Amazon Web Services, Inc. or its affiliates. All rights reserved.