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
andresriancho
September 25, 2020
Technology
0
620
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
620
Timing Attacks
andresriancho
1
360
Other Decks in Technology
See All in Technology
"人"が頑張るAI駆動開発
yokomachi
1
630
Identity Management for Agentic AI 解説
fujie
0
500
普段使ってるClaude Skillsの紹介(by Notebooklm)
zerebom
8
2.4k
BidiAgent と Nova 2 Sonic から考える音声 AI について
yama3133
2
110
SQLだけでマイグレーションしたい!
makki_d
0
1.2k
Connection-based OAuthから学ぶOAuth for AI Agents
flatt_security
0
400
日本Rubyの会: これまでとこれから
snoozer05
PRO
6
250
20251203_AIxIoTビジネス共創ラボ_第4回勉強会_BP山崎.pdf
iotcomjpadmin
0
140
AWSインフルエンサーへの道 / load of AWS Influencer
whisaiyo
0
230
松尾研LLM講座2025 応用編Day3「軽量化」 講義資料
aratako
12
4.5k
業務の煩悩を祓うAI活用術108選 / AI 108 Usages
smartbank
9
15k
アラフォーおじさん、はじめてre:Inventに行く / A 40-Something Guy’s First re:Invent Adventure
kaminashi
0
170
Featured
See All Featured
SEO for Brand Visibility & Recognition
aleyda
0
4.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
0
46
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
2.8k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
130
Navigating Weather and Climate Data
rabernat
0
55
Done Done
chrislema
186
16k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.2k
Building an army of robots
kneath
306
46k
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