Help us improve
Share bugs, ideas, or general feedback.
From vuln-scout
Identifies business logic vulnerabilities during whitebox pentesting, analyzing workflows, trust boundaries, state machines, authorization bypasses, and multi-step processes.
npx claudepluginhub allsmog/vuln-scout --plugin whitebox-pentestHow this skill is triggered — by the user, by Claude, or both
Slash command
/vuln-scout:business-logicThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Provide comprehensive knowledge of business logic vulnerabilities - flaws that arise from incorrect assumptions about how users will interact with an application, rather than from traditional injection or parsing errors.
Identifies business logic flaws in web apps allowing price manipulation, workflow bypass, and privilege escalation during authorized penetration tests beyond automated scanners.
Identifies business logic flaws enabling price manipulation, workflow bypass, and privilege escalation during authorized penetration tests.
Guides business logic vulnerability testing for web apps and APIs using WooYun methodology from 22k cases in auth bypass, authorization, payments, info leaks, logic flaws, misconfigs.
Share bugs, ideas, or general feedback.
Provide comprehensive knowledge of business logic vulnerabilities - flaws that arise from incorrect assumptions about how users will interact with an application, rather than from traditional injection or parsing errors.
Key Insight: Unlike technical vulnerabilities (SQLi, XSS), business logic flaws require deep understanding of what the application is supposed to do. You cannot find them without first understanding the application.
Activate this skill when:
Before hunting for business logic bugs:
Trust boundaries exist where:
Common flaw: Backend trusts frontend validation, allowing bypass.
Multi-step processes have states. Vulnerabilities arise from:
| Flaw | Pattern | Impact |
|---|---|---|
| IDOR | Direct object reference without ownership check | Access other users' data |
| Horizontal Privilege Escalation | Role check missing on specific action | Act as peer user |
| Vertical Privilege Escalation | Admin function callable by regular user | Gain admin access |
| Function-Level Access Control | Endpoint has no auth check | Bypass authentication |
| Flaw | Pattern | Impact |
|---|---|---|
| Step Skipping | No enforcement of workflow sequence | Bypass verification steps |
| State Manipulation | Direct modification of state parameters | Change order/payment status |
| Race Conditions | Non-atomic check-then-use | Double-spend, over-redeem |
| Replay Attacks | Action can be repeated without limit | Free resources, repeated discounts |
| Flaw | Pattern | Impact |
|---|---|---|
| Client-Side Validation Only | Backend trusts frontend checks | Bypass all input validation |
| Price Manipulation | Price sent from client | Purchase at arbitrary price |
| Quantity Manipulation | Quantity not validated server-side | Order more than allowed |
| Hidden Field Tampering | User role/ID in hidden field | Impersonate other users |
Identify User Roles
Find Critical Workflows
Document Trust Boundaries
For each critical workflow:
[State A] --action--> [State B] --action--> [State C]
^
|
What prevents:
- Skipping B?
- Reversing to A?
- Racing through B?
Look for:
Develop test cases:
# VULNERABLE - No ownership check
def get_order(order_id):
return Order.query.get(order_id) # Any user can access any order
# SECURE
def get_order(order_id, user):
return Order.query.filter_by(id=order_id, user_id=user.id).first()
# VULNERABLE - Trusting client-provided role
def update_user(request):
user.role = request.data['role'] # User can set their own role!
# SECURE
def update_user(request, current_user):
if current_user.is_admin: # Server-side check
user.role = request.data['role']
# VULNERABLE - State as client parameter
def update_order_status(request, order_id):
order = Order.query.get(order_id)
order.status = request.data['status'] # User can set order to "shipped"!
# SECURE - Server controls state transitions
def ship_order(order_id, admin_user):
if admin_user.has_permission('ship'):
order = Order.query.get(order_id)
if order.status == 'paid': # Valid transition check
order.status = 'shipped'
# Look for direct object access without filtering by user
grep -rniE "\.get\s*\(\s*[a-z_]+_id\s*\)" --include="*.py"
grep -rniE "findById|getById|find\(.*id\)" --include="*.java" --include="*.js"
# Find role/permission checks
grep -rniE "(is_admin|has_role|has_permission|authorize)" --include="*.py" --include="*.java" --include="*.php"
# Find missing auth decorators (compare with route definitions)
grep -rniE "@(login_required|authenticated|requires_auth)" --include="*.py"
# Client-controlled sensitive values
grep -rniE "request\.(data|json|form)\[.*(role|admin|price|discount|status)\]" --include="*.py"
grep -rniE "req\.body\.(role|admin|price|discount|status)" --include="*.js"
# Hidden field patterns in templates
grep -rniE "type=['\"]hidden['\"].*name=['\"].*id" --include="*.html" --include="*.php" --include="*.erb"
# Status/state transitions
grep -rniE "(status|state|step)\s*=\s*(request|req|params)" --include="*.py" --include="*.java" --include="*.php" --include="*.js"
# Workflow step handling
grep -rniE "(step|stage|phase)\s*(==|!=|>=|<=)" --include="*.py" --include="*.java" --include="*.php" --include="*.js"
# Privileged username registration (absence of reserved check is the vulnerability)
grep -rniE "(def|function|func)\s+(register|signup|create_user)" --include="*.py" --include="*.php" --include="*.js" --include="*.go" -A 20 | grep -vE "(reserved|blocked|forbidden)"
# Role injection in registration
grep -rniE "role.*=.*request\.(data|json|form|body)|is_admin.*=.*request" --include="*.py" --include="*.php" --include="*.js"
# Missing username normalization
grep -rniE "username.*=.*request" --include="*.py" --include="*.php" --include="*.js" | grep -v "lower\|upper\|strip"
# Missing rate limiting on registration
grep -rniE "@(app\.|router\.)(route|post).*register" --include="*.py" --include="*.js" | grep -v "limiter\|throttle"
For detailed patterns and examples:
references/workflow-patterns.md - Multi-step process bypass techniquesreferences/trust-boundaries.md - Trust boundary analysis and common flawsreferences/state-machine-bugs.md - State transition vulnerabilities