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
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
茨城の思い出を振り返る ~CDKのセキュリティを添えて~ / 20260201 Mitsutoshi Matsuo
shift_evolve
PRO
1
540
コンテナセキュリティの最新事情 ~ 2026年版 ~
kyohmizu
7
2.8k
旅先で iPad + Neovim で iOS 開発・執筆した話
zozotech
PRO
0
120
GitHub Copilot CLI を使いやすくしよう
tsubakimoto_s
0
140
Context Engineeringの取り組み
nutslove
0
430
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
12
5.7k
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
740
量子クラウドサービスの裏側 〜Deep Dive into OQTOPUS〜
oqtopus
0
210
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
220
Webhook best practices for rock solid and resilient deployments
glaforge
2
330
今こそ学びたいKubernetesネットワーク ~CNIが繋ぐNWとプラットフォームの「フラッと」な対話
logica0419
7
650
Agent Skils
dip_tech
PRO
0
160
Featured
See All Featured
For a Future-Friendly Web
brad_frost
182
10k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Skip the Path - Find Your Career Trail
mkilby
0
64
Between Models and Reality
mayunak
1
200
Designing for Performance
lara
611
70k
What does AI have to do with Human Rights?
axbom
PRO
0
2k
Code Reviewing Like a Champion
maltzj
527
40k
First, design no harm
axbom
PRO
2
1.1k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
120
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
650
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
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