Conducting Api Security Testing
Overview
Cybersecurity skill for conducting api security testing. Follows industry best practices and security standards.
When to Use
Trigger phrases:
"conducting api security testing"
"Conducts security testing of REST, GraphQL, and gRPC APIs to identify vulnerabil"
Testing API endpoints for authorization flaws, injection vulnerabilities, and business logic bypasses
Assessing the security of microservices architecture where APIs are the primary communication method
Validating that API gateway protections (rate limiting, authentication, input validation) are properly enforced
Testing third-party API integrations for data exposure and insecure configurations
Evaluating GraphQL APIs for introspection disclosure, query complexity attacks, and authorization bypasses
Do not use against APIs without written authorization, for load testing or denial-of-service testing unless explicitly scoped, or for testing production APIs that process real financial transactions without safeguards.
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
Prerequisites
- API documentation (OpenAPI/Swagger, GraphQL schema, Postman collection) or application access to reverse-engineer the API
- Burp Suite Professional configured to intercept API traffic with JSON/XML content type handling
- Postman or Insomnia for organizing and replaying API requests across different authentication contexts
- Valid API tokens or credentials at multiple privilege levels (unauthenticated, standard user, admin)
- Target API base URL and version information
Workflow
# Example: IOC detection
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def extract_iocs(text: str) -> dict:
return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}
- Scope the Analysis — Define what api security testing artifacts or data sources to examine and the investigation timeline.
- Preserve Evidence — Create forensic copies of relevant data. Maintain chain of custody documentation.
- Extract Key Indicators — Parse and extract relevant api security testing data points from collected artifacts.
- Correlate Findings — Cross-reference extracted data with other sources (threat intel, logs, timelines).
- Build Timeline — Construct a chronological sequence of events related to api security testing.
- Document Analysis — Write findings report with evidence, conclusions, and recommendations.
Tools
- Forensic Toolkit — Evidence collection and analysis
- Timeline Tools — Chronological event reconstruction
- Log Analysis Platform — Centralized log parsing and search
Process
- Reconnaissance — Gather target information, identify attack surface, enumerate services
- Analysis/Exploitation — Execute the technique, analyze results, document findings
- Reporting — Document IOCs, write findings, provide remediation recommendations
Verification
Anti-Rationalization Table
| Rationalization |
Reality |
| "We are too small to be targeted" |
Automated attacks target everyone. Size does not matter. |
| "Security slows us down" |
A breach slows you down 100x more. Build security in from the start. |
| "We will fix it after launch" |
Vulnerabilities in production are exploited within hours. Fix before deploy. |
1---2name: conducting-api-security-testing3description: Use when conducts security testing of REST, GraphQL, and gRPC APIs to4 identify vulnerabilities in authentication, authorization, rate limiting, input5 validation, and business logic. The tester uses the OWASP API Security Top 10 as6 the testing framework, combining Burp Suite interception with Postman collections7 and custom scripts to test endpoint security at every privilege level. Use when8 working with conducting api security testing.9domain: cybersecurity10tags:11- API-security12- OWASP-API-Top1013- REST14- GraphQL15- authorization-testing16subdomain: penetration-testing17version: 1.0.018author: oyi7719license: Apache-2.020nist_csf:21- ID.RA-0122- ID.RA-0623- GV.OV-0224- DE.AE-0725category: cybersecurity26metadata:27 source: https://skillmd.com/skills/oyi77/conducting-api-security-testing28---2930# Conducting Api Security Testing3132## Overview3334Cybersecurity skill for conducting api security testing. Follows industry best practices and security standards.3536## When to Use37**Trigger phrases:**38- "conducting api security testing"39- "Conducts security testing of REST, GraphQL, and gRPC APIs to identify vulnerabil"404142- Testing API endpoints for authorization flaws, injection vulnerabilities, and business logic bypasses43- Assessing the security of microservices architecture where APIs are the primary communication method44- Validating that API gateway protections (rate limiting, authentication, input validation) are properly enforced45- Testing third-party API integrations for data exposure and insecure configurations46- Evaluating GraphQL APIs for introspection disclosure, query complexity attacks, and authorization bypasses4748**Do not use** against APIs without written authorization, for load testing or denial-of-service testing unless explicitly scoped, or for testing production APIs that process real financial transactions without safeguards.495051## When NOT to Use5253- When you lack proper authorization for testing54- For production systems without change management55- When the task requires legal or compliance expertise beyond technical scope565758## Prerequisites5960- API documentation (OpenAPI/Swagger, GraphQL schema, Postman collection) or application access to reverse-engineer the API61- Burp Suite Professional configured to intercept API traffic with JSON/XML content type handling62- Postman or Insomnia for organizing and replaying API requests across different authentication contexts63- Valid API tokens or credentials at multiple privilege levels (unauthenticated, standard user, admin)64- Target API base URL and version information6566## Workflow6768```python69# Example: IOC detection70import re7172IOC_PATTERNS = {73 "ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",74 "domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",75 "hash_md5": r"\b[a-f0-9]{32}\b",76 "hash_sha256": r"\b[a-f0-9]{64}\b",77}7879def extract_iocs(text: str) -> dict:80 return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}81```82831. **Scope the Analysis** — Define what api security testing artifacts or data sources to examine and the investigation timeline.842. **Preserve Evidence** — Create forensic copies of relevant data. Maintain chain of custody documentation.853. **Extract Key Indicators** — Parse and extract relevant api security testing data points from collected artifacts.864. **Correlate Findings** — Cross-reference extracted data with other sources (threat intel, logs, timelines).875. **Build Timeline** — Construct a chronological sequence of events related to api security testing.886. **Document Analysis** — Write findings report with evidence, conclusions, and recommendations.8990## Tools9192- **Forensic Toolkit** — Evidence collection and analysis93- **Timeline Tools** — Chronological event reconstruction94- **Log Analysis Platform** — Centralized log parsing and search959697## Process98991. **Reconnaissance** — Gather target information, identify attack surface, enumerate services1001. **Analysis/Exploitation** — Execute the technique, analyze results, document findings1011. **Reporting** — Document IOCs, write findings, provide remediation recommendations102103## Verification104105- [ ] All api security testing procedures executed completely and documented106- [ ] Findings validated against multiple data sources107- [ ] False positives identified and filtered108- [ ] Results documented with evidence and timestamps109- [ ] Recommendations provided with risk-based prioritization110111## Anti-Rationalization Table112113| Rationalization | Reality |114|---|---|115| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |116| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |117| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |