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
Step by step AWS Cloud Hacking
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
andresriancho
September 25, 2020
Technology
0
630
Step by step AWS Cloud Hacking
andresriancho
September 25, 2020
Tweet
Share
More Decks by andresriancho
See All by andresriancho
Step by step AWS Cloud Hacking
andresriancho
2
2.9k
Internet-Scale analysis of AWS Cognito Security
andresriancho
1
12k
Threat Modelling
andresriancho
0
1.5k
Automated Security Analysis AWS Clouds
andresriancho
1
3.3k
Injecting into URLs / Breaking URL-Encoding
andresriancho
0
260
Galería de Fallos en Unicornios
andresriancho
1
250
Esoteric Web Application Vulnerabilities
andresriancho
0
1.1k
String Compare Timing Attacks
andresriancho
0
630
Timing Attacks
andresriancho
1
400
Other Decks in Technology
See All in Technology
Why Organizations Fail: ノーベル経済学賞「国家はなぜ衰退するのか」から考えるアジャイル組織論
kawaguti
PRO
1
200
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
410
ClickHouseはどのように大規模データを活用したAIエージェントを全社展開しているのか
mikimatsumoto
0
270
AI駆動開発を事業のコアに置く
tasukuonizawa
1
370
Webhook best practices for rock solid and resilient deployments
glaforge
2
310
1,000 にも届く AWS Organizations 組織のポリシー運用をちゃんとしたい、という話
kazzpapa3
0
180
Cosmos World Foundation Model Platform for Physical AI
takmin
0
970
配列に見る bash と zsh の違い
kazzpapa3
3
170
Exadata Fleet Update
oracle4engineer
PRO
0
1.1k
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
420
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
93k
Claude Code for NOT Programming
kawaguti
PRO
1
100
Featured
See All Featured
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
The Invisible Side of Design
smashingmag
302
51k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
120
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
Build your cross-platform service in a week with App Engine
jlugia
234
18k
It's Worth the Effort
3n
188
29k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
250
AI: The stuff that nobody shows you
jnunemaker
PRO
2
270
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
We Are The Robots
honzajavorek
0
170
The Limits of Empathy - UXLibs8
cassininazir
1
220
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
440
Transcript
Ekoparty 2020 Andrés Riancho
2
3
None
5
need credentials • • • 6
7
IAM permissions 8
9 http://169.254.169.254/ /latest/meta-data/iam/security-credentials/ /latest/meta-data/iam/security-credentials/{role-name}
10
11 from urllib.request import urlopen from flask import request @app.route('/ssrf')
def handler(): url = request.args.get('url') return urlopen(url).read()
Instance metadata and S3 compromise
13
None
two ways to enumerate permissions IAM service In most cases
this will fail brute-force 15
Get* / List* / Describe* DryRun parameter 16
17 SUPPORTED_SERVICES = [ 'ec2', 's3' ]
18
./enumerate-iam.py
20
many things the attacker doesn't know. 21 { "Statement":[ {
"Effect":"Allow", "Action":[ "s3:*", "lambda:*", "..." ], "Resource":"*" } ] }
try to elevate privileges to a principal with full access
22 { "Statement":[ { "Effect":"Allow", "Action":[ "*", ], "Resource": "*" } ] }
Lambda function will have access to the IAM role 23
Getting * on *
None
existing trust policy in the AdminRole 26
27
28 { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::925877178748:root" }, "Action":
"sts:AssumeRole" } { "Effect": "Allow", "Principal": { "AWS": ["arn:aws:iam::925877178748:root", "arn:aws:iam::320222540496:root"] }, "Action": "sts:AssumeRole" }
Never trust the trust policy
30 ARN for the backdoored role
None
32 most resources in the AWS account VPC is completely
isolated from the Internet
None
34 VPN between the attacker's workstation and a VPC
35
vpc-vpn-pivot
None
From zero to full pwn
None
40 • enumerate-iam • pacu • vpc-vpn-pivot Follow @AndresRiancho
None