Test hidden features for BAC
When a feature is hidden from the UI for a certain role, try accessing it through the backend API to test for Broken Access Control (BAC). Use a tool like Burp Suite to monitor network traffic and identify the API endpoint responsible for the feature. Then, modify the request to use the authentication token of the restricted role and send it to the API endpoint. If the server accepts the request, it may indicate that the application relies on frontend restrictions and does not properly enforce role-based authorization. Look for a response that indicates the feature is accessible, such as a successful API response or the ability to interact with the feature after refreshing the application.
POST /api/organization/ai/settings HTTP/1.1
Host: target.com
Content-Type: application/json
Authorization: Bearer WORKER_TOKEN
{"organizationId": "ORG_123", "feature": "ai_assistant", "enabled": true, "accessLevel": "admin"}Follow #broken-access-control or #role-based-access-control for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.
Comments
No comments yet.