본문으로 건너뛰기
Skillpedia
보안6.5k · #14049

bfla

하는 일

이 안내서는 권한이 낮은 사용자가 관리자 기능을 호출할 수 있는 동작 수준의 접근 제어 실패를 다룹니다. 웹, API, 백그라운드 기능 전반에 걸쳐 역할 규칙을 점검하는 보안 테스터를 위한 가이드입니다.

사용하는 경우

  • ✓허가된 테스트가 일반 사용자가 관리자 전용 동작에 닿을 수 있는지 확인하려 할 때.
  • ✓앱이 관리자 기능을 화면에서 숨기지만 그 호출은 여전히 받아들일 수 있을 때.
  • ✓REST, GraphQL 및 다른 인터페이스에서 역할 규칙을 점검해야 하는 경우.

스킬 링크

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/bfla/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/bfla/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리 앱의 일반 사용자가 요청을 직접 보내서 관리자 전용 동작을 호출할 수 있는지 확인해 주시겠어요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 가치가 높은 동작을 나열하고, 허가된 테스트에서 권한이 낮은 계정으로 각 동작을 보내며, 실패해야 할 때 성공하는 동작을 보고합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Broken Function Level Authorization (BFLA)

BFLA 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.

Authorized use only. Only test systems you are explicitly authorized to assess. Privilege escalation in production without authorization is a crime in most jurisdictions.

Attack Surface

  • REST/JSON admin endpoints hidden from the UI but still live on the server
  • GraphQL mutations and admin fields absent from the published schema but introspectable
  • gRPC methods listed via server reflection that bypass gateway checks
  • WebSocket events where only the handshake was authorized
  • Background job create/finalize/approve endpoints that re-use session but skip role checks
  • Internal microservice RPCs reachable via SSRF or exposed routing
  • Feature flags enforced client-side / at edge but not at the core service

High-Value Actions

  • Role/permission assignment, user impersonation, sudo/su endpoints
  • Refund, credit issuance, price override, order void/cancel
  • Export/bulk-download of all user data or PII
  • Account suspension, deletion, reactivation, verification override
  • Feature flag toggle, quota/grant adjustment, seat/license change
  • 2FA reset, email-change bypass, password-reset initiation for arbitrary accounts
  • Admin console CRUD (create user, delete user, assign group)

Reconnaissance

Build the Actor x Action Matrix

Before fuzzing, enumerate the roles and their expected actions:

# Capture all endpoints from JS bundles, API spec, and crawl
# Extract role-specific API paths from the frontend
curl -s https://<TARGET>/static/main.js | grep -oE '"/api/[^"]*"' | sort -u
curl -s https://<TARGET>/openapi.json 2>/dev/null | python3 -c "
import sys,json
spec = json.load(sys.stdin)
for path,methods in spec.get('paths',{}).items():
    for method,info in methods.items():
        tags = info.get('tags',[]) + info.get('x-roles',[]) + info.get('security',[])
        print(method.upper(), path, tags)
" 2>/dev/null

For each discovered endpoint, note: HTTP method, expected minimum role, whether it appears in the UI for non-admin users.

Obtain Sessions for Each Role

# Register/obtain sessions for: unauthenticated, basic user, premium, staff, admin
# Store cookies/tokens for each role
curl -s -c unauthenticated.jar https://<TARGET>/api/me
curl -s -c basic.jar -X POST https://<TARGET>/login -d 'user=basic&pass=<pass>'
curl -s -c admin.jar  -X POST https://<TARGET>/login -d 'user=admin&pass=<pass>'

Signals That BFLA Is Present

  • Endpoint returns 200 for a lower-role token where 403/401 is expected
  • Different HTTP methods on the same path have inconsistent enforcement (GET allowed, POST blocked — but PATCH is not)
  • Admin endpoints return a different error code (404 vs 403) — "security through obscurity" that still processes the request
  • Background job endpoints return 200 with a task ID even for non-admin callers
  • GraphQL mutation returns data when sent from a basic-user token

Testing Methodology

Step 1: Baseline with Admin Token

Confirm each target action succeeds with the highest-privilege token first. This rules out the action being broken for everyone.

# Example: create a user as admin
curl -s -b admin.jar -X POST https://<TARGET>/api/admin/users \
  -H 'Content-Type: application/json' \
  -d '{"username":"testuser","role":"admin"}' | tee bfla_admin_baseline.txt

Step 2: Replay with Lower-Privilege Token

Replay the identical request with the basic-user or unauthenticated token. Same path, same method, same body.

curl -s -b basic.jar -X POST https://<TARGET>/api/admin/users \
  -H 'Content-Type: application/json' \
  -d '{"username":"testuser2","role":"admin"}' | tee bfla_basic_replay.txt

# Diff: admin got 201 Created, basic should get 403
diff bfla_admin_baseline.txt bfla_basic_replay.txt

Win condition: basic-user request returns 200/201/204 (or produces a durable state change verified by subsequent GET) when the admin baseline returned 201.

Step 3: Method Alternation

Many frameworks register rou

자주 묻는 질문

IDOR와 어떻게 다른가요?

안내서는 IDOR이 특정 객체에 대한 접근에 관한 것이라면, 이 문제는 동작 자체에 관한 것이라고 설명합니다.

숨겨진 기능이 왜 중요한가요?

관리자 엔드포인트가 화면에서는 숨겨져 있어도 서버에서는 여전히 살아 있을 수 있다고 안내서는 설명합니다.

무엇을 강제해야 하나요?

화면이나 게이트웨이만이 아니라, 모든 서비스와 전송 계층에서 역할 검사를 해야 합니다.

상세 정보

작성자의 원본 설명

Broken Function Level Authorization (BFLA) — exploit action-level access control failures where lower-privileged principals invoke admin/staff functions across REST, GraphQL, gRPC, WebSocket, and background job paths.

repo: BitterSecurity/Decepticon

인기도

GitHub 스타
6.5k
순위
#14049
라이선스
Apache-2.0
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬