本文へスキップ
Skillpedia
エージェント35k · #7806

detecting-broken-object-property-level-authorization

できること

このツールは、APIのセキュリティ上の欠陥を見つけるのに役立ちます。APIが本来表示すべきでない情報(パスワードや給与など)を表示していないか、また、ユーザーが権限のないデータを変更できてしまわないか(たとえば、自分の権限を管理者に変更できないか)を確認します。

使う場面

  • ✓アプリケーションのセキュリティ問題を調査するとき
  • ✓APIが安全であることを確かめるテストを作成するとき
  • ✓機密データが不適切に公開されている可能性があると感じたとき

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-broken-object-property-level-authorization/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“ユーザーAPIのレスポンスに「salary」や「password」などの項目が含まれていないか確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールは、APIが返すデータと期待される内容を比較します。また、余分なデータや改ざんしたデータを送信し、APIが機密項目への不適切な変更を受け入れてしまわないかを試します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

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),
    ]


…
よくある質問

「Broken Object Property Level Authorization(BOPLA)」とは何ですか?

APIが、ユーザーがオブジェクト(ユーザーや注文など)のどの項目を閲覧・変更できるかを正しく制御できていないセキュリティ上の欠陥です。機密データの漏えいや、データの不適切な書き換えにつながるおそれがあります。

このツールはどの2種類の問題を検出しますか?

「Excessive Data Exposure(過剰なデータ露出)」(必要以上の情報をAPIが返してしまう)と「Mass Assignment(一括代入)」(本来変更できないはずの項目のデータをAPIが受け入れ、不適切な変更を許してしまう)の2種類です。

使うのに経験豊富なプログラマーである必要がありますか?

必ずしもそうではありません。このツールはセキュリティ上の問題を見つけるために設計されています。ただし、自動テストの設定と実行には、基本的なプログラミングの知識や、Burp SuiteやPostmanなどのツールの使い方を知っていると役立ちます。

詳細

作者による元の説明

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

人気

GitHubのスター
35k
ランキング
#7806
ライセンス
Apache-2.0
更新日
2026/8/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル