bfla
ما الذي تفعله
يغطي هذا الدليل فشل التحكم بالوصول على مستوى الإجراء، حيث يستطيع مستخدم بصلاحيات أقل استدعاء دالة إدارية. وهو موجه لمختبري الأمان الذين يفحصون قواعد الأدوار عبر الويب والواجهات البرمجية والوظائف الخلفية.
متى تستخدمها
- ✓عندما يريد اختبار مصرح به التحقق من أن المستخدمين العاديين لا يستطيعون الوصول إلى الإجراءات المخصصة للمسؤولين.
- ✓عندما يُخفي التطبيق ميزات الإدارة في الواجهة لكنه قد يقبل الاستدعاءات نفسها.
- ✓عندما تحتاج إلى فحص قواعد الأدوار عبر REST وGraphQL والواجهات الأخرى.
رابط المهارة
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/bfla/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“هل يستطيع مستخدم عادي في تطبيقنا استدعاء إجراءات المسؤولين بإرسال طلبات مباشرة؟ يرجى الفحص.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يسرد الوكيل الإجراءات عالية القيمة، ويرسل كل واحد باستخدام حساب بصلاحيات أقل في اختبار مصرح به، ويبلغ عن الإجراءات التي تنجح وهي يجب ألا تنجح.
المحتوى التقني (ملف 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.
الشعبية
- نجوم GitHub
- 6.5k
- الترتيب
- #14049
- الترخيص
- Apache-2.0
- آخر تحديث
- 1/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
detector-overview
6.5kيساعد وكيلك على قراءة الكود الذي أبلغ عنه فاحص أمني، وتحديد أي المواضع المُعلَّمة ثغرات أمنية حقيقية وأيها إنذارات كاذبة.
exploiter-overview
6.5kيساعد وكيلك على ربط عدة نقاط ضعف أمنية مؤكدة في سلسلة اختبار واحدة، ومعرفة مدى وصول هذه السلسلة.
llm-redteam-overview
6.5kيساعد وكيلك على إيجاد دليل الاختبار الأحمر المناسب للذكاء الاصطناعي، ويغطي 15 مجموعة تكتيكية من حقن الأوامر إلى إساءة استخدام النموذج.
aatmf-t01-prompt-injection
6.5kيشرح حقن الأوامر، حيث تحاول تعليمات مخفية تجاوز نظام الذكاء الاصطناعي، حتى يتمكن مختبرو الأمان من فحصه.
مهارات مشابهة
reverse-engineer-anything
422kيساعد وكيلك على فحص التطبيقات والحزم المنشورة من الداخل ليشرح الميزات ويقارن الإصدارات ويرشد إلى إعادة البناء، باستخدام أداة REA.
1password
394kيساعد وكيلك على إعداد واجهة سطر أوامر 1Password وتسجيل الدخول، وقراءة الأسرار أو حقنها دون طباعة قيمها في المحادثة.
healthcheck
394kيساعد وكيلك على تدقيق جهاز OpenClaw أو خادمه أمنيًا، مثل SSH والجدار الناري والتحديثات، ويقترح إصلاحات آمنة قابلة للتراجع.