SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Similaire à Anatomy of an AWS account Cryptojack

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
 

Similaire à Anatomy of an AWS account Cryptojack (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
 

Dernier

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 

Dernier (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

Anatomy of an AWS account Cryptojack

  • 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