Chuyển đến nội dung
Skillpedia
Agent35k · #7793

detecting-api-enumeration-attacks

Skill này làm gì

Công cụ này giúp tìm các cuộc tấn công cố đoán hoặc khám phá thông tin trong API. Nó tìm các mẫu đáng ngờ trong nhật ký truy cập, như thử nhanh nhiều mục khác nhau hoặc lặp lại các lần ủy quyền thất bại.

Khi nào nên dùng

  • ✓Khi điều tra một nghi ngờ về cuộc tấn công đoán dữ liệu trên API.
  • ✓Khi tạo quy tắc cảnh báo về hoạt động API đáng ngờ.
  • ✓Khi kiểm tra xem bảo mật API có bảo vệ khỏi truy cập trái phép không.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-api-enumeration-attacks/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/detecting-api-enumeration-attacks/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

“Tìm các lần truy cập tuần tự đến ID người dùng hoặc đơn hàng trong nhật ký API của chúng tôi.”

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

Cách hoạt động

Công cụ phân tích nhật ký truy cập API (từ gateway hoặc tường lửa) để tìm mẫu tấn công. Điều này bao gồm thử nhiều ID theo thứ tự, trộn lẫn phản hồi thành công và thất bại, hoặc thay đổi tham số để truy cập dữ liệu không đúng quyền.

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.

Detecting API Enumeration Attacks

Overview

API enumeration attacks occur when attackers systematically probe API endpoints with sequential or predictable identifiers to discover and access unauthorized resources. Broken Object Level Authorization (BOLA), ranked as API1:2023 in the OWASP API Security Top 10, is the most critical API vulnerability. Attackers manipulate object identifiers (user IDs, order numbers, account references) in API requests to bypass authorization and access other users' data. Detection requires monitoring for patterns of rapid sequential access attempts, authorization failures, and abnormal API usage behavior.

When to Use

  • When investigating security incidents that require detecting api enumeration attacks
  • When building detection rules or threat hunting queries for this domain
  • When SOC analysts need structured procedures for this analysis type
  • When validating security monitoring coverage for related attack techniques

Prerequisites

  • API gateway or reverse proxy with logging enabled (Kong, AWS API Gateway, Apigee)
  • SIEM platform (Splunk, Elastic SIEM, or Microsoft Sentinel)
  • Access to API server logs with request details
  • Web Application Firewall (WAF) with API protection capabilities
  • Understanding of the API's authorization model and object identifier schemes

Attack Patterns to Detect

1. Sequential ID Enumeration

Attackers iterate through numeric or predictable identifiers:

GET /api/v1/users/1001 -> 200 OK
GET /api/v1/users/1002 -> 200 OK
GET /api/v1/users/1003 -> 403 Forbidden
GET /api/v1/users/1004 -> 200 OK
GET /api/v1/users/1005 -> 200 OK
...

Detection Indicators:

  • Rapid sequential requests to the same endpoint with incrementing IDs
  • Mix of 200/403/401 responses from same source
  • Request rate exceeding normal user behavior
  • Access to resources outside authenticated user's scope

2. UUID/GUID Enumeration

Even non-sequential identifiers can be enumerated if leaked through other endpoints:

# Attacker first harvests UUIDs from a list endpoint
GET /api/v1/posts?page=1  -> Returns post objects with author UUIDs

# Then uses those UUIDs to access restricted user data
GET /api/v1/users/a3f2c1e4-... -> Private user profile
GET /api/v1/users/b7d9e8f1-... -> Private user profile

3. Parameter Tampering Enumeration

# Authenticated as user_id=100, attempting to access other users' orders
GET /api/v1/orders?user_id=101
GET /api/v1/orders?user_id=102
GET /api/v1/orders?user_id=103

Detection Rules

Splunk Detection Queries

# Detect sequential ID enumeration on API endpoints
index=api_logs sourcetype=api_access
| rex field=uri_path "(?<endpoint>/api/v\d+/\w+/)(?<object_id>\d+)"
| stats count as request_count,
        dc(object_id) as unique_ids,
        values(status_code) as status_codes,
        min(_time) as first_seen,
        max(_time) as last_seen
  by src_ip, endpoint, user_session
| eval time_span = last_seen - first_seen
| eval requests_per_second = request_count / max(time_span, 1)
| where unique_ids > 20 AND requests_per_second > 2
| eval severity = case(
    unique_ids > 100, "critical",
    unique_ids > 50, "high",
    unique_ids > 20, "medium",
    1==1, "low"
  )
| sort - unique_ids
| table src_ip, endpoint, unique_ids, request_count, requests_per_second,
        status_codes, severity

# Detect BOLA via authorization failure patterns
index=api_logs sourcetype=api_access status_code IN (401, 403)
| bin _time span=5m
| stats count as failure_count,
        dc(uri_path) as unique_paths,
        values(uri_path) as attempted_paths
  by _time, src_ip, user_id
| where failure_count > 10
| eval attack_type = if(unique_paths > 5, "enumeration", "brute_force")

Elastic SIEM Detection Rules

{
  "rule": {
    "name": "API Object Enumeration Detection",
    "description": "Detects rapid sequential access to API objects with mixed authorization results",
    "type": "threshold",
    "index": ["api-access-*"],
    "query": {
      "bool": {
        "must": [
          { "regexp": { "url.path": "/api/v[0-9]+/[a-z]+/[0-9]+" } }
        ],
        "should": [
          { "term": { "http.response.status_code": 200 } },
          { "term": { "http.response.status_code": 403 } },
          { "term": { "http.response.status_code": 401 } }
        ]
      }
    },
    "threshold": {
      "field": ["source.ip"],
      "value": 50,
      "cardinality": [

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

BOLA/IDOR là gì?

Đây là các kiểu tấn công trong đó kẻ tấn công cố truy cập dữ liệu hoặc tài nguyên mà họ không được phép, bằng cách lợi dụng lỗi trong cách API kiểm tra ai được truy cập gì.

Cần thông tin gì để dùng công cụ này?

Bạn cần quyền truy cập nhật ký truy cập API (do gateway hoặc tường lửa tạo ra) và một nền tảng để phân tích nhật ký này (như SIEM).

“Detection rules” là gì?

Đây là các chỉ dẫn bạn thiết lập trong hệ thống bảo mật (như SIEM) để tự động nhận diện và cảnh báo về hoạt động độc hại, như các cuộc tấn công mà công cụ này giúp phát hiện.

Chi tiết

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

Detect API enumeration attacks (BOLA/IDOR, OWASP API1:2023) by writing SIEM detection rules that flag sequential or UUID identifier iteration, parameter tampering, and mixed 200/401/403 response patterns from API gateway and WAF logs. Use when investigating suspected object-level authorization abuse, building threat-hunting queries for API access-control bypass, or hardening API logging/rate-limit

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7793
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ự