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.

Files changed (68) hide show
  1. strix/agents/StrixAgent/strix_agent.py +49 -39
  2. strix/agents/StrixAgent/system_prompt.jinja +23 -10
  3. strix/agents/base_agent.py +90 -10
  4. strix/agents/state.py +23 -2
  5. strix/interface/cli.py +171 -0
  6. strix/interface/main.py +482 -0
  7. strix/{cli → interface}/tool_components/base_renderer.py +2 -2
  8. strix/{cli → interface}/tool_components/reporting_renderer.py +2 -1
  9. strix/{cli → interface}/tool_components/scan_info_renderer.py +17 -12
  10. strix/{cli/app.py → interface/tui.py} +107 -31
  11. strix/interface/utils.py +435 -0
  12. strix/prompts/README.md +64 -0
  13. strix/prompts/__init__.py +1 -1
  14. strix/prompts/cloud/.gitkeep +0 -0
  15. strix/prompts/custom/.gitkeep +0 -0
  16. strix/prompts/frameworks/fastapi.jinja +142 -0
  17. strix/prompts/frameworks/nextjs.jinja +126 -0
  18. strix/prompts/protocols/graphql.jinja +215 -0
  19. strix/prompts/reconnaissance/.gitkeep +0 -0
  20. strix/prompts/technologies/firebase_firestore.jinja +177 -0
  21. strix/prompts/technologies/supabase.jinja +189 -0
  22. strix/prompts/vulnerabilities/authentication_jwt.jinja +133 -115
  23. strix/prompts/vulnerabilities/broken_function_level_authorization.jinja +146 -0
  24. strix/prompts/vulnerabilities/business_logic.jinja +146 -118
  25. strix/prompts/vulnerabilities/csrf.jinja +137 -131
  26. strix/prompts/vulnerabilities/idor.jinja +149 -118
  27. strix/prompts/vulnerabilities/insecure_file_uploads.jinja +188 -0
  28. strix/prompts/vulnerabilities/mass_assignment.jinja +141 -0
  29. strix/prompts/vulnerabilities/path_traversal_lfi_rfi.jinja +142 -0
  30. strix/prompts/vulnerabilities/race_conditions.jinja +135 -165
  31. strix/prompts/vulnerabilities/rce.jinja +128 -180
  32. strix/prompts/vulnerabilities/sql_injection.jinja +128 -192
  33. strix/prompts/vulnerabilities/ssrf.jinja +118 -151
  34. strix/prompts/vulnerabilities/xss.jinja +144 -196
  35. strix/prompts/vulnerabilities/xxe.jinja +151 -243
  36. strix/runtime/docker_runtime.py +28 -7
  37. strix/runtime/runtime.py +4 -1
  38. strix/telemetry/__init__.py +4 -0
  39. strix/{cli → telemetry}/tracer.py +21 -9
  40. strix/tools/agents_graph/agents_graph_actions.py +17 -12
  41. strix/tools/agents_graph/agents_graph_actions_schema.xml +10 -14
  42. strix/tools/executor.py +1 -1
  43. strix/tools/finish/finish_actions.py +1 -1
  44. strix/tools/registry.py +1 -1
  45. strix/tools/reporting/reporting_actions.py +1 -1
  46. {strix_agent-0.1.18.dist-info → strix_agent-0.3.1.dist-info}/METADATA +95 -15
  47. strix_agent-0.3.1.dist-info/RECORD +115 -0
  48. strix_agent-0.3.1.dist-info/entry_points.txt +3 -0
  49. strix/cli/main.py +0 -702
  50. strix_agent-0.1.18.dist-info/RECORD +0 -99
  51. strix_agent-0.1.18.dist-info/entry_points.txt +0 -3
  52. /strix/{cli → interface}/__init__.py +0 -0
  53. /strix/{cli/assets/cli.tcss → interface/assets/tui_styles.tcss} +0 -0
  54. /strix/{cli → interface}/tool_components/__init__.py +0 -0
  55. /strix/{cli → interface}/tool_components/agents_graph_renderer.py +0 -0
  56. /strix/{cli → interface}/tool_components/browser_renderer.py +0 -0
  57. /strix/{cli → interface}/tool_components/file_edit_renderer.py +0 -0
  58. /strix/{cli → interface}/tool_components/finish_renderer.py +0 -0
  59. /strix/{cli → interface}/tool_components/notes_renderer.py +0 -0
  60. /strix/{cli → interface}/tool_components/proxy_renderer.py +0 -0
  61. /strix/{cli → interface}/tool_components/python_renderer.py +0 -0
  62. /strix/{cli → interface}/tool_components/registry.py +0 -0
  63. /strix/{cli → interface}/tool_components/terminal_renderer.py +0 -0
  64. /strix/{cli → interface}/tool_components/thinking_renderer.py +0 -0
  65. /strix/{cli → interface}/tool_components/user_message_renderer.py +0 -0
  66. /strix/{cli → interface}/tool_components/web_search_renderer.py +0 -0
  67. {strix_agent-0.1.18.dist-info → strix_agent-0.3.1.dist-info}/LICENSE +0 -0
  68. {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) - ADVANCED EXPLOITATION</title>
2
+ <title>CROSS-SITE REQUEST FORGERY (CSRF)</title>
3
3
 
4
- <critical>CSRF forces authenticated users to execute unwanted actions, exploiting the trust a site has in the user's browser.</critical>
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
- - Password/email change forms
8
- - Money transfer/payment functions
9
- - Account deletion/deactivation
10
- - Permission/role changes
11
- - API key generation/regeneration
12
- - OAuth connection/disconnection
13
- - 2FA enable/disable
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
- <token_analysis>
21
- Common token names: csrf_token, csrftoken, _csrf, authenticity_token, __RequestVerificationToken, X-CSRF-TOKEN
22
-
23
- Check if tokens are:
24
- - Actually validated (remove and test)
25
- - Tied to user session
26
- - Reusable across requests
27
- - Present in GET requests
28
- - Predictable or static
29
- </token_analysis>
30
-
31
- <http_methods>
32
- - Test if POST endpoints accept GET
33
- - Try method override headers: _method, X-HTTP-Method-Override
34
- - Check if PUT/DELETE lack protection
35
- </http_methods>
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
- <basic_forms>
40
- HTML form auto-submit:
41
- <form action="https://target.com/transfer" method="POST">
42
- <input name="amount" value="1000">
43
- <input name="to" value="attacker">
44
- </form>
45
- <script>document.forms[0].submit()</script>
46
- </basic_forms>
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
- For JSON endpoints:
50
- <form enctype="text/plain" action="https://target.com/api">
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
- <multipart_csrf>
56
- For file uploads:
57
- Use XMLHttpRequest with credentials
58
- Generate multipart/form-data boundaries
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
- <bypass_techniques>
63
- <token_bypasses>
64
- - Null token: remove parameter entirely
65
- - Empty token: csrf_token=
66
- - Token from own account: use your valid token
67
- - Token fixation: force known token value
68
- - Method interchange: GET token used for POST
69
- </token_bypasses>
70
-
71
- <header_bypasses>
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
- <subdomain_csrf>
86
- - XSS on subdomain = CSRF on main domain
87
- - Cookie scope abuse (domain=.example.com)
88
- - Subdomain takeover for CSRF
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
- <special_contexts>
110
- <websocket_csrf>
111
- - Cross-origin WebSocket hijacking
112
- - Steal tokens from WebSocket messages
113
- </websocket_csrf>
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 requests with query parameter
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
- <api_csrf>
122
- - Bearer tokens in URL parameters
123
- - API keys in GET requests
124
- - Insecure CORS policies
125
- </api_csrf>
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
- To confirm CSRF:
130
- 1. Create working proof-of-concept
131
- 2. Test across browsers
132
- 3. Verify action completes successfully
133
- 4. No user interaction required (beyond visiting page)
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
- NOT CSRF if:
139
- - Requires valid CSRF token
140
- - SameSite cookies properly configured
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 takeover
148
- - Financial loss
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. Check all state-changing operations
156
- 2. Test file upload endpoints
157
- 3. Look for token disclosure in URLs
158
- 4. Chain with XSS for token theft
159
- 5. Check mobile API endpoints
160
- 6. Test CORS configurations
161
- 7. Verify SameSite cookie settings
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>Modern CSRF requires creativity - look for token leaks, chain with other vulnerabilities, and focus on high-impact actions. SameSite cookies are not always properly configured.</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) - ELITE TECHNIQUES</title>
2
+ <title>INSECURE DIRECT OBJECT REFERENCE (IDOR)</title>
3
3
 
4
- <critical>IDORs are among the HIGHEST IMPACT vulnerabilities - direct unauthorized data access and account takeover.</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
- - Numeric IDs: user_id=123, account=456
9
- - UUID/GUID patterns: id=550e8400-e29b-41d4-a716-446655440000
10
- - Encoded IDs: Base64, hex, custom encoding
11
- - Composite IDs: user-org-123-456, ACCT:2024:00123
12
- - Hash-based IDs: Check if predictable (MD5 of sequential numbers)
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
- - Boundary values: 0, -1, null, empty string, max int
18
- - Different formats: {% raw %}{"id":123} vs {"id":"123"}{% endraw %}
19
- - ID patterns: increment, decrement, similar patterns
20
- - Wildcard testing: *, %, _, all
21
- - Array notation: id[]=123&id[]=456
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
- - User profiles and PII
27
- - Financial records/transactions
28
- - Private messages/communications
29
- - Medical records
30
- - API keys/secrets
31
- - Internal documents
32
- - Admin functions
33
- - Export endpoints
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
- <direct_access>
40
- Simple increment/decrement:
41
- /api/user/123 /api/user/124
42
- /download?file=report_2024_01.pdf → report_2024_02.pdf
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
- <advanced_techniques>
59
- <uuid_prediction>
60
- - Time-based UUIDs (version 1): predictable timestamps
61
- - Weak randomness in version 4
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
- First get list of IDs, then access:
73
- /api/users [123, 456, 789]
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
- ?id=123&id=456 (takes last or first?)
81
- ?user_id=victim&user_id=attacker
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
- <encoding_tricks>
85
- - URL encode: %31%32%33
86
- - Double encoding: %25%33%31
87
- - Unicode: \u0031\u0032\u0033
88
- </encoding_tricks>
89
-
90
- <case_variation>
91
- userId vs userid vs USERID vs UserId
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
- <graphql_idor>
103
- Query batching and alias abuse:
104
- query { u1: user(id: 123) { data } u2: user(id: 456) { data } }
105
- </graphql_idor>
106
-
107
- <websocket_idor>
108
- Subscribe to other users' channels:
109
- {% raw %}{"subscribe": "user_456_notifications"}{% endraw %}
110
- </websocket_idor>
111
-
112
- <file_path_idor>
113
- ../../../other_user/private.pdf
114
- /files/user_123/../../user_456/data.csv
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 + XSS: Access and weaponize other users' data
120
- - IDOR + CSRF: Force actions on discovered objects
121
- - IDOR + SQLi: Extract all IDs then access
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
- To confirm IDOR:
126
- 1. Access data/function without authorization
127
- 2. Demonstrate data belongs to another user
128
- 3. Show consistent access pattern
129
- 4. Prove it's not intended functionality
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
- NOT IDOR if:
135
- - Public data by design
136
- - Proper authorization checks
137
- - Only affects own resources
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
- - Personal data exposure
144
- - Financial information theft
145
- - Account takeover
146
- - Business data leak
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. Test all ID parameters systematically
152
- 2. Look for patterns in IDs
153
- 3. Check export/download functions
154
- 4. Test different HTTP methods
155
- 5. Monitor for blind IDOR via timing
156
- 6. Check mobile APIs separately
157
- 7. Look for backup/debug endpoints
158
- 8. Test file path traversal
159
- 9. Automate enumeration carefully
160
- 10. Chain with other vulnerabilities
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>IDORs are about broken access control, not just guessable IDs. Even GUIDs can be vulnerable if disclosed elsewhere. Focus on high-impact data access.</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>