Skip to main content

API Security Reference

API attack surface: authentication, authorization, rate limiting, gateway controls, and the protocols that carry them. This category covers the API layer separately from general web application security - the threat model is different (no browser, no session cookies by default, machine clients).

Two-track format: every file has a Pentest track (detection, payloads, exploitation recipes) and an AppSec track (risk context, root causes, preventive and detection controls, verification). See the parent README for the format.

Writeups and references in this category are written in English only. The trilingual scheme (Az/En/Ru) applies to WRITEUPS only.


CAUTION

Authorized use only. All material is provided for educational purposes and authorized testing.
See ../../SECURITY.md for the full policy.

Contents​

#FileFocus
01OWASP API Top 102023 categories, mapping to files
02RESTREST endpoints, IDOR, mass assignment, method tampering
03GraphQLIntrospection, batching, depth attacks, injection
04gRPCProtobuf, reflection, auth, streaming
05WebSocketHandshake auth, CSWSH, message injection
06SOAPWSDL enumeration, XXE, WS-Security
07AuthenticationJWT, OAuth2, API keys, mTLS
08Rate-LimitingBypass techniques, distributed brute force
09API-GatewayKong, APIGW, NGINX, WAF bypass

Relationship to 01 Web​

The 01 Web/ category covers the browser-facing layer: HTML forms, cookies, CSRF, XSS, CMS, servers, frameworks. 03 API/ covers the machine-facing layer: no browser, tokens instead of cookies, JSON/Protobuf instead of HTML.

  • ../web/ - browser-facing web application security.
  • ../mobile/ - mobile client security (Android, iOS).
  • ../../CHEATSHEET.md - general pentest commands.
  • ../../METHODOLOGY.md - engagement workflow.
  • ../../methodology/OSCP-Reporting.md - exam reporting.

Last updated: 2026-10-24. Part of MethodMan. English only by design.

Overlap exists in the underlying primitives (injection, authn, authz) but the detection and exploitation techniques are different enough to warrant a separate track. Cross-references point to 01 Web/ where the primitive is the same.


OSCP Relevance​

For OSCP, the API layer rarely appears as a standalone target. It appears as:

  • A REST endpoint on a web app (IDOR for another user's data).
  • A GraphQL endpoint exposing a mutation that bypasses the UI.
  • A WebSocket connection with no origin check (CSWSH -> admin action).

The exploitation recipes in these files are written to be usable in a lab environment where the target is a live API, not just a theory read.


References​