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
640
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
280
Galería de Fallos en Unicornios
andresriancho
1
270
Esoteric Web Application Vulnerabilities
andresriancho
0
1.2k
String Compare Timing Attacks
andresriancho
0
670
Timing Attacks
andresriancho
1
440
Other Decks in Technology
See All in Technology
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
フィジカルAIの知識ゼロの僕でも AIを使えばここまでできた
tatsuya1970
0
180
英語が話せなくてもKubeConスタッフに参加した話
yusuke427
2
1.1k
会計事務所と顧問先の契約関係をOIDC・OAuthで表現する
terara
0
330
dbt と Snowflake と tag
kevinrobot34
1
250
dbt in Microsoft Fabric
ryomaru0825
0
260
アクセスキーが漏れた日にやるべきこと- 無効化の先にある本当の対応
kazzpapa3
0
320
EMの役割で 変わったこと・変わらなかったこと
sansantech
PRO
0
120
電話に出る Python のログの話
shinnosuke_kishida
0
220
IHV like なユースケースへのOpenID Connect 関連仕様の適用事例
optim
0
270
ブラウザで変わるID連携(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
260
Kiro入門|仕様駆動開発で変わるAI時代の開発スタイル
cmkudo
0
380
Featured
See All Featured
Making Projects Easy
brettharned
120
6.7k
So, you think you're a good person
axbom
PRO
2
2.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Writing Fast Ruby
sferik
630
63k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
810
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
500
Git: the NoSQL Database
bkeepers
PRO
432
67k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
We Have a Design System, Now What?
morganepeng
55
8.3k
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