Most modern applications are an API with a thin user interface on top. The website, the mobile app and partner integrations all call the same endpoints, and those endpoints are where the data and the business logic live. That makes APIs the most valuable target in a modern VAPT, and the place where some of the most serious findings come from. This track follows the OWASP API Security Top 10 (2023).
Why APIs need their own testing approach
Everything from the web track still applies, but APIs change the picture:
- No UI to guide you. You can't see an endpoint you don't know exists, so discovery matters more.
- The client does less checking. Validation and access control must happen on the server, because anyone can call the API directly.
- IDs are everywhere.
/api/users/42/orders/1001: every path segment is a chance for a broken authorisation check. - More endpoints, more versions.
/v1often stays online long after/v2replaces it, without the newer protections. - Machine-readable responses. APIs tend to return whole objects, often including fields the UI never shows.
API styles you'll meet
REST
The most common style. Resources are URLs and HTTP methods are actions:
| Request | Meaning |
|---|---|
GET /api/v2/orders |
List my orders |
GET /api/v2/orders/1001 |
Read order 1001 |
POST /api/v2/orders |
Create an order |
PATCH /api/v2/orders/1001 |
Update part of order 1001 |
DELETE /api/v2/orders/1001 |
Delete order 1001 |
Requests and responses are usually JSON:
{ "id": 1001, "status": "shipped", "total": 49.90, "customerId": 42 }GraphQL
A single endpoint (often /graphql) where the client sends a query describing exactly the data it wants. Powerful for developers, and a different set of risks for testers. Lesson 4 covers it in depth.
Others
- SOAP: older XML-based web services, common in banking and enterprise systems. Watch for XML-specific issues such as XXE.
- gRPC: fast binary protocol used between microservices and in some mobile apps.
- WebSockets: long-lived, two-way connections for real-time features.
How APIs authenticate
You'll meet several methods, often in the same application:
- Session cookies, shared with the website.
- Bearer tokens in the
Authorizationheader, frequently JWTs. - API keys, in a header like
X-API-Keyor, worse, in the URL. - OAuth 2.0 access tokens for third-party and mobile access.
- Mutual TLS for service-to-service calls.
Lesson 3 covers how each of these breaks.
Finding the attack surface
Documentation
Look for machine-readable specifications. They describe every endpoint, parameter and data type:
- OpenAPI/Swagger:
/swagger.json,/openapi.json,/v3/api-docs,/swagger-ui/,/api-docs. - GraphQL introspection on
/graphql. - WSDL files for SOAP services (
?wsdl). - Public developer portals and Postman collections published by the company.
Client code
- Web front ends: search JavaScript bundles for
/api/,fetch(,axiosand base URLs. - Mobile apps: decompiled Android apps often contain every endpoint the app uses, plus hostnames for staging environments. The mobile track covers this.
Traffic
Browse and use every feature of the web and mobile apps through Burp. Every request becomes an entry in your inventory.
Guessing, carefully
When documentation is missing, wordlist-based discovery finds common API routes:
# Lab only: discover API routes on a local target, rate-limited
ffuf -u http://127.0.0.1:8888/api/FUZZ -w /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt -mc 200,201,204,301,401,403,405 -rate 30A 401 or 403 means the route exists, which is useful information. A 405 Method Not Allowed means the route exists but wants a different method. Tools like Arjun discover hidden parameters on endpoints you already know.
Your API testing setup
- Postman (or Insomnia, or Bruno) to organise and send requests. Import the OpenAPI file to get a ready-made collection of every endpoint.
- Burp Suite as Postman's proxy (Settings → Proxy →
127.0.0.1:8080), so every request is recorded and can be sent to Repeater. - Environment variables in Postman for the base URL and one token per test account, so switching users is one click.
The API inventory (API9: improper inventory management)
Build an inventory the same way you did for web apps, with API-specific columns:
| Endpoint | Method | Version | Auth | Object IDs | Documented? |
|---|---|---|---|---|---|
/api/v2/users/{id} |
GET | v2 | Bearer | user id | Yes |
/api/v1/users/{id} |
GET | v1 | Bearer | user id | No, still live |
/api/v2/admin/reports |
GET | v2 | Bearer (admin) | none | Yes |
/internal/health |
GET | n/a | None | none | No |
Old versions and undocumented endpoints are findings in their own right (API9), and they're often where the other vulnerabilities hide.
Lab: set up your API targets
Add intentionally vulnerable APIs to your lab:
- crAPI (OWASP "completely ridiculous API"): a realistic vehicle-services app full of API Top 10 issues. It runs with Docker Compose from the official OWASP repository.
- VAmPI: a small, deliberately vulnerable REST API, quick to start with Docker.
Then:
- Start crAPI, bind it to localhost only, and create two user accounts.
- Proxy your browser and Postman through Burp, use every crAPI feature, and review the API calls in Burp's history.
- Find crAPI's API documentation or reconstruct it from traffic. Import or build a Postman collection.
- Start an inventory table with at least ten endpoints. Mark any that include object IDs.
Checkpoint
- Give three reasons APIs need a different testing approach from web front ends.
- Where would you look for an OpenAPI specification?
- What does a
401response tell you during endpoint discovery? - Why are old API versions a risk, and which API Top 10 item covers them?