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

detecting-broken-object-property-level-authorization

Skill này làm gì

Công cụ này giúp tìm lỗ hổng bảo mật trong API. Nó kiểm tra xem API có hiển thị thông tin không nên hiển thị (như mật khẩu hoặc lương) hay cho phép người dùng thay đổi dữ liệu họ không được phép, chẳng hạn tự nâng quyền lên quản trị viên.

Khi nào nên dùng

  • ✓Khi điều tra một vấn đề bảo mật trong ứng dụng.
  • ✓Khi tạo kiểm thử để đảm bảo API an toàn.
  • ✓Khi bạn nghi ngờ dữ liệu nhạy cảm đang bị lộ không đúng cách.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-broken-object-property-level-authorization/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-broken-object-property-level-authorization/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 xem API người dùng có lộ các trường như “salary” hoặc “password” trong phản hồi không.”

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

Cách hoạt động

Công cụ so sánh dữ liệu API trả về với dữ liệu được mong đợi. Nó cũng thử gửi thêm hoặc sửa đổi dữ liệu để xem API có chấp nhận thay đổi trái phép đối với các trường nhạy cảm khô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.

Detecting Broken Object Property Level Authorization

Overview

Broken Object Property Level Authorization (BOPLA), classified as API3:2023 in the OWASP API Security Top 10, combines two related vulnerability classes: Excessive Data Exposure (API returning more data than needed) and Mass Assignment (API accepting more data than intended). Even when APIs enforce object-level authorization correctly, they may fail to control which specific properties of an object a user can read or modify. Attackers exploit this by reading sensitive properties from API responses or injecting additional properties into request bodies to modify fields they should not have access to.

When to Use

  • When investigating security incidents that require detecting broken object property level authorization
  • 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

  • Target API with endpoints that return or accept object data
  • API documentation or schema (OpenAPI spec preferred)
  • Burp Suite or Postman for API request manipulation
  • Multiple user accounts with different privilege levels
  • Python 3.8+ with requests library for automated testing
  • Authorization to perform security testing

Vulnerability Patterns

Excessive Data Exposure

The API returns object properties the client does not need:

// GET /api/v1/users/123
// Response includes sensitive fields the UI doesn't display:
{
  "id": 123,
  "username": "john_doe",
  "email": "john@example.com",
  "name": "John Doe",
  "ssn": "123-45-6789",           // Sensitive - not needed by UI
  "salary": 95000,                 // Sensitive - not needed by UI
  "internal_notes": "VIP client",  // Internal - should not be exposed
  "password_hash": "$2b$12...",    // Critical - never expose
  "role": "admin",                 // May enable privilege discovery
  "created_by": "system_admin",   // Internal metadata
  "credit_card_last4": "4242"     // PCI compliance violation
}

Mass Assignment

The API binds client-supplied data to internal object properties without filtering:

// Normal user update request
PUT /api/v1/users/123
Content-Type: application/json

{
  "name": "John Updated",
  "email": "new@example.com",
  "role": "admin",           // Attacker-injected: privilege escalation
  "is_verified": true,       // Attacker-injected: bypass verification
  "discount_rate": 100,      // Attacker-injected: business logic abuse
  "account_balance": 999999  // Attacker-injected: financial fraud
}

Testing Methodology

#!/usr/bin/env python3
"""BOPLA Vulnerability Scanner

Tests APIs for Broken Object Property Level Authorization
including Excessive Data Exposure and Mass Assignment.
"""

import requests
import json
import sys
from typing import Dict, List, Optional, Set
from dataclasses import dataclass, field
from copy import deepcopy

@dataclass
class BOPLAFinding:
    endpoint: str
    method: str
    vulnerability_type: str  # "excessive_exposure" or "mass_assignment"
    severity: str
    property_name: str
    details: str

class BOPLAScanner:
    SENSITIVE_PROPERTY_PATTERNS = {
        "critical": [
            "password", "password_hash", "secret", "token", "api_key",
            "private_key", "secret_key", "access_token", "refresh_token",
        ],
        "high": [
            "ssn", "social_security", "tax_id", "credit_card", "card_number",
            "cvv", "bank_account", "routing_number",
        ],
        "medium": [
            "salary", "income", "internal_notes", "admin_notes",
            "created_by", "modified_by", "ip_address", "session_id",
            "role", "permissions", "is_admin", "is_superuser", "privilege",
        ],
        "low": [
            "phone", "address", "date_of_birth", "dob", "age",
            "gender", "ethnicity", "religion",
        ]
    }

    MASS_ASSIGNMENT_FIELDS = [
        ("role", "admin"),
        ("is_admin", True),
        ("is_verified", True),
        ("is_active", True),
        ("email_verified", True),
        ("account_type", "premium"),
        ("discount_rate", 100),
        ("credit_limit", 999999),
        ("permissions", ["admin", "write", "delete"]),
        ("account_balance", 999999),
        ("subscription_tier", "enterprise"),
        ("rate_limit", 999999),
    ]


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

“Broken Object Property Level Authorization” (BOPLA) là gì?

Đây là loại lỗ hổng bảo mật trong đó API không kiểm soát đúng phần (thuộc tính) nào của một đối tượng (như người dùng hoặc đơn hàng) mà người dùng được xem hoặc sửa. Điều này có thể dẫn đến lộ dữ liệu nhạy cảm hoặc thay đổi dữ liệu trái phép.

Công cụ phát hiện hai loại vấn đề nào?

Nó phát hiện “Excessive Data Exposure” (API hiển thị nhiều thông tin hơn mức cần thiết) và “Mass Assignment” (API chấp nhận dữ liệu cho các trường lẽ ra không được phép, cho phép thay đổi trái phép).

Tôi có cần là lập trình viên giàu kinh nghiệm để dùng không?

Không nhất thiết. Công cụ được thiết kế để giúp nhận diện vấn đề bảo mật. Tuy nhiên, để thiết lập và chạy các bài kiểm thử tự động, một số kiến thức lập trình cơ bản và quen với các công cụ như Burp Suite hoặc Postman sẽ hữu ích.

Chi tiết

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

Detect and test for OWASP API3:2023 Broken Object Property Level Authorization (BOPLA), covering excessive data exposure in API responses and mass assignment via injected request-body properties. Use when reviewing API responses/requests for over-exposed or over-writable object fields, or building detection rules and test cases for property-level authorization gaps that object-level checks miss.

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

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