strix-agent 0.1.18__py3-none-any.whl → 0.3.1__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 +49 -39
- strix/agents/StrixAgent/system_prompt.jinja +23 -10
- strix/agents/base_agent.py +90 -10
- strix/agents/state.py +23 -2
- strix/interface/cli.py +171 -0
- strix/interface/main.py +482 -0
- strix/{cli → interface}/tool_components/base_renderer.py +2 -2
- strix/{cli → interface}/tool_components/reporting_renderer.py +2 -1
- strix/{cli → interface}/tool_components/scan_info_renderer.py +17 -12
- strix/{cli/app.py → interface/tui.py} +107 -31
- strix/interface/utils.py +435 -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/runtime/docker_runtime.py +28 -7
- strix/runtime/runtime.py +4 -1
- strix/telemetry/__init__.py +4 -0
- strix/{cli → telemetry}/tracer.py +21 -9
- strix/tools/agents_graph/agents_graph_actions.py +17 -12
- strix/tools/agents_graph/agents_graph_actions_schema.xml +10 -14
- strix/tools/executor.py +1 -1
- strix/tools/finish/finish_actions.py +1 -1
- strix/tools/registry.py +1 -1
- strix/tools/reporting/reporting_actions.py +1 -1
- {strix_agent-0.1.18.dist-info → strix_agent-0.3.1.dist-info}/METADATA +95 -15
- strix_agent-0.3.1.dist-info/RECORD +115 -0
- strix_agent-0.3.1.dist-info/entry_points.txt +3 -0
- strix/cli/main.py +0 -702
- strix_agent-0.1.18.dist-info/RECORD +0 -99
- strix_agent-0.1.18.dist-info/entry_points.txt +0 -3
- /strix/{cli → interface}/__init__.py +0 -0
- /strix/{cli/assets/cli.tcss → interface/assets/tui_styles.tcss} +0 -0
- /strix/{cli → interface}/tool_components/__init__.py +0 -0
- /strix/{cli → interface}/tool_components/agents_graph_renderer.py +0 -0
- /strix/{cli → interface}/tool_components/browser_renderer.py +0 -0
- /strix/{cli → interface}/tool_components/file_edit_renderer.py +0 -0
- /strix/{cli → interface}/tool_components/finish_renderer.py +0 -0
- /strix/{cli → interface}/tool_components/notes_renderer.py +0 -0
- /strix/{cli → interface}/tool_components/proxy_renderer.py +0 -0
- /strix/{cli → interface}/tool_components/python_renderer.py +0 -0
- /strix/{cli → interface}/tool_components/registry.py +0 -0
- /strix/{cli → interface}/tool_components/terminal_renderer.py +0 -0
- /strix/{cli → interface}/tool_components/thinking_renderer.py +0 -0
- /strix/{cli → interface}/tool_components/user_message_renderer.py +0 -0
- /strix/{cli → interface}/tool_components/web_search_renderer.py +0 -0
- {strix_agent-0.1.18.dist-info → strix_agent-0.3.1.dist-info}/LICENSE +0 -0
- {strix_agent-0.1.18.dist-info → strix_agent-0.3.1.dist-info}/WHEEL +0 -0
|
@@ -1,168 +1,174 @@
|
|
|
1
1
|
<csrf_vulnerability_guide>
|
|
2
|
-
<title>CROSS-SITE REQUEST FORGERY (CSRF)
|
|
2
|
+
<title>CROSS-SITE REQUEST FORGERY (CSRF)</title>
|
|
3
3
|
|
|
4
|
-
<critical>CSRF
|
|
4
|
+
<critical>CSRF abuses ambient authority (cookies, HTTP auth) across origins. Do not rely on CORS alone; enforce non-replayable tokens and strict origin checks for every state change.</critical>
|
|
5
|
+
|
|
6
|
+
<scope>
|
|
7
|
+
- Web apps with cookie-based sessions and HTTP auth
|
|
8
|
+
- JSON/REST, GraphQL (GET/persisted queries), file upload endpoints
|
|
9
|
+
- Authentication flows: login/logout, password/email change, MFA toggles
|
|
10
|
+
- OAuth/OIDC: authorize, token, logout, disconnect/connect
|
|
11
|
+
</scope>
|
|
12
|
+
|
|
13
|
+
<methodology>
|
|
14
|
+
1. Inventory all state-changing endpoints (including admin/staff) and note method, content-type, and whether they are reachable via top-level navigation or simple requests (no preflight).
|
|
15
|
+
2. For each, determine session model (cookies with SameSite attrs, custom headers, tokens) and whether server enforces anti-CSRF tokens and Origin/Referer.
|
|
16
|
+
3. Attempt preflightless delivery (form POST, text/plain, multipart/form-data) and top-level GET navigation.
|
|
17
|
+
4. Validate across browsers; behavior differs by SameSite and navigation context.
|
|
18
|
+
</methodology>
|
|
5
19
|
|
|
6
20
|
<high_value_targets>
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- Privacy settings modification
|
|
15
|
-
- Admin functions
|
|
16
|
-
- File uploads/deletions
|
|
21
|
+
- Credentials and profile changes (email/password/phone)
|
|
22
|
+
- Payment and money movement, subscription/plan changes
|
|
23
|
+
- API key/secret generation, PAT rotation, SSH keys
|
|
24
|
+
- 2FA/TOTP enable/disable; backup codes; device trust
|
|
25
|
+
- OAuth connect/disconnect; logout; account deletion
|
|
26
|
+
- Admin/staff actions and impersonation flows
|
|
27
|
+
- File uploads/deletes; access control changes
|
|
17
28
|
</high_value_targets>
|
|
18
29
|
|
|
19
30
|
<discovery_techniques>
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
<session_and_cookies>
|
|
32
|
+
- Inspect cookies: HttpOnly, Secure, SameSite (Strict/Lax/None). Note that Lax allows cookies on top-level cross-site GET; None requires Secure.
|
|
33
|
+
- Determine if Authorization headers or bearer tokens are used (generally not CSRF-prone) versus cookies (CSRF-prone).
|
|
34
|
+
</session_and_cookies>
|
|
35
|
+
|
|
36
|
+
<token_and_header_checks>
|
|
37
|
+
- Locate anti-CSRF tokens (hidden inputs, meta tags, custom headers). Test removal, reuse across requests, reuse across sessions, and binding to method/path.
|
|
38
|
+
- Verify server checks Origin and/or Referer on state changes; test null/missing and cross-origin values.
|
|
39
|
+
</token_and_header_checks>
|
|
40
|
+
|
|
41
|
+
<method_and_content_types>
|
|
42
|
+
- Confirm whether GET, HEAD, or OPTIONS perform state changes.
|
|
43
|
+
- Try simple content-types to avoid preflight: application/x-www-form-urlencoded, multipart/form-data, text/plain.
|
|
44
|
+
- Probe parsers that auto-coerce text/plain or form-encoded bodies into JSON.
|
|
45
|
+
</method_and_content_types>
|
|
46
|
+
|
|
47
|
+
<cors_profile>
|
|
48
|
+
- Identify Access-Control-Allow-Origin and -Credentials. Overly permissive CORS is not a CSRF fix and can turn CSRF into data exfiltration.
|
|
49
|
+
- Test per-endpoint CORS differences; preflight vs simple request behavior can diverge.
|
|
50
|
+
</cors_profile>
|
|
36
51
|
</discovery_techniques>
|
|
37
52
|
|
|
38
53
|
<exploitation_techniques>
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
<navigation_csrf>
|
|
55
|
+
- Auto-submitting form to target origin; works when cookies are sent and no token/origin checks are enforced.
|
|
56
|
+
- Top-level GET navigation can trigger state if server misuses GET or links actions to GET callbacks.
|
|
57
|
+
</navigation_csrf>
|
|
58
|
+
|
|
59
|
+
<simple_ct_csrf>
|
|
60
|
+
- application/x-www-form-urlencoded and multipart/form-data POSTs do not require preflight; prefer these encodings.
|
|
61
|
+
- text/plain form bodies can slip through validators and be parsed server-side.
|
|
62
|
+
</simple_ct_csrf>
|
|
47
63
|
|
|
48
64
|
<json_csrf>
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<input name='{% raw %}{"amount":1000,"to":"attacker","ignore":"{% endraw %}' value='"}'>
|
|
52
|
-
</form>
|
|
65
|
+
- If server parses JSON from text/plain or form-encoded bodies, craft parameters to reconstruct JSON server-side.
|
|
66
|
+
- Some frameworks accept JSON keys via form fields (e.g., {% raw %}data[foo]=bar{% endraw %}) or treat duplicate keys leniently.
|
|
53
67
|
</json_csrf>
|
|
54
68
|
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</multipart_csrf>
|
|
60
|
-
</exploitation_techniques>
|
|
69
|
+
<login_logout_csrf>
|
|
70
|
+
- Force logout to clear CSRF tokens, then chain login CSRF to bind victim to attacker’s account.
|
|
71
|
+
- Login CSRF: submit attacker credentials to victim’s browser; later actions occur under attacker’s account.
|
|
72
|
+
</login_logout_csrf>
|
|
61
73
|
|
|
62
|
-
<
|
|
63
|
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- Referer bypass: use data: URI, about:blank
|
|
73
|
-
- Origin bypass: null origin via sandboxed iframe
|
|
74
|
-
- CORS misconfigurations
|
|
75
|
-
</header_bypasses>
|
|
76
|
-
|
|
77
|
-
<content_type_tricks>
|
|
78
|
-
- Change multipart to application/x-www-form-urlencoded
|
|
79
|
-
- Use text/plain for JSON endpoints
|
|
80
|
-
- Exploit parsers that accept multiple formats
|
|
81
|
-
</content_type_tricks>
|
|
82
|
-
</bypass_techniques>
|
|
74
|
+
<oauth_oidc_flows>
|
|
75
|
+
- Abuse authorize/logout endpoints reachable via GET or form POST without origin checks; exploit relaxed SameSite on top-level navigations.
|
|
76
|
+
- Open redirects or loose redirect_uri validation can chain with CSRF to force unintended authorizations.
|
|
77
|
+
</oauth_oidc_flows>
|
|
78
|
+
|
|
79
|
+
<file_and_action_endpoints>
|
|
80
|
+
- File upload/delete often lack token checks; forge multipart requests to modify storage.
|
|
81
|
+
- Admin actions exposed as simple POST links are frequently CSRFable.
|
|
82
|
+
</file_and_action_endpoints>
|
|
83
|
+
</exploitation_techniques>
|
|
83
84
|
|
|
84
85
|
<advanced_techniques>
|
|
85
|
-
<
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
</subdomain_csrf>
|
|
90
|
-
|
|
91
|
-
<csrf_login>
|
|
92
|
-
- Force victim to login as attacker
|
|
93
|
-
- Plant backdoors in victim's account
|
|
94
|
-
- Access victim's future data
|
|
95
|
-
</csrf_login>
|
|
96
|
-
|
|
97
|
-
<csrf_logout>
|
|
98
|
-
- Force logout → login CSRF → account takeover
|
|
99
|
-
</csrf_logout>
|
|
100
|
-
|
|
101
|
-
<double_submit_csrf>
|
|
102
|
-
If using double-submit cookies:
|
|
103
|
-
- Set cookie via XSS/subdomain
|
|
104
|
-
- Cookie injection via header injection
|
|
105
|
-
- Cookie tossing attacks
|
|
106
|
-
</double_submit_csrf>
|
|
107
|
-
</advanced_techniques>
|
|
86
|
+
<samesite_nuance>
|
|
87
|
+
- Lax-by-default cookies are sent on top-level cross-site GET but not POST; exploit GET state changes and GET-based confirmation steps.
|
|
88
|
+
- Legacy or nonstandard clients may ignore SameSite; validate across browsers/devices.
|
|
89
|
+
</samesite_nuance>
|
|
108
90
|
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
91
|
+
<origin_referer_obfuscation>
|
|
92
|
+
- Sandbox/iframes can produce null Origin; some frameworks incorrectly accept null.
|
|
93
|
+
- about:blank/data: URLs alter Referer; ensure server requires explicit Origin/Referer match.
|
|
94
|
+
</origin_referer_obfuscation>
|
|
95
|
+
|
|
96
|
+
<method_override>
|
|
97
|
+
- Backends honoring _method or X-HTTP-Method-Override may allow destructive actions through a simple POST.
|
|
98
|
+
</method_override>
|
|
114
99
|
|
|
115
100
|
<graphql_csrf>
|
|
116
|
-
- GET
|
|
117
|
-
- Batched mutations
|
|
118
|
-
- Subscription abuse
|
|
101
|
+
- If queries/mutations are allowed via GET or persisted queries, exploit top-level navigation with encoded payloads.
|
|
102
|
+
- Batched operations may hide mutations within a nominally safe request.
|
|
119
103
|
</graphql_csrf>
|
|
120
104
|
|
|
121
|
-
<
|
|
122
|
-
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
105
|
+
<websocket_csrf>
|
|
106
|
+
- Browsers send cookies on WebSocket handshake; enforce Origin checks server-side. Without them, cross-site pages can open authenticated sockets and issue actions.
|
|
107
|
+
</websocket_csrf>
|
|
108
|
+
</advanced_techniques>
|
|
109
|
+
|
|
110
|
+
<bypass_techniques>
|
|
111
|
+
<token_weaknesses>
|
|
112
|
+
- Accepting missing/empty tokens; tokens not tied to session, user, or path; tokens reused indefinitely; tokens in GET.
|
|
113
|
+
- Double-submit cookie without Secure/HttpOnly, or with predictable token sources.
|
|
114
|
+
</token_weaknesses>
|
|
115
|
+
|
|
116
|
+
<content_type_switching>
|
|
117
|
+
- Switch between form, multipart, and text/plain to reach different code paths and validators.
|
|
118
|
+
- Use duplicate keys and array shapes to confuse parsers.
|
|
119
|
+
</content_type_switching>
|
|
120
|
+
|
|
121
|
+
<header_manipulation>
|
|
122
|
+
- Strip Referer via meta refresh or navigate from about:blank; test null Origin acceptance.
|
|
123
|
+
- Leverage misconfigured CORS to add custom headers that servers mistakenly treat as CSRF tokens.
|
|
124
|
+
</header_manipulation>
|
|
125
|
+
</bypass_techniques>
|
|
126
|
+
|
|
127
|
+
<special_contexts>
|
|
128
|
+
<mobile_spa>
|
|
129
|
+
- Deep links and embedded WebViews may auto-send cookies; trigger actions via crafted intents/links.
|
|
130
|
+
- SPAs that rely solely on bearer tokens are less CSRF-prone, but hybrid apps mixing cookies and APIs can still be vulnerable.
|
|
131
|
+
</mobile_spa>
|
|
132
|
+
|
|
133
|
+
<integrations>
|
|
134
|
+
- Webhooks and back-office tools sometimes expose state-changing GETs intended for staff; confirm CSRF defenses there too.
|
|
135
|
+
</integrations>
|
|
126
136
|
</special_contexts>
|
|
127
137
|
|
|
138
|
+
<chaining_attacks>
|
|
139
|
+
- CSRF + IDOR: force actions on other users' resources once references are known.
|
|
140
|
+
- CSRF + Clickjacking: guide user interactions to bypass UI confirmations.
|
|
141
|
+
- CSRF + OAuth mix-up: bind victim sessions to unintended clients.
|
|
142
|
+
</chaining_attacks>
|
|
143
|
+
|
|
128
144
|
<validation>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
5. Works with active session
|
|
145
|
+
1. Demonstrate a cross-origin page that triggers a state change without user interaction beyond visiting.
|
|
146
|
+
2. Show that removing the anti-CSRF control (token/header) is accepted, or that Origin/Referer are not verified.
|
|
147
|
+
3. Prove behavior across at least two browsers or contexts (top-level nav vs XHR/fetch).
|
|
148
|
+
4. Provide before/after state evidence for the same account.
|
|
149
|
+
5. If defenses exist, show the exact condition under which they are bypassed (content-type, method override, null Origin).
|
|
135
150
|
</validation>
|
|
136
151
|
|
|
137
152
|
<false_positives>
|
|
138
|
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
- Proper origin/referer validation
|
|
142
|
-
- User interaction required
|
|
143
|
-
- Only affects non-sensitive actions
|
|
153
|
+
- Token verification present and required; Origin/Referer enforced consistently.
|
|
154
|
+
- No cookies sent on cross-site requests (SameSite=Strict, no HTTP auth) and no state change via simple requests.
|
|
155
|
+
- Only idempotent, non-sensitive operations affected.
|
|
144
156
|
</false_positives>
|
|
145
157
|
|
|
146
158
|
<impact>
|
|
147
|
-
- Account
|
|
148
|
-
-
|
|
149
|
-
- Data modification/deletion
|
|
150
|
-
- Privilege escalation
|
|
151
|
-
- Privacy violations
|
|
159
|
+
- Account state changes (email/password/MFA), session hijacking via login CSRF, financial operations, administrative actions.
|
|
160
|
+
- Durable authorization changes (role/permission flips, key rotations) and data loss.
|
|
152
161
|
</impact>
|
|
153
162
|
|
|
154
163
|
<pro_tips>
|
|
155
|
-
1.
|
|
156
|
-
2. Test
|
|
157
|
-
3.
|
|
158
|
-
4.
|
|
159
|
-
5.
|
|
160
|
-
6.
|
|
161
|
-
7.
|
|
162
|
-
8. Look for method override possibilities
|
|
163
|
-
9. Test WebSocket endpoints
|
|
164
|
-
10. Document clear attack scenario
|
|
164
|
+
1. Prefer preflightless vectors (form-encoded, multipart, text/plain) and top-level GET if available.
|
|
165
|
+
2. Test login/logout, OAuth connect/disconnect, and account linking first.
|
|
166
|
+
3. Validate Origin/Referer behavior explicitly; do not assume frameworks enforce them.
|
|
167
|
+
4. Toggle SameSite and observe differences across navigation vs XHR.
|
|
168
|
+
5. For GraphQL, attempt GET queries or persisted queries that carry mutations.
|
|
169
|
+
6. Always try method overrides and parser differentials.
|
|
170
|
+
7. Combine with clickjacking when visual confirmations block CSRF.
|
|
165
171
|
</pro_tips>
|
|
166
172
|
|
|
167
|
-
<remember>
|
|
173
|
+
<remember>CSRF is eliminated only when state changes require a secret the attacker cannot supply and the server verifies the caller’s origin. Tokens and Origin checks must hold across methods, content-types, and transports.</remember>
|
|
168
174
|
</csrf_vulnerability_guide>
|
|
@@ -1,164 +1,195 @@
|
|
|
1
1
|
<idor_vulnerability_guide>
|
|
2
|
-
<title>INSECURE DIRECT OBJECT REFERENCE (IDOR)
|
|
2
|
+
<title>INSECURE DIRECT OBJECT REFERENCE (IDOR)</title>
|
|
3
3
|
|
|
4
|
-
<critical>
|
|
4
|
+
<critical>Object- and function-level authorization failures (BOLA/IDOR) routinely lead to cross-account data exposure and unauthorized state changes across APIs, web, mobile, and microservices. Treat every object reference as untrusted until proven bound to the caller.</critical>
|
|
5
|
+
|
|
6
|
+
<scope>
|
|
7
|
+
- Horizontal access: access another subject's objects of the same type
|
|
8
|
+
- Vertical access: access privileged objects/actions (admin-only, staff-only)
|
|
9
|
+
- Cross-tenant access: break isolation boundaries in multi-tenant systems
|
|
10
|
+
- Cross-service access: token or context accepted by the wrong service
|
|
11
|
+
</scope>
|
|
12
|
+
|
|
13
|
+
<methodology>
|
|
14
|
+
1. Build a Subject × Object × Action matrix (who can do what to which resource).
|
|
15
|
+
2. For each resource type, obtain at least two principals: owner and non-owner (plus admin/staff if applicable). Capture at least one valid object ID per principal.
|
|
16
|
+
3. Exercise every action (R/W/D/Export) while swapping IDs, tokens, tenants, and channels (web, mobile, API, GraphQL, WebSocket, gRPC).
|
|
17
|
+
4. Track consistency: the same rule must hold regardless of transport, content-type, serialization, or gateway.
|
|
18
|
+
</methodology>
|
|
5
19
|
|
|
6
20
|
<discovery_techniques>
|
|
7
21
|
<parameter_analysis>
|
|
8
|
-
-
|
|
9
|
-
- UUID/
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
- Object references in: URLs, POST bodies, headers, cookies, JWT tokens
|
|
22
|
+
- Object references appear in: paths, query params, JSON bodies, form-data, headers, cookies, JWT claims, GraphQL arguments, WebSocket messages, gRPC messages
|
|
23
|
+
- Identifier forms: integers, UUID/ULID/CUID, Snowflake, slugs, composite keys (e.g., {orgId}:{userId}), opaque tokens, base64/hex-encoded blobs
|
|
24
|
+
- Relationship references: parentId, ownerId, accountId, tenantId, organization, teamId, projectId, subscriptionId
|
|
25
|
+
- Expansion/projection knobs: fields, include, expand, projection, with, select, populate (often bypass authorization in resolvers or serializers)
|
|
26
|
+
- Pagination/cursors: page[offset], page[limit], cursor, nextPageToken (often reveal or accept cross-tenant/state)
|
|
14
27
|
</parameter_analysis>
|
|
15
28
|
|
|
16
29
|
<advanced_enumeration>
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
30
|
+
- Alternate types: {% raw %}{"id":123}{% endraw} vs {% raw %}{"id":"123"}{% endraw}, arrays vs scalars, objects vs scalars, null/empty/0/-1/MAX_INT, scientific notation, overflows, unknown attributes retained by backend
|
|
31
|
+
- Duplicate keys/parameter pollution: id=1&id=2, JSON duplicate keys {% raw %}{"id":1,"id":2}{% endraw} (parser precedence differences)
|
|
32
|
+
- Case/aliasing: userId vs userid vs USER_ID; alt names like resourceId, targetId, account
|
|
33
|
+
- Path traversal-like in virtual file systems: /files/user_123/../../user_456/report.csv
|
|
34
|
+
- Directory/list endpoints as seeders: search/list/suggest/export often leak object IDs for secondary exploitation
|
|
22
35
|
</advanced_enumeration>
|
|
23
36
|
</discovery_techniques>
|
|
24
37
|
|
|
25
38
|
<high_value_targets>
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
- Backup files
|
|
35
|
-
- Debug information
|
|
39
|
+
- Exports/backups/reporting endpoints (CSV/PDF/ZIP)
|
|
40
|
+
- Messaging/mailbox/notifications, audit logs, activity feeds
|
|
41
|
+
- Billing: invoices, payment methods, transactions, credits
|
|
42
|
+
- Healthcare/education records, HR documents, PII/PHI/PCI
|
|
43
|
+
- Admin/staff tools, impersonation/session management
|
|
44
|
+
- File/object storage keys (S3/GCS signed URLs, share links)
|
|
45
|
+
- Background jobs: import/export job IDs, task results
|
|
46
|
+
- Multi-tenant resources: organizations, workspaces, projects
|
|
36
47
|
</high_value_targets>
|
|
37
48
|
|
|
38
49
|
<exploitation_techniques>
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
/
|
|
42
|
-
|
|
43
|
-
</direct_access>
|
|
44
|
-
|
|
45
|
-
<mass_enumeration>
|
|
46
|
-
Automate ID ranges:
|
|
47
|
-
for i in range(1, 10000):
|
|
48
|
-
/api/user/{i}/data
|
|
49
|
-
</mass_enumeration>
|
|
50
|
-
|
|
51
|
-
<type_confusion>
|
|
52
|
-
- String where int expected: "123" vs 123
|
|
53
|
-
- Array where single value expected: [123] vs 123
|
|
54
|
-
- Object injection: {% raw %}{"id": {"$ne": null}}{% endraw %}
|
|
55
|
-
</type_confusion>
|
|
56
|
-
</exploitation_techniques>
|
|
50
|
+
<horizontal_vertical>
|
|
51
|
+
- Swap object IDs between principals using the same token to probe horizontal access; then repeat with lower-privilege tokens to probe vertical access
|
|
52
|
+
- Target partial updates (PATCH, JSON Patch/JSON Merge Patch) for silent unauthorized modifications
|
|
53
|
+
</horizontal_vertical>
|
|
57
54
|
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
- Sequential UUID generation
|
|
63
|
-
</uuid_prediction>
|
|
64
|
-
|
|
65
|
-
<blind_idor>
|
|
66
|
-
- Side channel: response time, size differences
|
|
67
|
-
- Error message variations
|
|
68
|
-
- Boolean-based: exists vs not exists
|
|
69
|
-
</blind_idor>
|
|
55
|
+
<bulk_and_batch>
|
|
56
|
+
- Batch endpoints (bulk update/delete) often validate only the first element; include cross-tenant IDs mid-array
|
|
57
|
+
- CSV/JSON imports referencing foreign object IDs (ownerId, orgId) may bypass create-time checks
|
|
58
|
+
</bulk_and_batch>
|
|
70
59
|
|
|
71
60
|
<secondary_idor>
|
|
72
|
-
|
|
73
|
-
/
|
|
74
|
-
/api/user/789/private-data
|
|
61
|
+
- Use list/search endpoints, notifications, emails, webhooks, and client logs to collect valid IDs, then fetch or mutate those objects directly
|
|
62
|
+
- Pagination/cursor manipulation to skip filters and pull other users' pages
|
|
75
63
|
</secondary_idor>
|
|
64
|
+
|
|
65
|
+
<job_task_objects>
|
|
66
|
+
- Access job/task IDs from one user to retrieve results for another (export/{jobId}/download, reports/{taskId})
|
|
67
|
+
- Cancel/approve someone else's jobs by referencing their task IDs
|
|
68
|
+
</job_task_objects>
|
|
69
|
+
|
|
70
|
+
<file_object_storage>
|
|
71
|
+
- Direct object paths or weakly scoped signed URLs; attempt key prefix changes, content-disposition tricks, or stale signatures reused across tenants
|
|
72
|
+
- Replace share tokens with tokens from other tenants; try case/URL-encoding variations
|
|
73
|
+
</file_object_storage>
|
|
74
|
+
</exploitation_techniques>
|
|
75
|
+
|
|
76
|
+
<advanced_techniques>
|
|
77
|
+
<graphql>
|
|
78
|
+
- Enforce resolver-level checks: do not rely on a top-level gate. Verify field and edge resolvers bind the resource to the caller on every hop
|
|
79
|
+
- Abuse batching/aliases to retrieve multiple users' nodes in one request and compare responses
|
|
80
|
+
- Global node patterns (Relay): decode base64 IDs and swap raw IDs; test {% raw %}node(id: "...base64..."){...}{% endraw %}
|
|
81
|
+
- Overfetching via fragments on privileged types; verify hidden fields cannot be queried by unprivileged callers
|
|
82
|
+
- Example:
|
|
83
|
+
{% raw %}
|
|
84
|
+
query IDOR {
|
|
85
|
+
me { id }
|
|
86
|
+
u1: user(id: "VXNlcjo0NTY=") { email billing { last4 } }
|
|
87
|
+
u2: node(id: "VXNlcjo0NTc=") { ... on User { email } }
|
|
88
|
+
}
|
|
89
|
+
{% endraw %}
|
|
90
|
+
</graphql>
|
|
91
|
+
|
|
92
|
+
<microservices_gateways>
|
|
93
|
+
- Token confusion: a token scoped for Service A accepted by Service B due to shared JWT verification but missing audience/claims checks
|
|
94
|
+
- Trust on headers: reverse proxies or API gateways injecting/trusting headers like X-User-Id, X-Organization-Id; try overriding or removing them
|
|
95
|
+
- Context loss: async consumers (queues, workers) re-process requests without re-checking authorization
|
|
96
|
+
</microservices_gateways>
|
|
97
|
+
|
|
98
|
+
<multi_tenant>
|
|
99
|
+
- Probe tenant scoping through headers, subdomains, and path params (e.g., X-Tenant-ID, org slug). Try mixing org of token with resource from another org
|
|
100
|
+
- Test cross-tenant reports/analytics rollups and admin views which aggregate multiple tenants
|
|
101
|
+
</multi_tenant>
|
|
102
|
+
|
|
103
|
+
<uuid_and_opaque_ids>
|
|
104
|
+
- UUID/ULID are not authorization: acquire valid IDs from logs, exports, JS bundles, analytics endpoints, emails, or public activity, then test ownership binding
|
|
105
|
+
- Time-based IDs (UUIDv1, ULID) may be guessable within a window; combine with leakage sources for targeted access
|
|
106
|
+
</uuid_and_opaque_ids>
|
|
107
|
+
|
|
108
|
+
<blind_channels>
|
|
109
|
+
- Use differential responses (status, size, ETag, timing) to detect existence; error shape often differs for owned vs foreign objects
|
|
110
|
+
- HEAD/OPTIONS, conditional requests (If-None-Match/If-Modified-Since) can confirm existence without full content
|
|
111
|
+
</blind_channels>
|
|
76
112
|
</advanced_techniques>
|
|
77
113
|
|
|
78
114
|
<bypass_techniques>
|
|
115
|
+
<parser_and_transport>
|
|
116
|
+
- Content-type switching: application/json ↔ application/x-www-form-urlencoded ↔ multipart/form-data; some paths enforce checks per parser
|
|
117
|
+
- Method tunneling: X-HTTP-Method-Override, _method=PATCH; or using GET on endpoints incorrectly accepting state changes
|
|
118
|
+
- JSON duplicate keys/array injection to bypass naive validators
|
|
119
|
+
</parser_and_transport>
|
|
120
|
+
|
|
79
121
|
<parameter_pollution>
|
|
80
|
-
|
|
81
|
-
|
|
122
|
+
- Duplicate parameters in query/body to influence server-side precedence (id=123&id=456); try both orderings
|
|
123
|
+
- Mix case/alias param names so gateway and backend disagree (userId vs userid)
|
|
82
124
|
</parameter_pollution>
|
|
83
125
|
|
|
84
|
-
<
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</case_variation>
|
|
93
|
-
|
|
94
|
-
<format_switching>
|
|
95
|
-
/api/user.json?id=123
|
|
96
|
-
/api/user.xml?id=123
|
|
97
|
-
/api/user/123.json vs /api/user/123
|
|
98
|
-
</format_switching>
|
|
126
|
+
<cache_and_gateway>
|
|
127
|
+
- CDN/proxy key confusion: responses keyed without Authorization or tenant headers expose cached objects to other users; manipulate Vary and Accept
|
|
128
|
+
- Redirect chains and 304/206 behaviors can leak content across tenants
|
|
129
|
+
</cache_and_gateway>
|
|
130
|
+
|
|
131
|
+
<race_windows>
|
|
132
|
+
- Time-of-check vs time-of-use: change the referenced ID between validation and execution using parallel requests
|
|
133
|
+
</race_windows>
|
|
99
134
|
</bypass_techniques>
|
|
100
135
|
|
|
101
136
|
<special_contexts>
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
</
|
|
106
|
-
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
</file_path_idor>
|
|
137
|
+
<websocket>
|
|
138
|
+
- Authorization per-subscription: ensure channel/topic names cannot be guessed (user_{id}, org_{id}); subscribe/publish checks must run server-side, not only at handshake
|
|
139
|
+
- Try sending messages with target user IDs after subscribing to own channels
|
|
140
|
+
</websocket>
|
|
141
|
+
|
|
142
|
+
<grpc>
|
|
143
|
+
- Direct protobuf fields (owner_id, tenant_id) often bypass HTTP-layer middleware; validate references via grpcurl with tokens from different principals
|
|
144
|
+
</grpc>
|
|
145
|
+
|
|
146
|
+
<integrations>
|
|
147
|
+
- Webhooks/callbacks referencing foreign objects (e.g., invoice_id) processed without verifying ownership
|
|
148
|
+
- Third-party importers syncing data into wrong tenant due to missing tenant binding
|
|
149
|
+
</integrations>
|
|
116
150
|
</special_contexts>
|
|
117
151
|
|
|
118
152
|
<chaining_attacks>
|
|
119
|
-
- IDOR +
|
|
120
|
-
- IDOR +
|
|
121
|
-
- IDOR +
|
|
153
|
+
- IDOR + CSRF: force victims to trigger unauthorized changes on objects you discovered
|
|
154
|
+
- IDOR + Stored XSS: pivot into other users' sessions through data you gained access to
|
|
155
|
+
- IDOR + SSRF: exfiltrate internal IDs, then access their corresponding resources
|
|
156
|
+
- IDOR + Race: bypass spot checks with simultaneous requests
|
|
122
157
|
</chaining_attacks>
|
|
123
158
|
|
|
124
159
|
<validation>
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
5. Document security impact
|
|
160
|
+
1. Demonstrate access to an object not owned by the caller (content or metadata).
|
|
161
|
+
2. Show the same request fails with appropriately enforced authorization when corrected.
|
|
162
|
+
3. Prove cross-channel consistency: same unauthorized access via at least two transports (e.g., REST and GraphQL).
|
|
163
|
+
4. Document tenant boundary violations (if applicable).
|
|
164
|
+
5. Provide reproducible steps and evidence (requests/responses for owner vs non-owner).
|
|
131
165
|
</validation>
|
|
132
166
|
|
|
133
167
|
<false_positives>
|
|
134
|
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
- Rate limiting prevents exploitation
|
|
139
|
-
- Data is sanitized/limited
|
|
168
|
+
- Public/anonymous resources by design
|
|
169
|
+
- Soft-privatized data where content is already public
|
|
170
|
+
- Idempotent metadata lookups that do not reveal sensitive content
|
|
171
|
+
- Correct row-level checks enforced across all channels
|
|
140
172
|
</false_positives>
|
|
141
173
|
|
|
142
174
|
<impact>
|
|
143
|
-
-
|
|
144
|
-
-
|
|
145
|
-
-
|
|
146
|
-
-
|
|
147
|
-
- Compliance violations (GDPR, HIPAA)
|
|
175
|
+
- Cross-account data exposure (PII/PHI/PCI)
|
|
176
|
+
- Unauthorized state changes (transfers, role changes, cancellations)
|
|
177
|
+
- Cross-tenant data leaks violating contractual and regulatory boundaries
|
|
178
|
+
- Regulatory risk (GDPR/HIPAA/PCI), fraud, reputational damage
|
|
148
179
|
</impact>
|
|
149
180
|
|
|
150
181
|
<pro_tips>
|
|
151
|
-
1.
|
|
152
|
-
2.
|
|
153
|
-
3.
|
|
154
|
-
4.
|
|
155
|
-
5.
|
|
156
|
-
6. Check
|
|
157
|
-
7.
|
|
158
|
-
8.
|
|
159
|
-
9.
|
|
160
|
-
10.
|
|
182
|
+
1. Always test list/search/export endpoints first; they are rich ID seeders.
|
|
183
|
+
2. Build a reusable ID corpus from logs, notifications, emails, and client bundles.
|
|
184
|
+
3. Toggle content-types and transports; authorization middleware often differs per stack.
|
|
185
|
+
4. In GraphQL, validate at resolver boundaries; never trust parent auth to cover children.
|
|
186
|
+
5. In multi-tenant apps, vary org headers, subdomains, and path params independently.
|
|
187
|
+
6. Check batch/bulk operations and background job endpoints; they frequently skip per-item checks.
|
|
188
|
+
7. Inspect gateways for header trust and cache key configuration.
|
|
189
|
+
8. Treat UUIDs as untrusted; obtain them via OSINT/leaks and test binding.
|
|
190
|
+
9. Use timing/size/ETag differentials for blind confirmation when content is masked.
|
|
191
|
+
10. Prove impact with precise before/after diffs and role-separated evidence.
|
|
161
192
|
</pro_tips>
|
|
162
193
|
|
|
163
|
-
<remember>
|
|
194
|
+
<remember>Authorization must bind subject, action, and specific object on every request, regardless of identifier opacity or transport. If the binding is missing anywhere, the system is vulnerable.</remember>
|
|
164
195
|
</idor_vulnerability_guide>
|