- REST API
- GraphQL
- SOAP
- XML-RPC
- JSON-RPC
- gRPC-Protobuf
- Identify
grpc
- Accept request header
- Content-Type request header
- Access-control-expose-headers in the response header
- Identify
- https://smartbear.com/blog/soap-vs-rest-whats-the-difference/
- https://www.howtographql.com/basics/1-graphql-is-the-better-rest/
- https://www.smashingmagazine.com/2016/09/understanding-rest-and-rpc-for-http-apis/
- https://www.soapui.org/docs/rest-testing/working-with-rest-services/
- https://cloud.google.com/blog/products/api-management/understanding-grpc-openapi-and-rest-and-when-to-use-them
- /application.wadl
- /application.wadl?detail=true
- /api/application.wadl
- ?wsdl or ?singleWsdl
- site:target.tld intitle:api | developer
- REST
- GraphQL
- SOAP
- XML-RPC
- JSON-RPC
- gRPC-Protobuf
- /api/v1
- /api/v2
- /api/v3
- site:target.tld inurl:api
- intitle:"index of" "api.yaml" site:target.tld
- intitle:"index of" intext:"apikey.txt" site:target.tld
- allintext:"API_SECRET*" ext:env | ext:yml site:target.tld
- https://github.com/danielmiessler/SecLists/blob/master/Discovery/Web-Content/api/api_endpoints.txt
- https://s3.amazonaws.com/assetnote-wordlists/data/automated/httparchive_apiroutes_2020_11_20.txt
ffuf -w wordlists/WORDLIST -u https://TARGET.TLD/FUZZ
- https://github.com/ffuf/ffuf
amass enum -active -d TARGET.TLD -config /root/amass/config.ini
- https://github.com/OWASP/Amass
nuclei -target TARGET.TLD -t exposures/apis/
- https://github.com/projectdiscovery/nuclei
jaeles scan -s /jaeles-signatures/sensitive/swagger-ui-probing.yaml -u TARGET.TLD
- https://github.com/jaeles-project/jaeles
arjun -u https://api.TARGET.TLD/endpoint
- https://github.com/s0md3v/Arjun
python3 paramspider.py --domain TARGET.TLD
- https://github.com/devanshbatham/ParamSpider
tntfuzzer --url https://TARGET.TLD/v2/swagger.json --iterations 100 --log_all
- https://github.com/Teebytes/TnT-Fuzzer
- Play with request URL
- Requested resource extension e.g. replacing
.json
by.xml
- Query string e.g. replacing
?json
by?xml
or?format=json
by?format=xml
- Requested resource extension e.g. replacing
- Play with
Content-Type
request header and payload- Without
Content-Type
, submit eitherjson
,xml
, ... - Changing
Content-Type
and payload accordingly
- Without
- Sequential
- Encoded
- Other
- Next value
- Previous value
- Data Type
- Is it a number? Change it to a string
- Is it a string? Change it to a number
- Method -> GET to POST
- ?id=1&id=2
- ?id[]=1&id[]=2
- GET /users/id -> GET /users/*
- Identify other deployments (hosts) of your target API
- Enumerate resources IDs (often non- numerical/sequential ones)
- Test those IDs on your target API host
- Passwords
- Tokens
- Login
- Forget Password
- Forget Username
- Changing Password
- Registration
- Plain text
- Weak encryption
- Weak hash algorithm
- Predictable
- Weak hash algorithm
- Test redirect_uri
- Open redirects
- Common issues
?redirect_uri=https://atttacker.com
?redirect_uri=https://ATTACKER.TARGET.TLD
?redirect_uri=https://ALLOWED_HOST.com/callback?redirectUrl=https://attacker.com
?redirect_uri=https://TARGET.TLD.attacker.com
?redirect_uri=https://TARGET.TLD%252eattacker.com
?redirect_uri=https://TARGET.TLD//attacker.com/
- Fuzz
?redirect_uri=https://TARGET.TLD§FUZZ§
?redirect_uri=https://§FUZZ§TARGET.TLD
- Common issues
- XSS
- Open redirects
- Test the existence of response_type=token
- Testing state
- Missing state parameter?
- CSRF
- Generate a valid
authorization_code
and don't use it- Send the crafted CSRF page to TARGET
- Generate a valid
- CSRF
- Predictable state parameter?
- Is state parameter being verified?
- Missing state parameter?
- If you revocate access, will code be also revocated?
- Can a regular user access administrative endpoints? (MindAPI recon can help you here)
- Testing different HTTP methods (GET, POST, PUT, DELETE, PATCH) will allow level escalation?
- Enumerate/Bruteforce endpoints for getting unauthorized requests (MindAPI recon can help you here)
- API documentation (Reconnaissance)
- Inspect available API clients' network traffic
- Desktop
- Mobile
- Web
- Exercise data retrieval endpoints
- watch-out for
?include=user.addresses,user.cards
-like parameters
- watch-out for
- Uncover hidden properties
- Guessing, based on API context
- Reverse engineering available API clients
- Fuzzing
- GraphQL
- Include augmented objects
- One additional property at a time
- Possible combinations of properties
- All enumerated properties at once
- Vary properties data types/values
- Number, String, Array, Object
- State values:
to-do
->in-progress
->done
(keep in mind possible state transitions)
- Test different operation types
- Create
- Update
- Introspection Query and/or GraphiQL is enabled
- GraphQL server provides fields name hints
- Query batching is enabled without limit
- Unlimited Depth and/or Amount
- Check for the API documentation (MindAPI recon can help you here)
- Hosts inventory is missing or outdated.
- Integrated services inventory, either first- or third-party, is missing or outdated.
- Old or previous API versions are running unpatched.