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
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
AIを共同作業者にして書籍を執筆する方法 / How to Write a Book with AI as a Co-Creator
ama_ch
2
120
非エンジニア職からZOZOへ 〜登壇がキャリアに与えた影響〜
penpeen
0
490
DIPS2.0データに基づく森林管理における無人航空機の利用状況
naokimuroki
1
220
JEDAI in Osaka 2026イントロ
taka_aki
0
230
システムは「動く」だけでは 足りない - 非機能要件・分散システム・トレードオフの基礎
nwiizo
29
9.3k
Claude Code を安全に使おう勉強会 / Claude Code Security Basics
masahirokawahara
0
280
AIエージェントを構築して感じた、AI時代のCDKとの向き合い方
smt7174
1
250
CloudSec JP #005 後締め ~ソフトウェアサプライチェーン攻撃から開発者のシークレットを守る~
lhazy
0
220
DevOpsDays Tokyo 2026 軽量な仕様書と新たなDORA AI ケイパビリティで実現する、動くソフトウェアを中心とした開発ライフサイクル / DevOpsDays Tokyo 2026
n11sh1
0
140
MLOps導入のための組織作りの第一歩
akasan
0
290
Code Interpreter で、AIに安全に コードを書かせる。
yokomachi
0
6.7k
[最強DB講義]推薦システム | 基礎編
recsyslab
PRO
1
140
Featured
See All Featured
Scaling GitHub
holman
464
140k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.8k
Chasing Engaging Ingredients in Design
codingconduct
0
170
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
260
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
Google's AI Overviews - The New Search
badams
0
970
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
190
Measuring & Analyzing Core Web Vitals
bluesmoon
9
810
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
420
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
We Are The Robots
honzajavorek
0
210
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