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.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
“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.
Độ 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
Bình luận
- …
Thêm skill từ kho mã này
abusing-dpapi-for-credential-access
35kCung cấp cho agent AI của bạn hướng dẫn có sẵn cho một tác vụ cụ thể, giúp nó làm việc tốt hơn và nhanh hơn.
abusing-shadow-credentials-for-privesc
35kDạy agent AI của bạn viết văn bản rõ ràng và có cấu trúc tốt.
achieving-cmmc-level-2-compliance
35kGiúp agent của bạn chuẩn bị môi trường để tuân thủ CMMC Level 2. Triển khai các yêu cầu bảo mật và quản lý tài liệu cần thiết.
acquiring-disk-image-with-dd-and-dcfldd
35kGiúp agent của bạn tạo bản sao chính xác của ổ đĩa. Cách này đảm bảo không mất hay thay đổi thông tin trong quá trình điều tra.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.