SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Anatomy of an AWS
Account Cryptojack
DevOpsDays Boston 2018
Presented by Anton Gurov
9/24/18
Introduction
3 © 2018 CLOUDHEALTH® TECHNOLOGIES INC.
About me
Anton Gurov
• Director of TechOps @ CloudHealth Technologies
- Security
- Compliance
- Operations
• Experience in PCI-DSS/SOC2/GDPR compliance
- Private/Hybrid/Cloud
• Mobile payments
• Ad tech
• Cloud management
• 3 successful exits
• Avid car racer, juggler and acro-base!
• Contact: www.linkedin.com/in/antongurov
4 © 2018 CLOUDHEALTH® TECHNOLOGIES INC.
Cryptojack summary
• Cryptojack - compute resource take-over for the purposes of crypto-
mining operations
• Browsers
• Endpoints/Home routers
• Compute resources - physical/cloud
• Tesla/Aviva/Gemalto - 2018
- Open Kubernetes clusters
- Leaked AWS creds
- Many more go unreported
• Could be worse!
- CodeSpaces - 2014
• Ransom
• Company murdered
“Money Doesn’t
Grow on Trees,
but it’s Growing
in the Cloud” -
RedLock CSI Team
Incident
6 © 2018 CLOUDHEALTH® TECHNOLOGIES INC.
Cryptojack incident
Incident info
● Support email from CloudHealth Tech customer requesting assistance
● 200 c4.8xlarge instances in AWS account - multiple regions
○ 100% CPU utilization, $12k per day in EC2 compute $
● No CloudTrail. No audit logs.
● Innocent user framed!
7 © 2018 CLOUDHEALTH® TECHNOLOGIES INC.
Cryptojack incident
Incident handling and response
● AWS Support
○ Account cleanup
○ CloudTrail enabled
○ AWS refund (case dependent)
● CloudHealth
○ Forensics
○ Developed timeline
○ Configured customer CHT security module reporting and best
practices
Timeline
9 © 2018 CLOUDHEALTH® TECHNOLOGIES INC.
Cryptojack incident
Timeline
• 3/14 10:30 UTC
A series of public AMIs like ami-6dbd137b created and shared globally across all regions
• 3/21 14:43 UTC
Customer admin user Access Key 1 Rotated
• 3/21 14:44 UTC
Framed user console pwd and admin perms set
• 3/21 14:45 UTC
Instances/VPCs/SGs started getting created
• 3/21 14:52 UTC
Customer admin user Access Key 1 Last Used - IAM Service
• 3/21 14:54 UTC
200 c3.8xlarge Windows instances discovered in customer account by CHT platform
• 3/22
Cost spike discovered in CloudHealth app by customer
}Less than
10 minutes
Pre-stage}
10 © 2018 CLOUDHEALTH® TECHNOLOGIES INC.
Cryptojack incident
Timeline summary
● Most useful data came from AWS Credentials Report
○ generate-credential-report
● Compromised AWS Key rotated immediately by an attacker
● Highly automated
○ Pre-baked AMIs
○ SGs/VPCs/EC2 templated
● Limited to 200 machines
○ AWS default account limits
Prevention & Detection
12 © 2018 CLOUDHEALTH® TECHNOLOGIES INC.
Cryptojack incident
Protection
● Secure AWS root account
○ Physical MFA - $13
○ Disable API
● Users/Operators
○ Enable and force MFA for all operations (Console/API)
■ AWS Tutorial: Enable Your Users to Configure Their Own Credentials and MFA Settings
● https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_users-self-manage-mfa-and-creds.html
■ CLI wrapper for MFA - aws-vault
● https://github.com/99designs/aws-vault
○ Use Idp federation (SAML/SSO)
■ Google, OKTA, Ping Identity, OneLogin, etc
○ No direct permissions to users, use IAM AssumeRole
13 © 2018 CLOUDHEALTH® TECHNOLOGIES INC.
Cryptojack incident
Protection - cont.
● Application/Service accounts
○ Say “bye-bye” to AWS Key/Secret keys
■ IAM roles and instance profiles
■ Enable IP whitelisting in IAM policies
○ Limit application and service permissions
■ No blanket *:*
○ Scan your code for AWS keys before they do
■ GitGuardian, keynuker, gitsecrets
● General
○ Keep existing EC2 limits unless required
○ AWS CIS Benchmark
■ ThreatStack, CloudHealth, others
○ Enable CloudTrail and AWS Config!
14 © 2018 CLOUDHEALTH® TECHNOLOGIES INC.
Cryptojack incident
Detection
● Watch and alert on AWS costs projections
○ Create a Billing Alarm to Monitor Your Estimated AWS Charges
■ https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html
○ CloudHealth - % change from baseline
● CloudTrail monitoring
○ Setup
■ All regions
■ Forward to central secure AWS account
○ Real-time monitoring and alerting
■ ThreatStack, SumoLogic, Splunk, etc
■ Look and flag API credentials changes
● Misc
○ AMI Provenance and VPC Flow Logs
3 Takeaways
16 © 2018 CLOUDHEALTH® TECHNOLOGIES INC.
Key Takeaways
● Enforce MFA on user and root accounts
● Use IAM Roles, ban Key/Secret Keys
● Enable CloudTrail/Config monitoring and Cost alerting

Weitere ähnliche Inhalte

Ähnlich wie AWS Cryptojack Incident Timeline and Prevention

Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...Priyanka Aash
 
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...Amazon Web Services
 
004 - Logging in the Cloud -- hide01.ir.pptx
004 - Logging in the Cloud  --  hide01.ir.pptx004 - Logging in the Cloud  --  hide01.ir.pptx
004 - Logging in the Cloud -- hide01.ir.pptxnitinscribd
 
How to Secure your Hybrid Enviroment - Pop-up Loft Tel Aviv
How to Secure your Hybrid Enviroment - Pop-up Loft Tel AvivHow to Secure your Hybrid Enviroment - Pop-up Loft Tel Aviv
How to Secure your Hybrid Enviroment - Pop-up Loft Tel AvivAmazon Web Services
 
Recent AWS Security Improvements - AWS User Group Perth - November 2018
Recent AWS Security Improvements - AWS User Group Perth - November 2018Recent AWS Security Improvements - AWS User Group Perth - November 2018
Recent AWS Security Improvements - AWS User Group Perth - November 2018James Bromberger
 
Slide share device to iot solution – a blueprint
Slide share   device to iot solution – a blueprintSlide share   device to iot solution – a blueprint
Slide share device to iot solution – a blueprintGuy Vinograd ☁
 
Computing at the Edge with AWS Greengrass and Amazon FreeRTOS, ft. Enel (IOT2...
Computing at the Edge with AWS Greengrass and Amazon FreeRTOS, ft. Enel (IOT2...Computing at the Edge with AWS Greengrass and Amazon FreeRTOS, ft. Enel (IOT2...
Computing at the Edge with AWS Greengrass and Amazon FreeRTOS, ft. Enel (IOT2...Amazon Web Services
 
TENDENCIAS DE SEGURIDAD PARA AMBIENTES EN LA NUBE
TENDENCIAS DE SEGURIDAD PARA AMBIENTES EN LA NUBETENDENCIAS DE SEGURIDAD PARA AMBIENTES EN LA NUBE
TENDENCIAS DE SEGURIDAD PARA AMBIENTES EN LA NUBECristian Garcia G.
 
[2021 Somos Summit] - Rethinking Identity Access Management and The Rise of t...
[2021 Somos Summit] - Rethinking Identity Access Management and The Rise of t...[2021 Somos Summit] - Rethinking Identity Access Management and The Rise of t...
[2021 Somos Summit] - Rethinking Identity Access Management and The Rise of t...WSO2
 
[DOST] OpenStack & the Enterprise Hybrid Cloud - Tech, People, Processes
[DOST] OpenStack & the Enterprise Hybrid Cloud - Tech, People, Processes[DOST] OpenStack & the Enterprise Hybrid Cloud - Tech, People, Processes
[DOST] OpenStack & the Enterprise Hybrid Cloud - Tech, People, ProcessesGerd Prüßmann
 
Anthos Security: modernize your security posture for cloud native applications
Anthos Security: modernize your security posture for cloud native applicationsAnthos Security: modernize your security posture for cloud native applications
Anthos Security: modernize your security posture for cloud native applicationsGreg Castle
 
Kubernetes fingerprinting with Prometheus.pdf
Kubernetes fingerprinting with Prometheus.pdfKubernetes fingerprinting with Prometheus.pdf
Kubernetes fingerprinting with Prometheus.pdfKawimbaLofgrens
 
Iot 1906 - approaches for building applications with the IBM IoT cloud
Iot 1906 - approaches for building applications with the IBM IoT cloudIot 1906 - approaches for building applications with the IBM IoT cloud
Iot 1906 - approaches for building applications with the IBM IoT cloudPeterNiblett
 
Introduction to Serverless through Architectural Patterns
Introduction to Serverless through Architectural PatternsIntroduction to Serverless through Architectural Patterns
Introduction to Serverless through Architectural PatternsMathieu Mailhos
 
Oracle Open World 2018 - Cloud Lift Accelerator Suite
Oracle Open World 2018 - Cloud Lift Accelerator SuiteOracle Open World 2018 - Cloud Lift Accelerator Suite
Oracle Open World 2018 - Cloud Lift Accelerator SuiteIke Aniagoh
 
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud ThreatsBeyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud ThreatsSBWebinars
 
Internet of things basics
Internet of things basicsInternet of things basics
Internet of things basicscumulocity
 

Ähnlich wie AWS Cryptojack Incident Timeline and Prevention (20)

Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
Detecting Malicious Cloud Account Behavior: A Look at the New Native Platform...
 
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
Distributed Solar Systems at EDF Renewables and AWS IoT: A Natural Fit (PUT30...
 
The rise of microservices
The rise of microservicesThe rise of microservices
The rise of microservices
 
Check Point and Accenture Webinar
Check Point and Accenture Webinar Check Point and Accenture Webinar
Check Point and Accenture Webinar
 
004 - Logging in the Cloud -- hide01.ir.pptx
004 - Logging in the Cloud  --  hide01.ir.pptx004 - Logging in the Cloud  --  hide01.ir.pptx
004 - Logging in the Cloud -- hide01.ir.pptx
 
How to Secure your Hybrid Enviroment - Pop-up Loft Tel Aviv
How to Secure your Hybrid Enviroment - Pop-up Loft Tel AvivHow to Secure your Hybrid Enviroment - Pop-up Loft Tel Aviv
How to Secure your Hybrid Enviroment - Pop-up Loft Tel Aviv
 
Recent AWS Security Improvements - AWS User Group Perth - November 2018
Recent AWS Security Improvements - AWS User Group Perth - November 2018Recent AWS Security Improvements - AWS User Group Perth - November 2018
Recent AWS Security Improvements - AWS User Group Perth - November 2018
 
Slide share device to iot solution – a blueprint
Slide share   device to iot solution – a blueprintSlide share   device to iot solution – a blueprint
Slide share device to iot solution – a blueprint
 
The Perimeter Is Dead
The Perimeter Is DeadThe Perimeter Is Dead
The Perimeter Is Dead
 
Computing at the Edge with AWS Greengrass and Amazon FreeRTOS, ft. Enel (IOT2...
Computing at the Edge with AWS Greengrass and Amazon FreeRTOS, ft. Enel (IOT2...Computing at the Edge with AWS Greengrass and Amazon FreeRTOS, ft. Enel (IOT2...
Computing at the Edge with AWS Greengrass and Amazon FreeRTOS, ft. Enel (IOT2...
 
TENDENCIAS DE SEGURIDAD PARA AMBIENTES EN LA NUBE
TENDENCIAS DE SEGURIDAD PARA AMBIENTES EN LA NUBETENDENCIAS DE SEGURIDAD PARA AMBIENTES EN LA NUBE
TENDENCIAS DE SEGURIDAD PARA AMBIENTES EN LA NUBE
 
[2021 Somos Summit] - Rethinking Identity Access Management and The Rise of t...
[2021 Somos Summit] - Rethinking Identity Access Management and The Rise of t...[2021 Somos Summit] - Rethinking Identity Access Management and The Rise of t...
[2021 Somos Summit] - Rethinking Identity Access Management and The Rise of t...
 
[DOST] OpenStack & the Enterprise Hybrid Cloud - Tech, People, Processes
[DOST] OpenStack & the Enterprise Hybrid Cloud - Tech, People, Processes[DOST] OpenStack & the Enterprise Hybrid Cloud - Tech, People, Processes
[DOST] OpenStack & the Enterprise Hybrid Cloud - Tech, People, Processes
 
Anthos Security: modernize your security posture for cloud native applications
Anthos Security: modernize your security posture for cloud native applicationsAnthos Security: modernize your security posture for cloud native applications
Anthos Security: modernize your security posture for cloud native applications
 
Kubernetes fingerprinting with Prometheus.pdf
Kubernetes fingerprinting with Prometheus.pdfKubernetes fingerprinting with Prometheus.pdf
Kubernetes fingerprinting with Prometheus.pdf
 
Iot 1906 - approaches for building applications with the IBM IoT cloud
Iot 1906 - approaches for building applications with the IBM IoT cloudIot 1906 - approaches for building applications with the IBM IoT cloud
Iot 1906 - approaches for building applications with the IBM IoT cloud
 
Introduction to Serverless through Architectural Patterns
Introduction to Serverless through Architectural PatternsIntroduction to Serverless through Architectural Patterns
Introduction to Serverless through Architectural Patterns
 
Oracle Open World 2018 - Cloud Lift Accelerator Suite
Oracle Open World 2018 - Cloud Lift Accelerator SuiteOracle Open World 2018 - Cloud Lift Accelerator Suite
Oracle Open World 2018 - Cloud Lift Accelerator Suite
 
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud ThreatsBeyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
Beyond S3 Buckets - Effective Countermeasures for Emerging Cloud Threats
 
Internet of things basics
Internet of things basicsInternet of things basics
Internet of things basics
 

Kürzlich hochgeladen

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

AWS Cryptojack Incident Timeline and Prevention

  • 1. Anatomy of an AWS Account Cryptojack DevOpsDays Boston 2018 Presented by Anton Gurov 9/24/18
  • 3. 3 © 2018 CLOUDHEALTH® TECHNOLOGIES INC. About me Anton Gurov • Director of TechOps @ CloudHealth Technologies - Security - Compliance - Operations • Experience in PCI-DSS/SOC2/GDPR compliance - Private/Hybrid/Cloud • Mobile payments • Ad tech • Cloud management • 3 successful exits • Avid car racer, juggler and acro-base! • Contact: www.linkedin.com/in/antongurov
  • 4. 4 © 2018 CLOUDHEALTH® TECHNOLOGIES INC. Cryptojack summary • Cryptojack - compute resource take-over for the purposes of crypto- mining operations • Browsers • Endpoints/Home routers • Compute resources - physical/cloud • Tesla/Aviva/Gemalto - 2018 - Open Kubernetes clusters - Leaked AWS creds - Many more go unreported • Could be worse! - CodeSpaces - 2014 • Ransom • Company murdered “Money Doesn’t Grow on Trees, but it’s Growing in the Cloud” - RedLock CSI Team
  • 6. 6 © 2018 CLOUDHEALTH® TECHNOLOGIES INC. Cryptojack incident Incident info ● Support email from CloudHealth Tech customer requesting assistance ● 200 c4.8xlarge instances in AWS account - multiple regions ○ 100% CPU utilization, $12k per day in EC2 compute $ ● No CloudTrail. No audit logs. ● Innocent user framed!
  • 7. 7 © 2018 CLOUDHEALTH® TECHNOLOGIES INC. Cryptojack incident Incident handling and response ● AWS Support ○ Account cleanup ○ CloudTrail enabled ○ AWS refund (case dependent) ● CloudHealth ○ Forensics ○ Developed timeline ○ Configured customer CHT security module reporting and best practices
  • 9. 9 © 2018 CLOUDHEALTH® TECHNOLOGIES INC. Cryptojack incident Timeline • 3/14 10:30 UTC A series of public AMIs like ami-6dbd137b created and shared globally across all regions • 3/21 14:43 UTC Customer admin user Access Key 1 Rotated • 3/21 14:44 UTC Framed user console pwd and admin perms set • 3/21 14:45 UTC Instances/VPCs/SGs started getting created • 3/21 14:52 UTC Customer admin user Access Key 1 Last Used - IAM Service • 3/21 14:54 UTC 200 c3.8xlarge Windows instances discovered in customer account by CHT platform • 3/22 Cost spike discovered in CloudHealth app by customer }Less than 10 minutes Pre-stage}
  • 10. 10 © 2018 CLOUDHEALTH® TECHNOLOGIES INC. Cryptojack incident Timeline summary ● Most useful data came from AWS Credentials Report ○ generate-credential-report ● Compromised AWS Key rotated immediately by an attacker ● Highly automated ○ Pre-baked AMIs ○ SGs/VPCs/EC2 templated ● Limited to 200 machines ○ AWS default account limits
  • 12. 12 © 2018 CLOUDHEALTH® TECHNOLOGIES INC. Cryptojack incident Protection ● Secure AWS root account ○ Physical MFA - $13 ○ Disable API ● Users/Operators ○ Enable and force MFA for all operations (Console/API) ■ AWS Tutorial: Enable Your Users to Configure Their Own Credentials and MFA Settings ● https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_users-self-manage-mfa-and-creds.html ■ CLI wrapper for MFA - aws-vault ● https://github.com/99designs/aws-vault ○ Use Idp federation (SAML/SSO) ■ Google, OKTA, Ping Identity, OneLogin, etc ○ No direct permissions to users, use IAM AssumeRole
  • 13. 13 © 2018 CLOUDHEALTH® TECHNOLOGIES INC. Cryptojack incident Protection - cont. ● Application/Service accounts ○ Say “bye-bye” to AWS Key/Secret keys ■ IAM roles and instance profiles ■ Enable IP whitelisting in IAM policies ○ Limit application and service permissions ■ No blanket *:* ○ Scan your code for AWS keys before they do ■ GitGuardian, keynuker, gitsecrets ● General ○ Keep existing EC2 limits unless required ○ AWS CIS Benchmark ■ ThreatStack, CloudHealth, others ○ Enable CloudTrail and AWS Config!
  • 14. 14 © 2018 CLOUDHEALTH® TECHNOLOGIES INC. Cryptojack incident Detection ● Watch and alert on AWS costs projections ○ Create a Billing Alarm to Monitor Your Estimated AWS Charges ■ https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html ○ CloudHealth - % change from baseline ● CloudTrail monitoring ○ Setup ■ All regions ■ Forward to central secure AWS account ○ Real-time monitoring and alerting ■ ThreatStack, SumoLogic, Splunk, etc ■ Look and flag API credentials changes ● Misc ○ AMI Provenance and VPC Flow Logs
  • 16. 16 © 2018 CLOUDHEALTH® TECHNOLOGIES INC. Key Takeaways ● Enforce MFA on user and root accounts ● Use IAM Roles, ban Key/Secret Keys ● Enable CloudTrail/Config monitoring and Cost alerting