Slide 1

Slide 1 text

Bad API, hAPI hackers! By Jasmin Landry @JR0ch17

Slide 2

Slide 2 text

$ whoami

Slide 3

Slide 3 text

$ crontab

Slide 4

Slide 4 text

Methodology Where do I start? Create your own methodology 1. Recon 2. Look for “technical” bugs (RCE, SQLi, XXE, XSS, etc) 3. Look for “logical” bugs (IDOR, Priv Esc, Info Leak, etc) Important to follow so you test everything possible

Slide 5

Slide 5 text

$ cat black_box.txt

Slide 6

Slide 6 text

$ cat white_box.txt

Slide 7

Slide 7 text

$ cat info_gathering. txt

Slide 8

Slide 8 text

$ cat info_gathering. txt | more Scanning with Burp often generates error messages 1. Send the request to Intruder 2. Add positions to scan 3. Right click 4. Select Scan defined insertion points

Slide 9

Slide 9 text

$ cat technical_bugs. txt | grep RCE RCE can sometimes be achieved with: • SSTI • File upload? ({“fileName”:”test.png”, “fileContent” :”data:image/png;base64,…”) can also lead to XXE or Stored XSS

Slide 10

Slide 10 text

$ cat technical_bugs. txt | grep XXE Some more file uploads … XXE J

Slide 11

Slide 11 text

$ cat technical_bugs. txt | grep SQLi

Slide 12

Slide 12 text

$ cat technical_bugs. txt | grep SQLi | more CVE-2014-6577

Slide 13

Slide 13 text

$ cat logical_bugs.txt | grep IDOR

Slide 14

Slide 14 text

$ cat logical_bugs.txt | grep IDOR | more GET /api/something/name/somethingelse/customer/profile/:anotherid?profileT ype=Something HTTP/1.1

Slide 15

Slide 15 text

$ cat logical_bugs.txt | grep ”Priv Esc”

Slide 16

Slide 16 text

$ cat logical_bugs.txt | grep ”Priv Esc” 1. Identified an interesting endpoint that was documented in a .js file 2. No Authorization header was needed 3. Created the request 4. Win!

Slide 17

Slide 17 text

$ cat bug_chains.txt IDOR #1 Info Leak #1 Able to view other users’ email address IDOR #2 Info Leak #2 Using the email leaked in Info leak #1, I could get the profile’s UUID. GET GET IDOR #3 PUT Using the UUID leaked in Info Leak #2, I could change the profile’s email address Password Reset • Text Message to phone number L • Send email verification link (boring) • Answer security question ATO POST

Slide 18

Slide 18 text

$ cat bug_chains.txt | more ID from IDOR #1

Slide 19

Slide 19 text

$ cat thank_you.txt @JR0ch17