Skip to content

Latest commit

 

History

History
87 lines (70 loc) · 4.68 KB

methodology.md

File metadata and controls

87 lines (70 loc) · 4.68 KB

Methodology

This toolkit implements a subset of API security testing as a set of small, composable, conservative checks. This document explains the approach, what is and is not covered, and why.

Guiding principles

  1. Authorised, scoped, bounded. Nothing runs outside an explicit host allow-list, and every run is bounded by request/time budgets.
  2. Observation ≠ proof. Each finding records severity (impact if true), confidence (strength of evidence), and status (what the tool can honestly claim). Automated tools rarely prove API flaws without risky actions, so the honest default is often suspected/inconclusive plus a manual step.
  3. Evidence-driven confirmation. A finding is only confirmed when reproduced in scope with concrete evidence (e.g. a non-owner retrieving an owner's object and an owner-specific discriminator appearing in the response).
  4. Reuse over duplication. Shared logic (HTTP, scope, findings, reporting) lives in one library; the numbered scripts are thin entry points; the orchestrator composes the same checks.

Mapping to OWASP API Security Top 10 (2023)

ID Risk Toolkit coverage
API1 Broken Object Level Authorization (BOLA) Script 06, orchestrator — can reach confirmed.
API2 Broken Authentication Script 03 — suspected (intent declared by operator).
API3 Broken Object Property Level Authorization (BOPLA) Script 07 — exposure + mass assignment, suspected.
API4 Unrestricted Resource Consumption Scripts 08, 09 — inconclusive/informational by design.
API5 Broken Function Level Authorization (BFLA) Script 07 — suspected.
API6 Unrestricted Access to Sensitive Business Flows Not automated (needs business context).
API7 Server Side Request Forgery (SSRF) Not automated (active exploitation / callback infra).
API8 Security Misconfiguration Scripts 02, 05, 09 — headers, errors, verbosity.
API9 Improper Inventory Management Scripts 01, 04 — recon + OpenAPI inventory.
API10 Unsafe Consumption of APIs Not automated (upstream trust is a design review).

Why API6, API7 and API10 are not automated

  • API6 depends on knowing which flows are business-sensitive (checkout, password reset, ticket purchase). That is a human judgement, and abusing a flow to test it can cause real harm. The toolkit instead flags sensitive-looking routes (script 04) for manual review.
  • API7 (SSRF) typically requires sending the server a URL it will fetch and observing an out-of-band callback. Safe testing needs controlled infrastructure and careful payloads; automating it blindly risks hitting internal systems.
  • API10 is about whether the API safely consumes other APIs — a design and code review question more than a black-box probe.

Documenting these omissions honestly is itself part of professional methodology.

Relationship to existing tools

This toolkit is not a replacement for Burp Suite, OWASP ZAP, Postman, or the OWASP API Security Testing Framework. Those are mature, broad tools. The value here is:

  • Understanding — each check is small and readable, demonstrating how a control is tested, not just that it is.
  • Targeted automation — repeatable, scriptable checks for recurring tasks.
  • Reproducibility — stable audit ids, timestamps, and a bundled lab target.
  • Report quality — honest, triage-friendly output with remediation.

Workflow in an engagement

  1. Confirm scope and authorisation; fill scope.allowed_hosts.
  2. Recon (01) and header/config review (02).
  3. Inventory from the provided OpenAPI spec (04); mark sensitive routes.
  4. Authentication (03), then authorization: BOLA (06), BFLA/BOPLA (07).
  5. Input validation (05), rate limiting (08), GraphQL (09) where applicable.
  6. Or drive all of the above with the orchestrator (10) and a single config.
  7. Triage findings; manually verify suspected/inconclusive items.

Roadmap

Realistic, prioritised next steps:

  1. High — Pluggable auth providers (OAuth2 client-credentials helper for test accounts) without ever storing secrets.
  2. Medium — Optional schema-aware input generation from OpenAPI request bodies.
  3. Medium — Concurrency with a strict shared budget (currently sequential).
  4. Low — HTML report theme.
  5. Low — A small, intentionally-vulnerable HTTP server (not just an in-process transport) for network-level demos.

Done (shipped): SARIF output (--sarif), an installable apt console command, static JWT inspection (script 11), CORS audit (script 12), and ruff/mypy/coverage gates in CI.