hardw00t/ai-security-arsenal

api-security

Router skill for API penetration testing across REST, GraphQL, gRPC, and WebSocket.

Vedi sorgente
Documento Skill originale

Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.

API Security Testing

Thin router for API penetration testing. Use the index sections to load the specific workflow, payload file, or methodology doc for the phase you're in. Do not pre-load everything.

When to Use

  • Pentesting a REST, GraphQL, gRPC, or WebSocket API.
  • OWASP API Top 10 (2023) coverage assessment.
  • BOLA / BFLA / BOPLA authorization matrix analysis.
  • JWT / OAuth / API-key auth testing.
  • Fuzzing endpoints, parameters, or schemas.
  • Parsing and attacking OpenAPI / Swagger / GraphQL schemas.
  • Rate-limit / resource-consumption testing.

Trigger Phrases

"pentest this API", "test the REST API", "test GraphQL security", "check for BOLA/IDOR", "analyze OpenAPI spec", "test API authentication", "JWT attacks", "fuzz API endpoints", "GraphQL introspection".

When NOT to Use This Skill

  • Browser / DOM-based testing (XSS, CSP, clickjacking, client-side auth

flows rendered in a browser) -> use dast-automation.

  • Reviewing API source code for injection/authz bugs at the code level ->

use sast-orchestration.

  • Mobile client reversing to recover API endpoints from an APK/IPA ->

use mobile-security first, then return here with the recovered spec.

  • Cloud-provider IAM / API-gateway config auditing (not the API itself) ->

use cloud-security.

Decision Tree

Is there a schema (OpenAPI / GraphQL SDL / .proto)?
  yes -> parse it first, feed endpoints.txt to fuzzers
  no  -> methodology/api_recon.md

What protocol?
  REST / JSON over HTTP -> workflows/rest_testing.md
  GraphQL               -> workflows/graphql_introspection_triage.md
                           then workflows/graphql_testing.md
  gRPC                  -> workflows/grpc_testing.md
  WebSocket             -> workflows/websocket_testing.md

Is a JWT in use?
  yes -> workflows/jwt_attack_chooser.md  (alg-none -> key-conf -> kid -> brute)

Primary finding target?
  Authorization bugs  -> methodology/bola_bfla_matrix.md  (HIGHEST yield)
  Misconfig / inventory -> nuclei + references/owasp_api_top10_2023.md (API8/API9)
  Injection / SSRF    -> payloads/injection.txt

Parallelism Hints

Run concurrently (independent I/O):

  • Spec discovery: swagger.json, openapi.json, .well-known/openapi.json,

v1/api-docs, v2/api-docs.

  • Endpoint discovery: ffuf + kiterunner + katana can run on the same host.
  • Auth enumeration: collect a token per role (unauth / user / admin / service)

in parallel — each is a separate login flow.

  • Nuclei exposures/, vulnerabilities/, misconfiguration/ template packs.

Keep sequential (state-dependent):

  • Spec parse must finish before endpoint-driven fuzzers can consume it.
  • Authorization matrix diffing must wait for all per-role scans to complete.
  • JWT attack chain steps are ordered (see workflows/jwt_attack_chooser.md).

Sub-Agent Delegation

Spawn one sub-agent per auth context when building the BOLA/BFLA matrix:

  • Agent U — unauthenticated
  • Agent A — user-role (account A)
  • Agent B — user-role (account B, cross-user)
  • Agent X — admin-role (if available)
  • Agent S — service / machine account (if applicable)

Each agent iterates the full endpoint list with its own token and returns {endpoint, method, status, body_hash, leaks_cross_user}. Main agent diffs the five result sets. This is the single biggest parallelism win in API pentesting.

For GraphQL, also delegate: one sub-agent enumerates all Query fields, another all Mutation fields, another maps ID-bearing types for BOLA targeting.

Reasoning Budget

  • Extended thinking — authorization matrix analysis, JWT attack-path

selection, GraphQL schema-driven attack planning, business-logic flow modeling (API6).

  • Minimal / execute directly — payload fuzzing, nuclei runs, ffuf brute

force, grpcurl calls, JWT decoding, spec parsing.

Multimodal Hooks

  • Screenshots of Swagger / GraphiQL / Postman UIs can accelerate spec recovery

when text scraping fails.

  • For JWT and GraphQL evidence, prefer text blobs (evidence.jwt_header,

evidence.graphql_query) over screenshots.

Structured Output

Every finding: schemas/finding.json. Required API-specific fields: endpoint, http_method, api_type (rest/graphql/grpc/websocket), auth_context, owasp_api_id (e.g. API1:2023).

Workflow Index

WorkflowWhen to load
workflows/rest_testing.mdREST/JSON APIs, full 7-phase runbook
workflows/graphql_testing.mdGraphQL testing, post-introspection triage
workflows/graphql_introspection_triage.mdDeciding how to get the GraphQL schema
workflows/grpc_testing.mdgRPC services (reflection or .proto-driven)
workflows/websocket_testing.mdWebSocket / socket.io / GraphQL subscriptions
workflows/jwt_attack_chooser.mdJWTs present — ordered attack chain

Methodology Index

DocWhen to load
methodology/api_recon.mdBefore attack: building endpoint + auth inventory
methodology/bola_bfla_matrix.mdAuthorization testing — highest-value phase
methodology/bounty_patterns_2024_2026.mdPost-2023 public bug-bounty TTPs (OAuth ATO, JWT request_uri, refresh-token persistence, mass-assignment, ORM leakage)

Payloads Index

FileUse
payloads/bola_idor.txtObject-ID substitution values for BOLA/IDOR
payloads/bfla_privilege.txtAdmin paths, method overrides, role-spoof headers
payloads/graphql_queries.txtIntrospection, batching, alias DoS, mutation BOLA
payloads/jwt_attacks.txtHeader / claim tampering recipes
payloads/mass_assignment.txtOver-posting keys for POST/PUT/PATCH
payloads/injection.txtSQLi, NoSQLi, cmdi, SSRF, XXE, SSTI, proto pollution

References Index

FileContent
references/owasp_api_top10_2023.mdOWASP API Top 10 (2023) table + pointers
references/tools.mdTool install / version reference

Examples Index

FileContent
examples/bola_finding.mdREST BOLA — filled-in finding JSON
examples/jwt_none_finding.mdJWT alg=none — filled-in finding JSON
examples/graphql_bola_finding.mdGraphQL mutation BOLA — finding JSON

Tools

ToolPurposeInstall
Burp SuiteHTTP intercepthttps://portswigger.net/burp
ffufHTTP fuzzergo install github.com/ffuf/ffuf/v2@latest
nucleiTemplate scannergo install github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest
jwt_toolJWT attack CLIpip install jwt_tool
graphql-copGraphQL misconfig scanpip install graphql-cop
grpcurlgRPC CLIgo install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
arjunParameter discoverypip install arjun
kiterunnerAPI route discoveryhttps://github.com/assetnote/kiterunner/releases

Full list: references/tools.md.

Last Validated

2026-04. Minimum tool versions: nuclei >= 3.3, ffuf >= 2.1, grpcurl >= 1.9, jwt_tool >= 2.2, graphql-cop >= 1.13.

dallo stesso repository

Altri Skills

Tutti gli Skills
hardw00t
Community

cloud-security

Multi-cloud security assessment skill for AWS, Azure, and GCP. Use when performing cloud security audits, scanning for misconfigurations, testing IAM policies, auditing storage permissions, and identifying privilege escalation paths. Triggers on requests to audit cloud security, scan AWS/Azure/GCP, check cloud misconfigurations, or perform cloud penetration testing. Covers CIS benchmarks, CSPM, and cross-cloud identity federation.

installazioni
1
GitHub Stars
101
Aggiornato
19 apr
hardw00t
Community

dast-automation

Automated Dynamic Application Security Testing (DAST) using Playwright MCP plus standard OS pentest tooling. Performs blackbox or greybox scans on single or multiple domains with orchestrated crawling, vulnerability detection, and structured output. Trigger on requests like "scan this domain", "run DAST on these URLs", "automated pentest", or "security-test the staging app".

installazioni
1
GitHub Stars
101
Aggiornato
19 apr
hardw00t
Community

iac-security

Infrastructure-as-Code security scanning router for Terraform, CloudFormation, Kubernetes manifests, Helm, ARM/Bicep. Orchestrates Checkov, tfsec, Terrascan, KICS, kubesec, kube-linter, Polaris, cfn-lint/cfn-nag, and OPA/Conftest. Use when auditing IaC for misconfigurations, scanning Terraform plans, validating K8s security policies, checking cloud infrastructure compliance, or authoring custom policy-as-code (Rego).

installazioni
1
GitHub Stars
101
Aggiornato
19 apr
hardw00t
Community

llm-security

LLM and AI application security testing skill for prompt injection (direct, indirect, multimodal), system-prompt extraction, RAG poisoning, memory poisoning, MCP server injection, skill-file injection, agentic tool misuse, computer-use UI injection, and excessive agency. Authorization required — this skill tests AI systems you are explicitly permitted to assess. Triggers on requests to test LLM / AI-agent / RAG / MCP / computer-use security, perform prompt injection, extract system prompts, poison RAG or memory, audit agent tool use, or evaluate AI guardrails.

installazioni
1
GitHub Stars
101
Aggiornato
19 apr