strix-agent 0.1.17__py3-none-any.whl → 0.1.19__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of strix-agent might be problematic. Click here for more details.
- strix/agents/StrixAgent/strix_agent.py +2 -1
- strix/agents/StrixAgent/system_prompt.jinja +8 -10
- strix/agents/base_agent.py +20 -0
- strix/agents/state.py +18 -1
- strix/cli/app.py +92 -15
- strix/cli/main.py +81 -24
- strix/cli/tool_components/base_renderer.py +2 -2
- strix/cli/tool_components/reporting_renderer.py +2 -1
- strix/llm/llm.py +9 -0
- strix/prompts/README.md +64 -0
- strix/prompts/__init__.py +1 -1
- strix/prompts/cloud/.gitkeep +0 -0
- strix/prompts/custom/.gitkeep +0 -0
- strix/prompts/frameworks/fastapi.jinja +142 -0
- strix/prompts/frameworks/nextjs.jinja +126 -0
- strix/prompts/protocols/graphql.jinja +215 -0
- strix/prompts/reconnaissance/.gitkeep +0 -0
- strix/prompts/technologies/firebase_firestore.jinja +177 -0
- strix/prompts/technologies/supabase.jinja +189 -0
- strix/prompts/vulnerabilities/authentication_jwt.jinja +133 -115
- strix/prompts/vulnerabilities/broken_function_level_authorization.jinja +146 -0
- strix/prompts/vulnerabilities/business_logic.jinja +146 -118
- strix/prompts/vulnerabilities/csrf.jinja +137 -131
- strix/prompts/vulnerabilities/idor.jinja +149 -118
- strix/prompts/vulnerabilities/insecure_file_uploads.jinja +188 -0
- strix/prompts/vulnerabilities/mass_assignment.jinja +141 -0
- strix/prompts/vulnerabilities/path_traversal_lfi_rfi.jinja +142 -0
- strix/prompts/vulnerabilities/race_conditions.jinja +135 -165
- strix/prompts/vulnerabilities/rce.jinja +128 -180
- strix/prompts/vulnerabilities/sql_injection.jinja +128 -192
- strix/prompts/vulnerabilities/ssrf.jinja +118 -151
- strix/prompts/vulnerabilities/xss.jinja +144 -196
- strix/prompts/vulnerabilities/xxe.jinja +151 -243
- strix/tools/agents_graph/agents_graph_actions.py +4 -3
- strix/tools/agents_graph/agents_graph_actions_schema.xml +10 -14
- strix/tools/registry.py +1 -1
- {strix_agent-0.1.17.dist-info → strix_agent-0.1.19.dist-info}/METADATA +55 -16
- {strix_agent-0.1.17.dist-info → strix_agent-0.1.19.dist-info}/RECORD +41 -28
- {strix_agent-0.1.17.dist-info → strix_agent-0.1.19.dist-info}/LICENSE +0 -0
- {strix_agent-0.1.17.dist-info → strix_agent-0.1.19.dist-info}/WHEEL +0 -0
- {strix_agent-0.1.17.dist-info → strix_agent-0.1.19.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<broken_function_level_authorization_guide>
|
|
2
|
+
<title>BROKEN FUNCTION LEVEL AUTHORIZATION (BFLA)</title>
|
|
3
|
+
|
|
4
|
+
<critical>BFLA is action-level authorization failure: callers invoke functions (endpoints, mutations, admin tools) they are not entitled to. It appears when enforcement differs across transports, gateways, roles, or when services trust client hints. Bind subject × action at the service that performs the action.</critical>
|
|
5
|
+
|
|
6
|
+
<scope>
|
|
7
|
+
- Vertical authz: privileged/admin/staff-only actions reachable by basic users
|
|
8
|
+
- Feature gates: toggles enforced at edge/UI, not at core services
|
|
9
|
+
- Transport drift: REST vs GraphQL vs gRPC vs WebSocket with inconsistent checks
|
|
10
|
+
- Gateway trust: backends trust X-User-Id/X-Role injected by proxies/edges
|
|
11
|
+
- Background workers/jobs performing actions without re-checking authz
|
|
12
|
+
</scope>
|
|
13
|
+
|
|
14
|
+
<methodology>
|
|
15
|
+
1. Build an Actor × Action matrix with at least: unauth, basic, premium, staff/admin. Enumerate actions (create/update/delete, approve/cancel, impersonate, export, invite, role-change, credit/refund).
|
|
16
|
+
2. Obtain tokens/sessions for each role. Exercise every action across all transports and encodings (JSON, form, multipart), including method overrides.
|
|
17
|
+
3. Vary headers and contextual selectors (org/tenant/project) and test behavior behind gateway vs direct-to-service.
|
|
18
|
+
4. Include background flows: job creation/finalization, webhooks, queues. Confirm re-validation of authz in consumers.
|
|
19
|
+
</methodology>
|
|
20
|
+
|
|
21
|
+
<discovery_techniques>
|
|
22
|
+
<surface_enumeration>
|
|
23
|
+
- Admin/staff consoles and APIs, support tools, internal-only endpoints exposed via gateway
|
|
24
|
+
- Hidden buttons and disabled UI paths (feature-flagged) mapped to still-live endpoints
|
|
25
|
+
- GraphQL schemas: mutations and admin-only fields/types; gRPC service descriptors (reflection)
|
|
26
|
+
- Mobile clients often reveal extra endpoints/roles in app bundles or network logs
|
|
27
|
+
</surface_enumeration>
|
|
28
|
+
|
|
29
|
+
<signals>
|
|
30
|
+
- 401/403 on UI but 200 via direct API call; differing status codes across transports
|
|
31
|
+
- Actions succeed via background jobs when direct call is denied
|
|
32
|
+
- Changing only headers (role/org) alters access without token change
|
|
33
|
+
</signals>
|
|
34
|
+
|
|
35
|
+
<high_value_actions>
|
|
36
|
+
- Role/permission changes, impersonation/sudo, invite/accept into orgs
|
|
37
|
+
- Approve/void/refund/credit issuance, price/plan overrides
|
|
38
|
+
- Export/report generation, data deletion, account suspension/reactivation
|
|
39
|
+
- Feature flag toggles, quota/grant adjustments, license/seat changes
|
|
40
|
+
- Security settings: 2FA reset, email/phone verification overrides
|
|
41
|
+
</high_value_actions>
|
|
42
|
+
|
|
43
|
+
<exploitation_techniques>
|
|
44
|
+
<verb_drift_and_aliases>
|
|
45
|
+
- Alternate methods: GET performing state change; POST vs PUT vs PATCH differences; X-HTTP-Method-Override/_method
|
|
46
|
+
- Alternate endpoints performing the same action with weaker checks (legacy vs v2, mobile vs web)
|
|
47
|
+
</verb_drift_and_aliases>
|
|
48
|
+
|
|
49
|
+
<edge_vs_core_mismatch>
|
|
50
|
+
- Edge blocks an action but core service RPC accepts it directly; call internal service via exposed API route or SSRF
|
|
51
|
+
- Gateway-injected identity headers override token claims; supply conflicting headers to test precedence
|
|
52
|
+
</edge_vs_core_mismatch>
|
|
53
|
+
|
|
54
|
+
<feature_flag_bypass>
|
|
55
|
+
- Client-checked feature gates; call backend endpoints directly
|
|
56
|
+
- Admin-only mutations exposed but hidden in UI; invoke via GraphQL or gRPC tools
|
|
57
|
+
</feature_flag_bypass>
|
|
58
|
+
|
|
59
|
+
<batch_job_paths>
|
|
60
|
+
- Create export/import jobs where creation is allowed but finalize/approve lacks authz; finalize others' jobs
|
|
61
|
+
- Replay webhooks/background tasks endpoints that perform privileged actions without verifying caller
|
|
62
|
+
</batch_job_paths>
|
|
63
|
+
|
|
64
|
+
<content_type_paths>
|
|
65
|
+
- JSON vs form vs multipart handlers using different middleware: send the action via the most permissive parser
|
|
66
|
+
</content_type_paths>
|
|
67
|
+
</exploitation_techniques>
|
|
68
|
+
|
|
69
|
+
<advanced_techniques>
|
|
70
|
+
<graphql>
|
|
71
|
+
- Resolver-level checks per mutation/field; do not assume top-level auth covers nested mutations or admin fields
|
|
72
|
+
- Abuse aliases/batching to sneak privileged fields; persisted queries sometimes bypass auth transforms
|
|
73
|
+
- Example:
|
|
74
|
+
{% raw %}
|
|
75
|
+
mutation Promote($id:ID!){
|
|
76
|
+
a: updateUser(id:$id, role: ADMIN){ id role }
|
|
77
|
+
}
|
|
78
|
+
{% endraw %}
|
|
79
|
+
</graphql>
|
|
80
|
+
|
|
81
|
+
<grpc>
|
|
82
|
+
- Method-level auth via interceptors must enforce audience/roles; probe direct gRPC with tokens of lower role
|
|
83
|
+
- Reflection lists services/methods; call admin methods that the gateway hid
|
|
84
|
+
</grpc>
|
|
85
|
+
|
|
86
|
+
<websocket>
|
|
87
|
+
- Handshake-only auth: ensure per-message authorization on privileged events (e.g., admin:impersonate)
|
|
88
|
+
- Try emitting privileged actions after joining standard channels
|
|
89
|
+
</websocket>
|
|
90
|
+
|
|
91
|
+
<multi_tenant>
|
|
92
|
+
- Actions requiring tenant admin enforced only by header/subdomain; attempt cross-tenant admin actions by switching selectors with same token
|
|
93
|
+
</multi_tenant>
|
|
94
|
+
|
|
95
|
+
<microservices>
|
|
96
|
+
- Internal RPCs trust upstream checks; reach them through exposed endpoints or SSRF; verify each service re-enforces authz
|
|
97
|
+
</microservices>
|
|
98
|
+
|
|
99
|
+
<bypass_techniques>
|
|
100
|
+
<header_trust>
|
|
101
|
+
- Supply X-User-Id/X-Role/X-Organization headers; remove or contradict token claims; observe which source wins
|
|
102
|
+
</header_trust>
|
|
103
|
+
|
|
104
|
+
<route_shadowing>
|
|
105
|
+
- Legacy/alternate routes (e.g., /admin/v1 vs /v2/admin) that skip new middleware chains
|
|
106
|
+
</route_shadowing>
|
|
107
|
+
|
|
108
|
+
<idempotency_and_retries>
|
|
109
|
+
- Retry or replay finalize/approve endpoints that apply state without checking actor on each call
|
|
110
|
+
</idempotency_and_retries>
|
|
111
|
+
|
|
112
|
+
<cache_key_confusion>
|
|
113
|
+
- Cached authorization decisions at edge leading to cross-user reuse; test with Vary and session swaps
|
|
114
|
+
</cache_key_confusion>
|
|
115
|
+
</bypass_techniques>
|
|
116
|
+
|
|
117
|
+
<validation>
|
|
118
|
+
1. Show a lower-privileged principal successfully invokes a restricted action (same inputs) while the proper role succeeds and another lower role fails.
|
|
119
|
+
2. Provide evidence across at least two transports or encodings demonstrating inconsistent enforcement.
|
|
120
|
+
3. Demonstrate that removing/altering client-side gates (buttons/flags) does not affect backend success.
|
|
121
|
+
4. Include durable state change proof: before/after snapshots, audit logs, and authoritative sources.
|
|
122
|
+
</validation>
|
|
123
|
+
|
|
124
|
+
<false_positives>
|
|
125
|
+
- Read-only endpoints mislabeled as admin but publicly documented
|
|
126
|
+
- Feature toggles intentionally open to all roles for preview/beta with clear policy
|
|
127
|
+
- Simulated environments where admin endpoints are stubbed with no side effects
|
|
128
|
+
</false_positives>
|
|
129
|
+
|
|
130
|
+
<impact>
|
|
131
|
+
- Privilege escalation to admin/staff actions
|
|
132
|
+
- Monetary/state impact: refunds/credits/approvals without authorization
|
|
133
|
+
- Tenant-wide configuration changes, impersonation, or data deletion
|
|
134
|
+
- Compliance and audit violations due to bypassed approval workflows
|
|
135
|
+
</impact>
|
|
136
|
+
|
|
137
|
+
<pro_tips>
|
|
138
|
+
1. Start from the role matrix; test every action with basic vs admin tokens across REST/GraphQL/gRPC.
|
|
139
|
+
2. Diff middleware stacks between routes; weak chains often exist on legacy or alternate encodings.
|
|
140
|
+
3. Inspect gateways for identity header injection; never trust client-provided identity.
|
|
141
|
+
4. Treat jobs/webhooks as first-class: finalize/approve must re-check the actor.
|
|
142
|
+
5. Prefer minimal PoCs: one request that flips a privileged field or invokes an admin method with a basic token.
|
|
143
|
+
</pro_tips>
|
|
144
|
+
|
|
145
|
+
<remember>Authorization must bind the actor to the specific action at the service boundary on every request and message. UI gates, gateways, or prior steps do not substitute for function-level checks.</remember>
|
|
146
|
+
</broken_function_level_authorization_guide>
|
|
@@ -1,143 +1,171 @@
|
|
|
1
1
|
<business_logic_flaws_guide>
|
|
2
|
-
<title>BUSINESS LOGIC FLAWS
|
|
3
|
-
|
|
4
|
-
<critical>Business logic flaws
|
|
2
|
+
<title>BUSINESS LOGIC FLAWS</title>
|
|
3
|
+
|
|
4
|
+
<critical>Business logic flaws exploit intended functionality to violate domain invariants: move money without paying, exceed limits, retain privileges, or bypass reviews. They require a model of the business, not just payloads.</critical>
|
|
5
|
+
|
|
6
|
+
<scope>
|
|
7
|
+
- Financial logic: pricing, discounts, payments, refunds, credits, chargebacks
|
|
8
|
+
- Account lifecycle: signup, upgrade/downgrade, trial, suspension, deletion
|
|
9
|
+
- Authorization-by-logic: feature gates, role transitions, approval workflows
|
|
10
|
+
- Quotas/limits: rate/usage limits, inventory, entitlements, seat licensing
|
|
11
|
+
- Multi-tenant isolation: cross-organization data or action bleed
|
|
12
|
+
- Event-driven flows: jobs, webhooks, sagas, compensations, idempotency
|
|
13
|
+
</scope>
|
|
14
|
+
|
|
15
|
+
<methodology>
|
|
16
|
+
1. Enumerate a state machine per critical workflow (states, transitions, pre/post-conditions). Note invariants (e.g., "refund ≤ captured amount").
|
|
17
|
+
2. Build an Actor × Action × Resource matrix with at least: unauth, basic user, premium, staff/admin; identify actions per role.
|
|
18
|
+
3. For each transition, test step skipping, repetition, reordering, and late mutation (modify inputs after validation but before commit).
|
|
19
|
+
4. Introduce time, concurrency, and channel variance: repeat with parallel requests, different content-types, mobile/web/API/GraphQL.
|
|
20
|
+
5. Validate persistence boundaries: verify that all services, queues, and jobs re-enforce invariants (no trust in upstream validation).
|
|
21
|
+
</methodology>
|
|
5
22
|
|
|
6
23
|
<discovery_techniques>
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
|
|
24
|
+
<workflow_mapping>
|
|
25
|
+
- Derive endpoints from the UI and proxy/network logs; map hidden/undocumented API calls, especially finalize/confirm endpoints
|
|
26
|
+
- Identify tokens/flags: stepToken, paymentIntentId, orderStatus, reviewState, approvalId; test reuse across users/sessions
|
|
27
|
+
- Document invariants: conservation of value (ledger balance), uniqueness (idempotency), monotonicity (non-decreasing counters), exclusivity (one active subscription)
|
|
28
|
+
</workflow_mapping>
|
|
29
|
+
|
|
30
|
+
<input_surface>
|
|
31
|
+
- Hidden fields and client-computed totals; server must recompute on trusted sources
|
|
32
|
+
- Alternate encodings and shapes: arrays instead of scalars, objects with unexpected keys, null/empty/0/negative, scientific notation
|
|
33
|
+
- Business selectors: currency, locale, timezone, tax region; vary to trigger rounding and ruleset changes
|
|
34
|
+
</input_surface>
|
|
35
|
+
|
|
36
|
+
<state_time_axes>
|
|
37
|
+
- Replays: resubmit stale finalize/confirm requests
|
|
38
|
+
- Out-of-order: call finalize before verify; refund before capture; cancel after ship
|
|
39
|
+
- Time windows: end-of-day/month cutovers, daylight saving, grace periods, trial expiry edges
|
|
40
|
+
</state_time_axes>
|
|
12
41
|
</discovery_techniques>
|
|
13
42
|
|
|
14
43
|
<high_value_targets>
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<account_management>
|
|
24
|
-
- Registration race conditions (same email/username)
|
|
25
|
-
- Account type elevation
|
|
26
|
-
- Trial period extension
|
|
27
|
-
- Subscription downgrade with feature retention
|
|
28
|
-
</account_management>
|
|
29
|
-
|
|
30
|
-
<authorization_flaws>
|
|
31
|
-
- Function-level bypass (accessing admin functions as user)
|
|
32
|
-
- Object reference manipulation
|
|
33
|
-
- Permission inheritance bugs
|
|
34
|
-
- Multi-tenancy isolation failures
|
|
35
|
-
</authorization_flaws>
|
|
44
|
+
- Pricing/cart: price locks, quote to order, tax/shipping computation
|
|
45
|
+
- Discount engines: stacking, mutual exclusivity, scope (cart vs item), once-per-user enforcement
|
|
46
|
+
- Payments: auth/capture/void/refund sequences, partials, split tenders, chargebacks, idempotency keys
|
|
47
|
+
- Credits/gift cards/vouchers: issuance, redemption, reversal, expiry, transferability
|
|
48
|
+
- Subscriptions: proration, upgrade/downgrade, trial extension, seat counts, meter reporting
|
|
49
|
+
- Refunds/returns/RMAs: multi-item partials, restocking fees, return window edges
|
|
50
|
+
- Admin/staff operations: impersonation, manual adjustments, credit/refund issuance, account flags
|
|
51
|
+
- Quotas/limits: daily/monthly usage, inventory reservations, feature usage counters
|
|
36
52
|
</high_value_targets>
|
|
37
53
|
|
|
38
54
|
<exploitation_techniques>
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
<
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- Complete order before payment
|
|
73
|
-
- Partial payment acceptance
|
|
74
|
-
- Payment replay attacks
|
|
75
|
-
- Void after delivery
|
|
76
|
-
- Refund more than paid
|
|
77
|
-
</payment_processing>
|
|
78
|
-
|
|
79
|
-
<user_lifecycle>
|
|
80
|
-
- Premium features in trial
|
|
81
|
-
- Account deletion bypasses
|
|
82
|
-
- Privilege retention after demotion
|
|
83
|
-
- Transfer restrictions bypass
|
|
84
|
-
</user_lifecycle>
|
|
85
|
-
</common_flaws>
|
|
55
|
+
<state_machine_abuse>
|
|
56
|
+
- Skip or reorder steps via direct API calls; verify server enforces preconditions on each transition
|
|
57
|
+
- Replay prior steps with altered parameters (e.g., swap price after approval but before capture)
|
|
58
|
+
- Split a single constrained action into many sub-actions under the threshold (limit slicing)
|
|
59
|
+
</state_machine_abuse>
|
|
60
|
+
|
|
61
|
+
<concurrency_and_idempotency>
|
|
62
|
+
- Parallelize identical operations to bypass atomic checks (create, apply, redeem, transfer)
|
|
63
|
+
- Abuse idempotency: key scoped to path but not principal → reuse other users' keys; or idempotency stored only in cache
|
|
64
|
+
- Message reprocessing: queue workers re-run tasks on retry without idempotent guards; cause duplicate fulfillment/refund
|
|
65
|
+
</concurrency_and_idempotency>
|
|
66
|
+
|
|
67
|
+
<numeric_and_currency>
|
|
68
|
+
- Floating point vs decimal rounding; rounding/truncation favoring attacker at boundaries
|
|
69
|
+
- Cross-currency arbitrage: buy in currency A, refund in B at stale rates; tax rounding per-item vs per-order
|
|
70
|
+
- Negative amounts, zero-price, free shipping thresholds, minimum/maximum guardrails
|
|
71
|
+
</numeric_and_currency>
|
|
72
|
+
|
|
73
|
+
<quotas_limits_inventory>
|
|
74
|
+
- Off-by-one and time-bound resets (UTC vs local); pre-warm at T-1s and post-fire at T+1s
|
|
75
|
+
- Reservation/hold leaks: reserve multiple, complete one, release not enforced; backorder logic inconsistencies
|
|
76
|
+
- Distributed counters without strong consistency enabling double-consumption
|
|
77
|
+
</quotas_limits_inventory>
|
|
78
|
+
|
|
79
|
+
<refunds_chargebacks>
|
|
80
|
+
- Double-refund: refund via UI and support tool; refund partials summing above captured amount
|
|
81
|
+
- Refund after benefits consumed (downloaded digital goods, shipped items) due to missing post-consumption checks
|
|
82
|
+
</refunds_chargebacks>
|
|
83
|
+
|
|
84
|
+
<feature_gates_and_roles>
|
|
85
|
+
- Feature flags enforced client-side or at edge but not in core services; toggle names guessed or fallback to default-enabled
|
|
86
|
+
- Role transitions leaving stale capabilities (retain premium after downgrade; retain admin endpoints after demotion)
|
|
87
|
+
</feature_gates_and_roles>
|
|
86
88
|
|
|
87
89
|
<advanced_techniques>
|
|
88
|
-
<
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
90
|
+
<event_driven_sagas>
|
|
91
|
+
- Saga/compensation gaps: trigger compensation without original success; or execute success twice without compensation
|
|
92
|
+
- Outbox/Inbox patterns missing idempotency → duplicate downstream side effects
|
|
93
|
+
- Cron/backfill jobs operating outside request-time authorization; mutate state broadly
|
|
94
|
+
</event_driven_sagas>
|
|
95
|
+
|
|
96
|
+
<microservices_boundaries>
|
|
97
|
+
- Cross-service assumption mismatch: one service validates total, another trusts line items; alter between calls
|
|
98
|
+
- Header trust: internal services trusting X-Role or X-User-Id from untrusted edges
|
|
99
|
+
- Partial failure windows: two-phase actions where phase 1 commits without phase 2, leaving exploitable intermediate state
|
|
100
|
+
</microservices_boundaries>
|
|
101
|
+
|
|
102
|
+
<multi_tenant_isolation>
|
|
103
|
+
- Tenant-scoped counters and credits updated without tenant key in the where-clause; leak across orgs
|
|
104
|
+
- Admin aggregate views allowing actions that impact other tenants due to missing per-tenant enforcement
|
|
105
|
+
</multi_tenant_isolation>
|
|
106
|
+
|
|
107
|
+
<bypass_techniques>
|
|
108
|
+
- Content-type switching (json/form/multipart) to hit different code paths
|
|
109
|
+
- Method alternation (GET performing state change; overrides via X-HTTP-Method-Override)
|
|
110
|
+
- Client recomputation: totals, taxes, discounts computed on client and accepted by server
|
|
111
|
+
- Cache/gateway differentials: stale decisions from CDN/APIM that are not identity-aware
|
|
112
|
+
</bypass_techniques>
|
|
113
|
+
|
|
114
|
+
<special_contexts>
|
|
115
|
+
<ecommerce>
|
|
116
|
+
- Stack incompatible discounts via parallel apply; remove qualifying item after discount applied; retain free shipping after cart changes
|
|
117
|
+
- Modify shipping tier post-quote; abuse returns to keep product and refund
|
|
118
|
+
</ecommerce>
|
|
119
|
+
|
|
120
|
+
<banking_fintech>
|
|
121
|
+
- Split transfers to bypass per-transaction threshold; schedule vs instant path inconsistencies
|
|
122
|
+
- Exploit grace periods on holds/authorizations to withdraw again before settlement
|
|
123
|
+
</banking_fintech>
|
|
124
|
+
|
|
125
|
+
<saas_b2b>
|
|
126
|
+
- Seat licensing: race seat assignment to exceed purchased seats; stale license checks in background tasks
|
|
127
|
+
- Usage metering: report late or duplicate usage to avoid billing or to over-consume
|
|
128
|
+
</saas_b2b>
|
|
129
|
+
</special_contexts>
|
|
130
|
+
|
|
131
|
+
<chaining_attacks>
|
|
132
|
+
- Business logic + race: duplicate benefits before state updates
|
|
133
|
+
- Business logic + IDOR: operate on others' resources once a workflow leak reveals IDs
|
|
134
|
+
- Business logic + CSRF: force a victim to complete a sensitive step sequence
|
|
135
|
+
</chaining_attacks>
|
|
102
136
|
|
|
103
137
|
<validation>
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
4. Document assumption violation
|
|
109
|
-
5. Quantify potential damage
|
|
138
|
+
1. Show an invariant violation (e.g., two refunds for one charge, negative inventory, exceeding quotas).
|
|
139
|
+
2. Provide side-by-side evidence for intended vs abused flows with the same principal.
|
|
140
|
+
3. Demonstrate durability: the undesired state persists and is observable in authoritative sources (ledger, emails, admin views).
|
|
141
|
+
4. Quantify impact per action and at scale (unit loss × feasible repetitions).
|
|
110
142
|
</validation>
|
|
111
143
|
|
|
112
144
|
<false_positives>
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
- Only affects display/UI
|
|
117
|
-
- No security impact
|
|
118
|
-
- Requires privileged access
|
|
145
|
+
- Promotional behavior explicitly allowed by policy (documented free trials, goodwill credits)
|
|
146
|
+
- Visual-only inconsistencies with no durable or exploitable state change
|
|
147
|
+
- Admin-only operations with proper audit and approvals
|
|
119
148
|
</false_positives>
|
|
120
149
|
|
|
121
150
|
<impact>
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
- Reputation damage
|
|
151
|
+
- Direct financial loss (fraud, arbitrage, over-refunds, unpaid consumption)
|
|
152
|
+
- Regulatory/contractual violations (billing accuracy, consumer protection)
|
|
153
|
+
- Denial of inventory/services to legitimate users through resource exhaustion
|
|
154
|
+
- Privilege retention or unauthorized access to premium features
|
|
127
155
|
</impact>
|
|
128
156
|
|
|
129
157
|
<pro_tips>
|
|
130
|
-
1.
|
|
131
|
-
2.
|
|
132
|
-
3.
|
|
133
|
-
4.
|
|
134
|
-
5.
|
|
135
|
-
6.
|
|
136
|
-
7.
|
|
137
|
-
8.
|
|
138
|
-
9.
|
|
139
|
-
10.
|
|
158
|
+
1. Start from invariants and ledgers, not UI—prove conservation of value breaks.
|
|
159
|
+
2. Test with time and concurrency; many bugs only appear under pressure.
|
|
160
|
+
3. Recompute totals server-side; never accept client math—flag when you observe otherwise.
|
|
161
|
+
4. Treat idempotency and retries as first-class: verify key scope and persistence.
|
|
162
|
+
5. Probe background workers and webhooks separately; they often skip auth and rule checks.
|
|
163
|
+
6. Validate role/feature gates at the service that mutates state, not only at the edge.
|
|
164
|
+
7. Explore end-of-period edges (month-end, trial end, DST) for rounding and window issues.
|
|
165
|
+
8. Use minimal, auditable PoCs that demonstrate durable state change and exact loss.
|
|
166
|
+
9. Chain with authorization tests (IDOR/Function-level access) to magnify impact.
|
|
167
|
+
10. When in doubt, map the state machine; gaps appear where transitions lack server-side guards.
|
|
140
168
|
</pro_tips>
|
|
141
169
|
|
|
142
|
-
<remember>Business logic
|
|
170
|
+
<remember>Business logic security is the enforcement of domain invariants under adversarial sequencing, timing, and inputs. If any step trusts the client or prior steps, expect abuse.</remember>
|
|
143
171
|
</business_logic_flaws_guide>
|