Chuyển đến nội dung
Skillpedia
Bảo mật35k · #7731

conducting-api-security-testing

Skill này làm gì

Agent này kiểm tra bảo mật của các API (giao diện mà chương trình dùng để giao tiếp với nhau). Nó tìm các lỗi mà hacker có thể khai thác để truy cập trái phép, thay đổi dữ liệu hoặc làm gián đoạn dịch vụ.

Khi nào nên dùng

  • ✓Khi bạn muốn kiểm tra xem một API có được bảo vệ khỏi xâm nhập hay không.
  • ✓Khi triển khai một API mới và cần đảm bảo an toàn.
  • ✓Để kiểm toán bảo mật của các API hiện có.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/conducting-api-security-testing/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/conducting-api-security-testing/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kiểm tra bảo mật của API đăng nhập để xem có thể vượt qua xác thực hay không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ mô phỏng các cuộc tấn công phổ biến bằng công cụ chuyên dụng và dựa trên tài liệu của API. Mục tiêu là tìm điểm yếu trước khi kẻ xấu tìm ra.

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.

Conducting API Security Testing

When to Use

  • 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.

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

Step 1: API Discovery and Documentation

Map the complete API attack surface:

  • Import API documentation: Load OpenAPI/Swagger specs into Postman or Burp Suite to catalog all endpoints, methods, parameters, and authentication requirements
  • Reverse-engineer undocumented APIs: Proxy the mobile app or web frontend through Burp Suite and exercise all features to capture API calls. Export the Burp sitemap as the baseline endpoint inventory.
  • GraphQL introspection: Send an introspection query to discover the full schema:
    {"query": "{__schema{types{name,fields{name,args{name,type{name}}}}}}"}
    
  • Endpoint enumeration: Fuzz for hidden API versions (/api/v1/, /api/v2/, /api/internal/), debug endpoints (/api/debug, /api/health, /api/metrics), and administrative endpoints
  • Document authentication mechanisms: Identify if the API uses API keys, OAuth 2.0 Bearer tokens, JWT, session cookies, or mutual TLS

Step 2: Authentication and Token Testing

Test authentication mechanisms for weaknesses:

  • JWT analysis: Decode the JWT and inspect claims (sub, exp, iss, aud, role). Test:
    • Algorithm confusion: Change alg to none and remove the signature
    • Key confusion: Change alg from RS256 to HS256 and sign with the public key
    • Weak secret: Brute-force the HMAC secret with hashcat -m 16500 jwt.txt wordlist.txt
    • Token expiration: Verify tokens expire and cannot be used after expiration
    • Claim tampering: Modify role, userId, or permission claims and re-sign
  • OAuth 2.0 testing: Check for redirect_uri manipulation, authorization code reuse, token leakage in Referer headers, and missing state parameter (CSRF)
  • API key security: Test if API keys are validated per-endpoint, if revoked keys are immediately rejected, and if keys in query strings appear in access logs or analytics

Step 3: Authorization Testing (BOLA/BFLA)

Test for Broken Object Level Authorization (BOLA) and Broken Function Level Authorization (BFLA):

  • BOLA (IDOR) testing: For every endpoint that returns user-specific data, replace the object identifier with another user's identifier:
    • GET /api/users/123/orders -> GET /api/users/456/orders
    • Test with numeric IDs, UUIDs, usernames, and email addresses
    • Automate with Burp Autorize extension: configure it with two sessions (attacker and victim) and replay all requests
  • BFLA testing: Using a low-privilege token, attempt to access administrative endpoints:
    • DELETE /api/users/456 (admin-only delete)
    • PUT /api/users/456/role (role modification)
    • GET /api/admin/dashboard (admin panel data)
  • Mass assignment: Send additional JSON properties not shown in the documentation:
    PUT /api/users/123
    {"name": "Test", "role": "admin", "isVerified": true, "balance": 99999}
    
  • HTTP method testing: If GET works on an endpoint, try PUT, PATCH, DELETE, and OPTIONS to discover unprotected methods

Step 4: Input Validation and Injection Testing

Test API inputs for injection and validation flaws:

…

Câu hỏi thường gặp

API là gì?

API giống như “người đưa tin” cho phép các chương trình khác nhau trao đổi thông tin và chức năng với nhau một cách có tổ chức.

Lỗ hổng bảo mật là gì?

Đó là các lỗi hoặc kẽ hở trong hệ thống mà người có ý đồ xấu có thể lợi dụng để gây hại, đánh cắp dữ liệu hoặc truy cập trái phép.

OWASP Top 10 là gì?

Đây là danh sách 10 lỗ hổng bảo mật nghiêm trọng và phổ biến nhất trong ứng dụng web và API, được dùng làm hướng dẫn cho việc kiểm thử bảo mật.

Chi tiết

Mô tả gốc của tác giả

Conducts security testing of REST, GraphQL, and gRPC APIs to identify vulnerabilities in authentication, authorization, rate limiting, input validation, and business logic. The tester uses the OWASP API Security Top 10 as the testing framework, combining Burp Suite interception with Postman collections and custom scripts to test endpoint security at every privilege level. Activates for requests in

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7731
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự