| name | hunt-broken-function-level-auth |
| description | Hunt broken function-level authorization via verb drift, route shadowing, and transport gaps. |
| category | redteam |
| version | 1.0.0 |
| author | uphiago |
| license | MIT |
| platforms | ["linux"] |
| compatibility | Requires curl, ffuf |
| metadata | {"tags":["redteam","authorization","function-level","API","verb-drift","route-shadowing"],"category":"redteam","related_skills":["hunt-idor","hunt-auth-bypass","hunt-api-misconfig"]} |
Broken Function Level Authorization
Hunt for endpoints where authorization is enforced at the controller/middleware level but bypassed through HTTP verb drift, legacy routes, shadow endpoints, or transport protocol inconsistencies. Unlike IDOR (object-level), this targets ACTION-level authorization — can a user invoke admin functions despite lacking the admin role.
When to Use
- API has distinct user roles (admin, moderator, user) but role checks are per-controller, not per-method.
- Legacy or deprecated endpoints still served behind updated middleware.
- GraphQL, gRPC, and WebSocket transports exist alongside REST APIs without authorization parity.
- Feature flags or beta endpoints expose functionality before security review.
- Batch/job endpoints accept internal requests without role verification.
Quick Detection
for method in GET POST PUT PATCH DELETE OPTIONS; do
curl -sk -X "$method" "https://target.com/api/admin/users" -w "$method %{http_code}\n" -o /dev/null
done
Procedure
Phase 1 — HTTP Verb Drift
ENDPOINTS=(
"/api/admin/users"
"/api/admin/settings"
"/api/manage/orders"
"/api/internal/config"
)
for ep in "${ENDPOINTS[@]}"; do
for method in GET POST PUT PATCH DELETE; do
curl -sk -X "$method" "https://target.com$ep" \
-w "$method $ep — %{http_code}\n" -o /dev/null
curl -sk -X -o /dev/null -w
curl -sk -X -o /dev/null -w