API testing

Field Detail
Summary Enumerate and test REST/GraphQL APIs (BOLA/BFLA, mass assignment)
Category API security testing
Phase enumeration, web-testing, exploitation
Interface CLI + GUI
Platform Linux, Windows, macOS
Licence Open source (Postman freemium)
Docs https://owasp.org/API-Security/ / https://github.com/assetnote/kiterunner
Related Burp Suite, ffuf and Gobuster, jwt_tool, Nuclei

Modern apps are API-first (REST/GraphQL), and the bugs cluster around authorisation, not injection. The reference is the OWASP API Security Top 10 — above all BOLA/IDOR (Broken Object Level Authorization): can you read/change object #124 when you're user #123?

⚠️ Warning — Scope Enumerating and fuzzing APIs is active and can mutate data (POST/PUT/DELETE). Authorised targets only; be careful with write/delete methods against anything shared.

Discover the API

# Content discovery with API-focused wordlists
ffuf -w /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt \
     -u https://target.com/FUZZ          # see ffuf sheet

# kiterunner — API-aware brute (understands routes + methods, not just dirs)
kr scan https://target.com -w routes-large.kite
kr brute https://target.com -w /usr/share/seclists/Discovery/Web-Content/api/
kr scan https://target.com -A=apiroutes-220828   # bundled assetnote wordlist

Look for /api, /v1,/v2, /graphql, /swagger.json, /openapi.json, /api-docs, .well-known/. A findable Swagger/OpenAPI spec hands you every endpoint and parameter — import it straight into Postman or Burp.

Parameter discovery — Arjun

arjun -u https://target.com/api/user         # find hidden GET params
arjun -u https://target.com/api/user -m POST # POST params (JSON/form)
arjun -u https://target.com/api/user -m JSON -oT out.txt

Postman — drive and script the API

  • Import the OpenAPI/Swagger spec → full collection of requests appears.
  • Environments/variables for base URL, tokens; Authorization tab for Bearer/OAuth.
  • Collection Runner + test scripts to iterate IDs (BOLA testing at scale).
  • Export any request as curl, or proxy Postman through Burp Suite (set proxy to 127.0.0.1:8080) to capture everything.
  • Newman (newman run collection.json) for CLI/CI runs.

Testing the OWASP API Top 10 (what to actually try)

Risk Test
BOLA/IDOR (API1) Swap object IDs/UUIDs; access another user's object with your token
Broken auth (API2) Missing/weak token checks, JWT flaws → jwt_tool
BOPLA / mass assignment (API3) Add fields ("isAdmin":true, "role":"admin") to requests
Unrestricted resource use (API4) No rate limiting / pagination abuse
BFLA (API5) Call admin endpoints/methods as a low-priv user (try PUT/DELETE)
SSRF (API7) URL params the server fetches → internal/metadata access
Improper inventory (API9) Old /v1 beside /v2, staging/debug endpoints

Practical moves:

# Method tampering — does GET-protected logic allow other verbs?
curl -X PUT https://target/api/users/124 -H "Authorization: Bearer <tok>" -d '{"role":"admin"}'
# Mass assignment
# add "is_admin": true to a profile-update JSON body
# BOLA
# your token + someone else's object id -> should 403, often 200

GraphQL

# Is introspection open? (dumps the whole schema)
graphw00f -d -f -t https://target.com/graphql      # fingerprint engine
# Introspection query -> full schema
curl -s https://target/graphql -H 'Content-Type: application/json' \
  -d '{"query":"{__schema{types{name fields{name}}}}"}'
  • InQL (Burp extension) / GraphQL Voyager — visualise the schema.
  • Watch for: introspection enabled in prod, batching/alias abuse (brute force in one request), nested-query DoS, missing per-resolver authorisation (BOLA at field level).

More flags & techniques

# kiterunner (route-aware brute)
kr scan https://t -w routes-large.kite -x 20 -j 100          # depth / concurrency
kr brute https://t -A=apiroutes-220828
# Arjun parameter discovery
arjun -u https://t/api -m GET,POST,JSON -oT params.txt -t 10 --stable
# ffuf for IDOR/BOLA sweeps over numeric object IDs
ffuf -w 1-5000:ID -u https://t/api/users/ID -H "Authorization: Bearer $T" -mc 200 -fr '"error"'
# GraphQL — fingerprint + introspection dump
graphw00f -d -f -t https://t/graphql
curl -s https://t/graphql -H 'Content-Type: application/json' \
  -d '{"query":"query{__schema{types{name fields{name}}}}"}' | jq .
# Postman collection in CI
newman run collection.json -e env.json --reporters cli,json

Test matrix (OWASP API Top 10): BOLA/IDOR (swap object IDs), BFLA (admin verbs/endpoints as low-priv), mass assignment ("role":"admin"), method tampering (GET→PUT/DELETE), excessive data exposure (unfiltered fields), SSRF (server-fetched URL params), old versions (/v1 beside /v2).

Kill-chain usage

Enumeration

kr scan https://t -w routes-large.kite        # discover API routes

Web testing

arjun -u https://t/api -m GET,POST,JSON        # find hidden parameters

Exploitation

curl -H "Authorization: Bearer $T" https://t/api/users/124   # BOLA: another user's object

Where it fits

A layer on top of web testing. Discover endpoints (kiterunner/ffuf and Gobuster/Swagger), find params (Arjun), then exercise everything through Burp Suite/Postman hunting authorisation flaws. Nuclei catches known API-tech CVEs; jwt_tool handles the tokens that guard it. The backend behind a mobile app is tested exactly the same way once pinning is bypassed.