Chuyển đến nội dung
Skillpedia
Kiểm thử35k · #8382

testing-for-broken-access-control

Skill này làm gì

Công cụ này kiểm tra xem website hoặc ứng dụng có cho phép người dùng có quyền thấp truy cập thông tin hoặc chức năng đáng lẽ bị hạn chế hay không. Nó tìm các lỗ hổng bảo mật có thể làm lộ dữ liệu.

Khi nào nên dùng

  • ✓Khi bạn kiểm thử bảo mật website hoặc ứng dụng có sự cho phép.
  • ✓Khi bạn cần xác minh các loại người dùng khác nhau (ví dụ quản trị viên, khách hàng) có đúng quyền truy cập.
  • ✓Khi bạn muốn đảm bảo ứng dụng phục vụ nhiều công ty không trộn lẫn dữ liệu của họ.

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/testing-for-broken-access-control/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/testing-for-broken-access-control/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 lỗi kiểm soát truy cập trên website thử nghiệm.”

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

Cách hoạt động

Công cụ dùng chương trình Burp Suite với tiện ích mở rộng Authorize. Nó mô phỏng các loại người dùng khác nhau để xem họ có truy cập được những thứ không nên truy cập hay 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.

Testing for Broken Access Control

When to Use

  • During authorized penetration tests as the primary assessment for OWASP A01:2021 - Broken Access Control
  • When evaluating role-based access control (RBAC) implementations across all application endpoints
  • For testing multi-tenant applications where users in one organization should not access another's data
  • When assessing API endpoints for missing or inconsistent authorization checks
  • During security audits where privilege escalation and unauthorized access are primary concerns

Prerequisites

  • Authorization: Written penetration testing agreement for the target
  • Burp Suite Professional: With Authorize extension for automated access control testing
  • Multiple test accounts: Accounts at each role level (admin, manager, user, guest)
  • Application role matrix: Documentation of what each role should and should not access
  • curl/httpie: For manual endpoint testing with different authentication contexts
  • ffuf: For discovering hidden endpoints that may lack access controls

Workflow

Step 1: Map All Endpoints and Create Access Control Matrix

Document every endpoint and the expected access level for each role.

# Extract all endpoints from Burp Site Map
# Target > Site Map > Right-click > Copy URLs in this host

# Build a matrix of endpoints vs roles:
# | Endpoint              | Admin | Manager | User | Guest |
# |-----------------------|-------|---------|------|-------|
# | GET /admin/dashboard  | Allow | Deny    | Deny | Deny  |
# | GET /api/users        | Allow | Allow   | Deny | Deny  |
# | PUT /api/users/{id}   | Allow | Deny    | Own  | Deny  |
# | DELETE /api/posts/{id} | Allow | Allow   | Own  | Deny  |

# Discover hidden endpoints
ffuf -u "https://target.example.com/FUZZ" \
  -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt \
  -mc 200,301,302,403 -fc 404 \
  -H "Authorization: Bearer $USER_TOKEN" \
  -o endpoints.json -of json

# API endpoint discovery
ffuf -u "https://target.example.com/api/v1/FUZZ" \
  -w /usr/share/seclists/Discovery/Web-Content/api/api-endpoints.txt \
  -mc 200,201,204,301,302,401,403,405 -fc 404 \
  -H "Authorization: Bearer $USER_TOKEN"

Step 2: Configure Automated Access Control Testing

Set up Burp Authorize extension for parallel role-based testing.

# Install Authorize extension:
# Burp > Extender > BApp Store > Search "Authorize" > Install

# Configuration for three-tier testing:
# 1. Browse the application as Admin (capture all requests)
# 2. In Authorize tab:
#    a. Add Regular User's session token in "Replace cookies/headers"
#    b. Optionally add a second row for Unauthenticated (no auth header)

# Example header replacement setup:
# Row 1 (Low-privilege user):
#   Cookie: session=low_priv_user_session
#   Authorization: Bearer low_priv_token
#
# Row 2 (Unauthenticated):
#   [Empty - removes all auth headers]

# Enable interception in Authorize:
# - Check "Intercept requests from Proxy"
# - Check "Intercept requests from Repeater"

# Authorize shows results as:
# Green  = Properly restricted (different response for different user)
# Red    = POTENTIALLY VULNERABLE (same response regardless of role)
# Orange = Uncertain (needs manual verification)

Step 3: Test Vertical Privilege Escalation

Attempt to access higher-privilege functionality with lower-privilege accounts.

# Collect tokens for each role
ADMIN_TOKEN="Bearer admin_jwt_here"
MANAGER_TOKEN="Bearer manager_jwt_here"
USER_TOKEN="Bearer user_jwt_here"

# Test admin endpoints with user token
ADMIN_ENDPOINTS=(
  "GET /admin/dashboard"
  "GET /admin/users"
  "POST /admin/users/create"
  "PUT /admin/settings"
  "DELETE /admin/users/5"
  "GET /admin/logs"
  "GET /admin/reports/export"
  "POST /admin/backup"
)

for entry in "${ADMIN_ENDPOINTS[@]}"; do
  method=$(echo "$entry" | cut -d' ' -f1)
  endpoint=$(echo "$entry" | cut -d' ' -f2)
  echo -n "$method $endpoint (as user): "
  status=$(curl -s -o /dev/null -w "%{http_code}" \
    -X "$method" \
    -H "Authorization: $USER_TOKEN" \
    -H "Content-Type: application/json" \
    "https://target.example.com$endpoint")
  if [ "$status" == "200" ] || [ "$status" == "201" ]; then
    echo "VULNERABLE ($status)"
  else
    echo "OK ($status)"
  fi
done

# Test with method override headers
curl -s -o /dev/null -w "%{http_code}" \
  -X POST \
  -H "Authorization: $USER_TOKEN" \
  -H "X-HTTP-Method-Override: DELETE" \

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

Tôi có cần sự cho phép để dùng công cụ này không?

Có, bạn cần giấy ủy quyền bằng văn bản để kiểm thử website hoặc ứng dụng.

Tôi cần cài đặt phần mềm gì?

Bạn cần Burp Suite Professional kèm tiện ích Authorize, cùng các công cụ như curl và ffuf.

“Privilege escalation” và “insecure direct object references” là gì?

Privilege escalation là khi người dùng có quyền thấp giành thêm quyền. Insecure direct object references là khi người dùng có thể truy cập dữ liệu của người khác chỉ bằng cách thay đổi ID trên URL.

Chi tiết

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

Systematically tests web applications and APIs for broken access control (OWASP A01:2021), including privilege escalation, missing function-level checks, insecure direct object references, and multi-tenant data leakage, using Burp Suite with the Authorize extension. Use during authorized penetration tests or RBAC/multi-tenant authorization audits.

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

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