Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Walkthrough of a compromised AWS Account-InfraC...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ashish
November 08, 2016
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Walkthrough of a compromised AWS Account-InfraCoder-MeetupNov2016
Ashish
November 08, 2016
More Decks by Ashish
See All by Ashish
Traditional Security is Dead! - NYC-Sep2018
hashishrajan
0
53
Automated Detection and Remediation in AWS
hashishrajan
0
79
Long living creds in Cloud?
hashishrajan
0
69
DevSecOps Meetup - Security Challenges in DevOps - Wynand Viljoen
hashishrajan
0
200
GuardDuty - the non AWS version - Feb2018
hashishrajan
0
98
Security in the world of Cloud and Chaos Engineering
hashishrajan
0
77
Convincing security to let you deploy in AWS
hashishrajan
0
85
Walkthrough of a compromised AWS Account - AWS Meetup Nov2016
hashishrajan
0
110
Featured
See All Featured
Exploring anti-patterns in Rails
aemeredith
3
420
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
240
Abbi's Birthday
coloredviolet
2
8.2k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
210
Fireside Chat
paigeccino
42
4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
140
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
390
Code Review Best Practice
trishagee
74
20k
Transcript
WALKTHROUGH OF A COMPROMISED AWS ACCOUNT InfraCoders Meetup 8 Nov,
2016
None
AGENDA • AWS Primer • How would someone get keys
to an AWS Account • What I do next • What can you do next
AWS PRIMER
AWS PRIMER Infrastructure as a Service (IaaS) Ø Root Account
vs IAM Users vs IAM Roles Ø Key Pairs vs Access Keys Ø VPC vs EC2 Ø CloudTrail vs CloudWatch Ø KMS Ø S3 Buckets Ø Route53
None
AWS SECURITY • AWS Security Services • AWS Shared Security
Model • AWS Resources • aws.amazon.com/security • AWS Whitepapers
Image Courtesy: AWS
HOW WOULD SOMEONE GETS KEYS TO AN AWS ACCOUNT
NOT SO LEGITIMATE WAY • GitHub • Reddit • AWS
Forum • Tech Forums
LEGITIMATE WAY • Security Review of AWS Accounts for compliance
checks • Client site during projects • New AWS Account - 12month free tier
WHAT I DO NEXT
ATTACK VECTORS • AWS Console + IAM User • AWS
Cli + Access Keys • SSH Keys + EC2 Instances Metadata Endpoint (Access Keys) • Snaphots + EC2 Instances
AWS CLI + ACCESS KEYS
WHAT DO WE HAVE Ø aws sts get-caller-identity Ø aws
sts get-session-token --duration-seconds 129600
None
AWS CLOUDTRAIL:* Stop Footprint collection!! Ø aws cloudtrail describe-trails Ø
aws cloudtrail stop-logging --name default Ø aws cloudtrail update-trail --name default --no-is-multi-region-trail -- no-include-global-service-events Note: S3 Bucket Name
AWS IAM:* What kind of account do I have? •
aws iam get-account-summary • aws iam list-users | jq • aws iam get-credential-report | jq -r '.Content' | base64 --decode > output.csv • aws sts get-session-token --duration-seconds 129600 • aws iam list-roles | jq '.Roles[] .RoleName'
AWS ROUTE53:* • aws route53 list-hosted-zones | jq • aws
route53 list-resource-record-sets --hosted-zone-id /hostedzone/ABCD | jq '.ResourceRecordSets[] | .Name' • Google search keyword: site:sitename.com.au
• aws configservice get-status • aws configservice describe-configuration-recorder-status • aws
configservice start-configuration-recorder --configuration-recorder-name defaultrecorder AWS CONFIGSERVICE:*
AWS EC2:* • EC2 Instances aws ec2 describe-instances | jq
'.Reservations[] .Instances[] .PublicIpAddress' • Elastic IPs: aws ec2 describe-addresses|jq '.Addresses[] .PublicIp' • Security Groups: aws ec2 describe-security-groups | jq '.SecurityGroups[] .GroupName' • Key Pair • Route Tables: aws ec2 describe-route-tables | jq '.RouteTables[] .Routes' • VPC Endpoints: aws ec2 describe-vpc-endpoints • VPC Peering • Volume • Security Groups
AWS S3:* • Source code • Paid software • Startup
Script • CloudTrail • Website Code
WHAT CAN YOU DO NEXT
None
THERE IS HOPE • Raise Awareness • CloudTrail Logging to
SIEM Software • Rotate AWS Access Keys • RBAC – • Deny All • Allow only actions that are required. • Create 3rd party Group or IAM Roles for contractors or employees • Event Driven Security - AWS Lambda - Next talk :)
ASSUMPTIONS • The Root account was not compromised • The
account had Modify access to the mentioned AWS services • No Federation URL was available • No Switch Role URL was available
~FIN~ You can talk nerdy to me: • @hashishrajan •
https://au.linkedin.com/in/ashishrajan