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.4k
Automated Security Analysis AWS Clouds
andresriancho
1
3.3k
Injecting into URLs / Breaking URL-Encoding
andresriancho
0
250
Galería de Fallos en Unicornios
andresriancho
1
240
Esoteric Web Application Vulnerabilities
andresriancho
0
1.1k
String Compare Timing Attacks
andresriancho
0
590
Timing Attacks
andresriancho
1
340
Other Decks in Technology
See All in Technology
知覚とデザイン
rinchoku
1
640
新米エンジニアをTech Leadに任命する ー 成長を支える挑戦的な人と組織のマネジメント
naopr
1
170
コンパウンド組織のCRE #cre_meetup
layerx
PRO
1
290
Oracle Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
0
390
書籍『実践 Apache Iceberg』の歩き方
ishikawa_satoru
0
280
OPENLOGI Company Profile for engineer
hr01
1
46k
AIがコードを書いてくれるなら、新米エンジニアは何をする? / komekaigi2025
nkzn
12
6.9k
進化する大規模言語モデル評価: Swallowプロジェクトにおける実践と知見
chokkan
PRO
1
220
251029 JAWS-UG AI/ML 退屈なことはQDevにやらせよう
otakensh
0
100
ラスベガスの歩き方 2025年版(re:Invent 事前勉強会)
junjikoide
0
590
マルチエージェントのチームビルディング_2025-10-25
shinoyamada
0
220
AI駆動で進める依存ライブラリ更新 ─ Vue プロジェクトの品質向上と開発スピード改善の実践録
sayn0
1
340
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Documentation Writing (for coders)
carmenintech
75
5.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Building an army of robots
kneath
306
46k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
GitHub's CSS Performance
jonrohan
1032
470k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
How to train your dragon (web standard)
notwaldorf
97
6.3k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6k
Site-Speed That Sticks
csswizardry
13
930
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
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