본문으로 건너뛰기
Skillpedia
테스트35k · #8378

testing-api-for-broken-object-level-authorization

하는 일

이 도구는 온라인 시스템(API)이 한 사용자가 권한 없이 다른 사용자의 데이터에 접근하거나 수정하도록 허용하는지 확인합니다. 이를 위해 여러 객체 식별자를 시험합니다.

사용하는 경우

  • ✓온라인 시스템의 보안을 테스트할 때.
  • ✓사용자가 서로의 데이터에 접근할 수 없도록 확실히 하고 싶을 때.
  • ✓시스템이 개인 데이터를 제대로 보호하는지 검증할 때.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/testing-api-for-broken-object-level-authorization/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/testing-api-for-broken-object-level-authorization/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“API가 사용자 A가 사용자 B의 주문에 접근하도록 허용하는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 한 사용자에게 속한 객체(예: 주문 번호)의 식별자를, 다른 사용자의 자격 증명과 함께 사용해 봅니다. 접근이 허용되면 시스템에 보안 결함이 있는 것입니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Testing API for Broken Object Level Authorization

When to Use

  • Assessing REST or GraphQL APIs that use object identifiers in URL paths, query parameters, or request bodies
  • Performing OWASP API Security Top 10 assessments where API1:2023 (BOLA) must be tested
  • Testing multi-tenant SaaS applications where users from different tenants should not access each other's data
  • Validating that API endpoints enforce per-object authorization checks beyond just authentication
  • Evaluating APIs after new endpoints are added to ensure authorization middleware is applied consistently

Do not use without written authorization from the API owner. BOLA testing involves accessing or attempting to access other users' data, which requires explicit permission.

Prerequisites

  • Written authorization specifying the target API endpoints and scope of testing
  • At least two test accounts with different privilege levels and distinct data sets
  • Burp Suite Professional or OWASP ZAP configured as an intercepting proxy
  • Authentication tokens (JWT, session cookies, API keys) for each test account
  • API documentation (OpenAPI/Swagger spec) or access to enumerate endpoints
  • Python 3.10+ with requests library for scripted testing
  • Autorize Burp extension installed for automated BOLA detection

Workflow

Step 1: API Endpoint Discovery and Object ID Mapping

Enumerate all API endpoints and identify parameters that reference objects:

From OpenAPI/Swagger Specification:

# Download and parse the OpenAPI spec
curl -s https://target-api.example.com/api/docs/swagger.json | python3 -m json.tool

# Extract all endpoints with path parameters
curl -s https://target-api.example.com/api/docs/swagger.json | \
  python3 -c "
import json, sys
spec = json.load(sys.stdin)
for path, methods in spec.get('paths', {}).items():
    for method, details in methods.items():
        if method in ('get','post','put','patch','delete'):
            params = [p['name'] for p in details.get('parameters',[]) if p.get('in') in ('path','query')]
            if params:
                print(f'{method.upper()} {path} -> params: {params}')
"

From Burp Suite Traffic:

  1. Browse the application as User A, exercising all features that involve data creation and retrieval
  2. In Burp, go to Target > Site Map and filter for API paths (e.g., /api/v1/, /graphql)
  3. Look for patterns: /api/v1/users/{id}, /api/v1/orders/{order_id}, /api/v1/documents/{doc_uuid}
  4. Note the object ID format: sequential integers (predictable), UUIDs (less predictable), or encoded values

Classify Object ID Types:

ID Type Example Predictability BOLA Risk
Sequential Integer /orders/1042 High - increment/decrement Critical
UUID v4 /orders/550e8400-e29b-41d4-a716-446655440000 Low - random Medium (if leaked)
Encoded/Hashed /orders/base64encodedvalue Medium - decode and predict High
Composite /users/42/orders/1042 High - multiple IDs to swap Critical
Slug /profiles/john-doe Medium - guess usernames High

Step 2: Baseline Request Capture with Authenticated User

Capture legitimate requests for User A and User B:

import requests

BASE_URL = "https://target-api.example.com/api/v1"

# User A credentials
user_a_token = "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
user_a_headers = {"Authorization": user_a_token, "Content-Type": "application/json"}

# User B credentials
user_b_token = "Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
user_b_headers = {"Authorization": user_b_token, "Content-Type": "application/json"}

# Step 1: Identify User A's objects
user_a_profile = requests.get(f"{BASE_URL}/users/me", headers=user_a_headers)
user_a_id = user_a_profile.json()["id"]  # e.g., 1001

user_a_orders = requests.get(f"{BASE_URL}/users/{user_a_id}/orders", headers=user_a_headers)
user_a_order_ids = [o["id"] for o in user_a_orders.json()["orders"]]  # e.g., [5001, 5002]

# Step 2: Identify User B's objects
user_b_profile = requests.get(f"{BASE_URL}/users/me", headers=user_b_headers)
user_b_id = user_b_profile.json()["id"]  # e.g., 1002

user_b_orders = requests.get(f"{BASE_URL}/users/{user_b_id}/orders", headers=user_b_headers)
user_b_order_ids = [o["id"] for o in user_b_orders.json()["orders"]]  # e.g., [5003, 5004]

print(f"User A (ID: {user_a_id}): Orders {user_a_order_ids}")

…
자주 묻는 질문

BOLA와 IDOR이란 무엇인가요?

사용자가 식별자(ID) 하나를 다른 것으로 바꾸는 등의 방법으로, 접근해서는 안 되는 데이터를 보거나 수정할 수 있게 되는 보안 결함입니다.

이 도구를 쓰려면 허가가 필요한가요?

네, 테스트를 수행하기 전에 시스템 소유자의 명시적인 서면 허가가 반드시 있어야 합니다.

어떤 도구가 필요한가요?

Burp Suite나 OWASP ZAP 같은 도구, 테스트 계정, 그리고 기본적인 프로그래밍 지식이 필요합니다.

상세 정보

작성자의 원본 설명

Tests REST and GraphQL APIs for Broken Object Level Authorization (BOLA/IDOR, OWASP API1:2023) by intercepting API calls, identifying object ID parameters (numeric IDs, UUIDs, slugs), and systematically substituting IDs belonging to other users to check whether the server enforces per-object authorization. Use when asked to test BOLA or IDOR in an API, verify object-level authorization, or assess

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#8378
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬