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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
andresriancho
September 25, 2020
Technology
630
0
Share
Step by step AWS Cloud Hacking
andresriancho
September 25, 2020
More Decks by andresriancho
See All by andresriancho
Step by step AWS Cloud Hacking
andresriancho
2
3k
Internet-Scale analysis of AWS Cognito Security
andresriancho
1
13k
Threat Modelling
andresriancho
0
1.6k
Automated Security Analysis AWS Clouds
andresriancho
1
3.4k
Injecting into URLs / Breaking URL-Encoding
andresriancho
0
270
Galería de Fallos en Unicornios
andresriancho
1
260
Esoteric Web Application Vulnerabilities
andresriancho
0
1.2k
String Compare Timing Attacks
andresriancho
0
640
Timing Attacks
andresriancho
1
420
Other Decks in Technology
See All in Technology
DevOpsDays Tokyo 2026 見えない開発現場を、見える投資に変える
rojoudotcom
3
200
え!?初参加で 300冊以上 も頒布!? これは大成功!そのはずなのに わいの財布は 赤字 の件
hellohazime
0
150
DIPS2.0データに基づく森林管理における無人航空機の利用状況
naokimuroki
1
220
みんなで作るAWS Tips 100連発 (FinOps編)
schwrzktz
1
260
[最強DB講義]推薦システム | 基礎編
recsyslab
PRO
1
140
申請待ちゼロへ!AWS × Entra IDで実現した「権限付与」のセルフサービス化
mhrtech
2
330
Revisiting [CLS] and Patch Token Interaction in Vision Transformers
yu4u
0
300
Code Interpreter で、AIに安全に コードを書かせる。
yokomachi
0
6.7k
Do Ruby::Box dream of Modular Monolith?
joker1007
1
270
AWS認定資格は本当に意味があるのか?
nrinetcom
PRO
1
250
MLOps導入のための組織作りの第一歩
akasan
0
290
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
23k
Featured
See All Featured
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
The World Runs on Bad Software
bkeepers
PRO
72
12k
Exploring anti-patterns in Rails
aemeredith
3
320
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
220
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
The untapped power of vector embeddings
frankvandijk
2
1.7k
Balancing Empowerment & Direction
lara
6
1k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Site-Speed That Sticks
csswizardry
13
1.2k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
270
Side Projects
sachag
455
43k
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