strix-agent 0.1.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.
- strix/__init__.py +0 -0
- strix/agents/StrixAgent/__init__.py +4 -0
- strix/agents/StrixAgent/strix_agent.py +60 -0
- strix/agents/StrixAgent/system_prompt.jinja +504 -0
- strix/agents/__init__.py +10 -0
- strix/agents/base_agent.py +394 -0
- strix/agents/state.py +139 -0
- strix/cli/__init__.py +4 -0
- strix/cli/app.py +1124 -0
- strix/cli/assets/cli.tcss +680 -0
- strix/cli/main.py +542 -0
- strix/cli/tool_components/__init__.py +39 -0
- strix/cli/tool_components/agents_graph_renderer.py +129 -0
- strix/cli/tool_components/base_renderer.py +61 -0
- strix/cli/tool_components/browser_renderer.py +107 -0
- strix/cli/tool_components/file_edit_renderer.py +95 -0
- strix/cli/tool_components/finish_renderer.py +32 -0
- strix/cli/tool_components/notes_renderer.py +108 -0
- strix/cli/tool_components/proxy_renderer.py +255 -0
- strix/cli/tool_components/python_renderer.py +34 -0
- strix/cli/tool_components/registry.py +72 -0
- strix/cli/tool_components/reporting_renderer.py +53 -0
- strix/cli/tool_components/scan_info_renderer.py +58 -0
- strix/cli/tool_components/terminal_renderer.py +99 -0
- strix/cli/tool_components/thinking_renderer.py +29 -0
- strix/cli/tool_components/user_message_renderer.py +43 -0
- strix/cli/tool_components/web_search_renderer.py +28 -0
- strix/cli/tracer.py +308 -0
- strix/llm/__init__.py +14 -0
- strix/llm/config.py +19 -0
- strix/llm/llm.py +310 -0
- strix/llm/memory_compressor.py +206 -0
- strix/llm/request_queue.py +63 -0
- strix/llm/utils.py +84 -0
- strix/prompts/__init__.py +113 -0
- strix/prompts/coordination/root_agent.jinja +41 -0
- strix/prompts/vulnerabilities/authentication_jwt.jinja +129 -0
- strix/prompts/vulnerabilities/business_logic.jinja +143 -0
- strix/prompts/vulnerabilities/csrf.jinja +168 -0
- strix/prompts/vulnerabilities/idor.jinja +164 -0
- strix/prompts/vulnerabilities/race_conditions.jinja +194 -0
- strix/prompts/vulnerabilities/rce.jinja +222 -0
- strix/prompts/vulnerabilities/sql_injection.jinja +216 -0
- strix/prompts/vulnerabilities/ssrf.jinja +168 -0
- strix/prompts/vulnerabilities/xss.jinja +221 -0
- strix/prompts/vulnerabilities/xxe.jinja +276 -0
- strix/runtime/__init__.py +19 -0
- strix/runtime/docker_runtime.py +298 -0
- strix/runtime/runtime.py +25 -0
- strix/runtime/tool_server.py +97 -0
- strix/tools/__init__.py +64 -0
- strix/tools/agents_graph/__init__.py +16 -0
- strix/tools/agents_graph/agents_graph_actions.py +610 -0
- strix/tools/agents_graph/agents_graph_actions_schema.xml +223 -0
- strix/tools/argument_parser.py +120 -0
- strix/tools/browser/__init__.py +4 -0
- strix/tools/browser/browser_actions.py +236 -0
- strix/tools/browser/browser_actions_schema.xml +183 -0
- strix/tools/browser/browser_instance.py +533 -0
- strix/tools/browser/tab_manager.py +342 -0
- strix/tools/executor.py +302 -0
- strix/tools/file_edit/__init__.py +4 -0
- strix/tools/file_edit/file_edit_actions.py +141 -0
- strix/tools/file_edit/file_edit_actions_schema.xml +128 -0
- strix/tools/finish/__init__.py +4 -0
- strix/tools/finish/finish_actions.py +167 -0
- strix/tools/finish/finish_actions_schema.xml +45 -0
- strix/tools/notes/__init__.py +14 -0
- strix/tools/notes/notes_actions.py +191 -0
- strix/tools/notes/notes_actions_schema.xml +150 -0
- strix/tools/proxy/__init__.py +20 -0
- strix/tools/proxy/proxy_actions.py +101 -0
- strix/tools/proxy/proxy_actions_schema.xml +267 -0
- strix/tools/proxy/proxy_manager.py +785 -0
- strix/tools/python/__init__.py +4 -0
- strix/tools/python/python_actions.py +47 -0
- strix/tools/python/python_actions_schema.xml +131 -0
- strix/tools/python/python_instance.py +172 -0
- strix/tools/python/python_manager.py +131 -0
- strix/tools/registry.py +196 -0
- strix/tools/reporting/__init__.py +6 -0
- strix/tools/reporting/reporting_actions.py +63 -0
- strix/tools/reporting/reporting_actions_schema.xml +30 -0
- strix/tools/terminal/__init__.py +4 -0
- strix/tools/terminal/terminal_actions.py +53 -0
- strix/tools/terminal/terminal_actions_schema.xml +114 -0
- strix/tools/terminal/terminal_instance.py +231 -0
- strix/tools/terminal/terminal_manager.py +191 -0
- strix/tools/thinking/__init__.py +4 -0
- strix/tools/thinking/thinking_actions.py +18 -0
- strix/tools/thinking/thinking_actions_schema.xml +52 -0
- strix/tools/web_search/__init__.py +4 -0
- strix/tools/web_search/web_search_actions.py +80 -0
- strix/tools/web_search/web_search_actions_schema.xml +83 -0
- strix_agent-0.1.1.dist-info/LICENSE +201 -0
- strix_agent-0.1.1.dist-info/METADATA +200 -0
- strix_agent-0.1.1.dist-info/RECORD +99 -0
- strix_agent-0.1.1.dist-info/WHEEL +4 -0
- strix_agent-0.1.1.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,143 @@
|
|
1
|
+
<business_logic_flaws_guide>
|
2
|
+
<title>BUSINESS LOGIC FLAWS - OUTSMARTING THE APPLICATION</title>
|
3
|
+
|
4
|
+
<critical>Business logic flaws bypass all technical security controls by exploiting flawed assumptions in application workflow. Often the highest-paying vulnerabilities.</critical>
|
5
|
+
|
6
|
+
<discovery_techniques>
|
7
|
+
- Map complete user journeys and state transitions
|
8
|
+
- Document developer assumptions
|
9
|
+
- Find edge cases in workflows
|
10
|
+
- Look for missing validation steps
|
11
|
+
- Identify trust boundaries
|
12
|
+
</discovery_techniques>
|
13
|
+
|
14
|
+
<high_value_targets>
|
15
|
+
<financial_workflows>
|
16
|
+
- Price manipulation (negative quantities, decimal truncation)
|
17
|
+
- Currency conversion abuse (buy weak, refund strong)
|
18
|
+
- Discount/coupon stacking
|
19
|
+
- Payment method switching after verification
|
20
|
+
- Cart manipulation during checkout
|
21
|
+
</financial_workflows>
|
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>
|
36
|
+
</high_value_targets>
|
37
|
+
|
38
|
+
<exploitation_techniques>
|
39
|
+
<race_conditions>
|
40
|
+
Use race conditions to:
|
41
|
+
- Double-spend vouchers/credits
|
42
|
+
- Bypass rate limits
|
43
|
+
- Create duplicate accounts
|
44
|
+
- Exploit TOCTOU vulnerabilities
|
45
|
+
</race_conditions>
|
46
|
+
|
47
|
+
<state_manipulation>
|
48
|
+
- Skip workflow steps
|
49
|
+
- Replay previous states
|
50
|
+
- Force invalid state transitions
|
51
|
+
- Manipulate hidden parameters
|
52
|
+
</state_manipulation>
|
53
|
+
|
54
|
+
<input_manipulation>
|
55
|
+
- Type confusion: string where int expected
|
56
|
+
- Boundary values: 0, -1, MAX_INT
|
57
|
+
- Format abuse: scientific notation, Unicode
|
58
|
+
- Encoding tricks: double encoding, mixed encoding
|
59
|
+
</input_manipulation>
|
60
|
+
</exploitation_techniques>
|
61
|
+
|
62
|
+
<common_flaws>
|
63
|
+
<shopping_cart>
|
64
|
+
- Add items with negative price
|
65
|
+
- Modify prices client-side
|
66
|
+
- Apply expired coupons
|
67
|
+
- Stack incompatible discounts
|
68
|
+
- Change currency after price lock
|
69
|
+
</shopping_cart>
|
70
|
+
|
71
|
+
<payment_processing>
|
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>
|
86
|
+
|
87
|
+
<advanced_techniques>
|
88
|
+
<business_constraint_violations>
|
89
|
+
- Exceed account limits
|
90
|
+
- Bypass geographic restrictions
|
91
|
+
- Violate temporal constraints
|
92
|
+
- Break dependency chains
|
93
|
+
</business_constraint_violations>
|
94
|
+
|
95
|
+
<workflow_abuse>
|
96
|
+
- Parallel execution of exclusive processes
|
97
|
+
- Recursive operations (infinite loops)
|
98
|
+
- Asynchronous timing exploitation
|
99
|
+
- Callback manipulation
|
100
|
+
</workflow_abuse>
|
101
|
+
</advanced_techniques>
|
102
|
+
|
103
|
+
<validation>
|
104
|
+
To confirm business logic flaw:
|
105
|
+
1. Demonstrate financial impact
|
106
|
+
2. Show consistent reproduction
|
107
|
+
3. Prove bypass of intended restrictions
|
108
|
+
4. Document assumption violation
|
109
|
+
5. Quantify potential damage
|
110
|
+
</validation>
|
111
|
+
|
112
|
+
<false_positives>
|
113
|
+
NOT a business logic flaw if:
|
114
|
+
- Requires technical vulnerability (SQLi, XSS)
|
115
|
+
- Working as designed (bad design ≠ vulnerability)
|
116
|
+
- Only affects display/UI
|
117
|
+
- No security impact
|
118
|
+
- Requires privileged access
|
119
|
+
</false_positives>
|
120
|
+
|
121
|
+
<impact>
|
122
|
+
- Financial loss (direct monetary impact)
|
123
|
+
- Unauthorized access to features/data
|
124
|
+
- Service disruption
|
125
|
+
- Compliance violations
|
126
|
+
- Reputation damage
|
127
|
+
</impact>
|
128
|
+
|
129
|
+
<pro_tips>
|
130
|
+
1. Think like a malicious user, not a developer
|
131
|
+
2. Question every assumption
|
132
|
+
3. Test boundary conditions obsessively
|
133
|
+
4. Combine multiple small issues
|
134
|
+
5. Focus on money flows
|
135
|
+
6. Check state machines thoroughly
|
136
|
+
7. Abuse features, don't break them
|
137
|
+
8. Document business impact clearly
|
138
|
+
9. Test integration points
|
139
|
+
10. Time is often a factor - exploit it
|
140
|
+
</pro_tips>
|
141
|
+
|
142
|
+
<remember>Business logic flaws are about understanding and exploiting the application's rules, not breaking them with technical attacks. The best findings come from deep understanding of the business domain.</remember>
|
143
|
+
</business_logic_flaws_guide>
|
@@ -0,0 +1,168 @@
|
|
1
|
+
<csrf_vulnerability_guide>
|
2
|
+
<title>CROSS-SITE REQUEST FORGERY (CSRF) - ADVANCED EXPLOITATION</title>
|
3
|
+
|
4
|
+
<critical>CSRF forces authenticated users to execute unwanted actions, exploiting the trust a site has in the user's browser.</critical>
|
5
|
+
|
6
|
+
<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
|
17
|
+
</high_value_targets>
|
18
|
+
|
19
|
+
<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>
|
36
|
+
</discovery_techniques>
|
37
|
+
|
38
|
+
<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>
|
47
|
+
|
48
|
+
<json_csrf>
|
49
|
+
For JSON endpoints:
|
50
|
+
<form enctype="text/plain" action="https://target.com/api">
|
51
|
+
<input name='{"amount":1000,"to":"attacker","ignore":"' value='"}'>
|
52
|
+
</form>
|
53
|
+
</json_csrf>
|
54
|
+
|
55
|
+
<multipart_csrf>
|
56
|
+
For file uploads:
|
57
|
+
Use XMLHttpRequest with credentials
|
58
|
+
Generate multipart/form-data boundaries
|
59
|
+
</multipart_csrf>
|
60
|
+
</exploitation_techniques>
|
61
|
+
|
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>
|
83
|
+
|
84
|
+
<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>
|
108
|
+
|
109
|
+
<special_contexts>
|
110
|
+
<websocket_csrf>
|
111
|
+
- Cross-origin WebSocket hijacking
|
112
|
+
- Steal tokens from WebSocket messages
|
113
|
+
</websocket_csrf>
|
114
|
+
|
115
|
+
<graphql_csrf>
|
116
|
+
- GET requests with query parameter
|
117
|
+
- Batched mutations
|
118
|
+
- Subscription abuse
|
119
|
+
</graphql_csrf>
|
120
|
+
|
121
|
+
<api_csrf>
|
122
|
+
- Bearer tokens in URL parameters
|
123
|
+
- API keys in GET requests
|
124
|
+
- Insecure CORS policies
|
125
|
+
</api_csrf>
|
126
|
+
</special_contexts>
|
127
|
+
|
128
|
+
<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
|
135
|
+
</validation>
|
136
|
+
|
137
|
+
<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
|
144
|
+
</false_positives>
|
145
|
+
|
146
|
+
<impact>
|
147
|
+
- Account takeover
|
148
|
+
- Financial loss
|
149
|
+
- Data modification/deletion
|
150
|
+
- Privilege escalation
|
151
|
+
- Privacy violations
|
152
|
+
</impact>
|
153
|
+
|
154
|
+
<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
|
165
|
+
</pro_tips>
|
166
|
+
|
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>
|
168
|
+
</csrf_vulnerability_guide>
|
@@ -0,0 +1,164 @@
|
|
1
|
+
<idor_vulnerability_guide>
|
2
|
+
<title>INSECURE DIRECT OBJECT REFERENCE (IDOR) - ELITE TECHNIQUES</title>
|
3
|
+
|
4
|
+
<critical>IDORs are among the HIGHEST IMPACT vulnerabilities - direct unauthorized data access and account takeover.</critical>
|
5
|
+
|
6
|
+
<discovery_techniques>
|
7
|
+
<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
|
14
|
+
</parameter_analysis>
|
15
|
+
|
16
|
+
<advanced_enumeration>
|
17
|
+
- Boundary values: 0, -1, null, empty string, max int
|
18
|
+
- Different formats: {"id":123} vs {"id":"123"}
|
19
|
+
- ID patterns: increment, decrement, similar patterns
|
20
|
+
- Wildcard testing: *, %, _, all
|
21
|
+
- Array notation: id[]=123&id[]=456
|
22
|
+
</advanced_enumeration>
|
23
|
+
</discovery_techniques>
|
24
|
+
|
25
|
+
<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
|
36
|
+
</high_value_targets>
|
37
|
+
|
38
|
+
<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: {"id": {"$ne": null}}
|
55
|
+
</type_confusion>
|
56
|
+
</exploitation_techniques>
|
57
|
+
|
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>
|
70
|
+
|
71
|
+
<secondary_idor>
|
72
|
+
First get list of IDs, then access:
|
73
|
+
/api/users → [123, 456, 789]
|
74
|
+
/api/user/789/private-data
|
75
|
+
</secondary_idor>
|
76
|
+
</advanced_techniques>
|
77
|
+
|
78
|
+
<bypass_techniques>
|
79
|
+
<parameter_pollution>
|
80
|
+
?id=123&id=456 (takes last or first?)
|
81
|
+
?user_id=victim&user_id=attacker
|
82
|
+
</parameter_pollution>
|
83
|
+
|
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>
|
99
|
+
</bypass_techniques>
|
100
|
+
|
101
|
+
<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
|
+
{"subscribe": "user_456_notifications"}
|
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>
|
116
|
+
</special_contexts>
|
117
|
+
|
118
|
+
<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
|
122
|
+
</chaining_attacks>
|
123
|
+
|
124
|
+
<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
|
131
|
+
</validation>
|
132
|
+
|
133
|
+
<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
|
140
|
+
</false_positives>
|
141
|
+
|
142
|
+
<impact>
|
143
|
+
- Personal data exposure
|
144
|
+
- Financial information theft
|
145
|
+
- Account takeover
|
146
|
+
- Business data leak
|
147
|
+
- Compliance violations (GDPR, HIPAA)
|
148
|
+
</impact>
|
149
|
+
|
150
|
+
<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
|
161
|
+
</pro_tips>
|
162
|
+
|
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>
|
164
|
+
</idor_vulnerability_guide>
|
@@ -0,0 +1,194 @@
|
|
1
|
+
<race_conditions_guide>
|
2
|
+
<title>RACE CONDITIONS - TIME-OF-CHECK TIME-OF-USE (TOCTOU) MASTERY</title>
|
3
|
+
|
4
|
+
<critical>Race conditions lead to financial fraud, privilege escalation, and business logic bypass. Often overlooked but devastating.</critical>
|
5
|
+
|
6
|
+
<high_value_targets>
|
7
|
+
- Payment/checkout processes
|
8
|
+
- Coupon/discount redemption
|
9
|
+
- Account balance operations
|
10
|
+
- Voting/rating systems
|
11
|
+
- Limited resource allocation
|
12
|
+
- User registration (username claims)
|
13
|
+
- Password reset flows
|
14
|
+
- File upload/processing
|
15
|
+
- API rate limits
|
16
|
+
- Loyalty points/rewards
|
17
|
+
- Stock/inventory management
|
18
|
+
- Withdrawal functions
|
19
|
+
</high_value_targets>
|
20
|
+
|
21
|
+
<discovery_techniques>
|
22
|
+
<identify_race_windows>
|
23
|
+
Multi-step processes with gaps between:
|
24
|
+
1. Check phase (validation/verification)
|
25
|
+
2. Use phase (action execution)
|
26
|
+
3. Write phase (state update)
|
27
|
+
|
28
|
+
Look for:
|
29
|
+
- "Check balance then deduct"
|
30
|
+
- "Verify coupon then apply"
|
31
|
+
- "Check inventory then purchase"
|
32
|
+
- "Validate token then consume"
|
33
|
+
</identify_race_windows>
|
34
|
+
|
35
|
+
<detection_methods>
|
36
|
+
- Parallel requests with same data
|
37
|
+
- Rapid sequential requests
|
38
|
+
- Monitor for inconsistent states
|
39
|
+
- Database transaction analysis
|
40
|
+
- Response timing variations
|
41
|
+
</detection_methods>
|
42
|
+
</discovery_techniques>
|
43
|
+
|
44
|
+
<exploitation_tools>
|
45
|
+
<turbo_intruder>
|
46
|
+
Python script for Burp Suite Turbo Intruder:
|
47
|
+
```python
|
48
|
+
def queueRequests(target, wordlists):
|
49
|
+
engine = RequestEngine(endpoint=target.endpoint,
|
50
|
+
concurrentConnections=30,
|
51
|
+
requestsPerConnection=100,
|
52
|
+
pipeline=False)
|
53
|
+
|
54
|
+
for i in range(30):
|
55
|
+
engine.queue(target.req, gate='race1')
|
56
|
+
|
57
|
+
engine.openGate('race1')
|
58
|
+
```
|
59
|
+
</turbo_intruder>
|
60
|
+
|
61
|
+
<manual_methods>
|
62
|
+
- Browser developer tools (multiple tabs)
|
63
|
+
- curl with & for background: curl url & curl url &
|
64
|
+
- Python asyncio/aiohttp
|
65
|
+
- Go routines
|
66
|
+
- Node.js Promise.all()
|
67
|
+
</manual_methods>
|
68
|
+
</exploitation_tools>
|
69
|
+
|
70
|
+
<common_vulnerabilities>
|
71
|
+
<financial_races>
|
72
|
+
- Double withdrawal
|
73
|
+
- Multiple discount applications
|
74
|
+
- Balance transfer duplication
|
75
|
+
- Payment bypass
|
76
|
+
- Cashback multiplication
|
77
|
+
</financial_races>
|
78
|
+
|
79
|
+
<authentication_races>
|
80
|
+
- Multiple password resets
|
81
|
+
- Account creation with same email
|
82
|
+
- 2FA bypass
|
83
|
+
- Session generation collision
|
84
|
+
</authentication_races>
|
85
|
+
|
86
|
+
<resource_races>
|
87
|
+
- Inventory depletion bypass
|
88
|
+
- Rate limit circumvention
|
89
|
+
- File overwrite
|
90
|
+
- Token reuse
|
91
|
+
</resource_races>
|
92
|
+
</common_vulnerabilities>
|
93
|
+
|
94
|
+
<advanced_techniques>
|
95
|
+
<single_packet_attack>
|
96
|
+
HTTP/2 multiplexing for true simultaneous delivery:
|
97
|
+
- All requests in single TCP packet
|
98
|
+
- Microsecond precision
|
99
|
+
- Bypass even mutex locks
|
100
|
+
</single_packet_attack>
|
101
|
+
|
102
|
+
<last_byte_sync>
|
103
|
+
Send all but last byte, then:
|
104
|
+
1. Hold connections open
|
105
|
+
2. Send final byte simultaneously
|
106
|
+
3. Achieve nanosecond precision
|
107
|
+
</last_byte_sync>
|
108
|
+
|
109
|
+
<connection_warming>
|
110
|
+
Pre-establish connections:
|
111
|
+
1. Create connection pool
|
112
|
+
2. Prime with dummy requests
|
113
|
+
3. Send race requests on warm connections
|
114
|
+
</connection_warming>
|
115
|
+
</advanced_techniques>
|
116
|
+
|
117
|
+
<bypass_techniques>
|
118
|
+
<distributed_attacks>
|
119
|
+
- Multiple source IPs
|
120
|
+
- Different user sessions
|
121
|
+
- Varied request headers
|
122
|
+
- Geographic distribution
|
123
|
+
</distributed_attacks>
|
124
|
+
|
125
|
+
<timing_optimization>
|
126
|
+
- Measure server processing time
|
127
|
+
- Align requests with server load
|
128
|
+
- Exploit maintenance windows
|
129
|
+
- Target async operations
|
130
|
+
</timing_optimization>
|
131
|
+
</bypass_techniques>
|
132
|
+
|
133
|
+
<specific_scenarios>
|
134
|
+
<limit_bypass>
|
135
|
+
"Limited to 1 per user" → Send N parallel requests
|
136
|
+
Results: N successful purchases
|
137
|
+
</limit_bypass>
|
138
|
+
|
139
|
+
<balance_manipulation>
|
140
|
+
Transfer $100 from account with $100 balance:
|
141
|
+
- 10 parallel transfers
|
142
|
+
- Each checks balance: $100 available
|
143
|
+
- All proceed: -$900 balance
|
144
|
+
</balance_manipulation>
|
145
|
+
|
146
|
+
<vote_manipulation>
|
147
|
+
Single vote limit:
|
148
|
+
- Send multiple vote requests simultaneously
|
149
|
+
- All pass validation
|
150
|
+
- Multiple votes counted
|
151
|
+
</vote_manipulation>
|
152
|
+
</specific_scenarios>
|
153
|
+
|
154
|
+
<validation>
|
155
|
+
To confirm race condition:
|
156
|
+
1. Demonstrate parallel execution success
|
157
|
+
2. Show single request fails
|
158
|
+
3. Prove timing dependency
|
159
|
+
4. Document financial/security impact
|
160
|
+
5. Achieve consistent reproduction
|
161
|
+
</validation>
|
162
|
+
|
163
|
+
<false_positives>
|
164
|
+
NOT a race condition if:
|
165
|
+
- Idempotent operations
|
166
|
+
- Proper locking mechanisms
|
167
|
+
- Atomic database operations
|
168
|
+
- Queue-based processing
|
169
|
+
- No security impact
|
170
|
+
</false_positives>
|
171
|
+
|
172
|
+
<impact>
|
173
|
+
- Financial loss (double spending)
|
174
|
+
- Resource exhaustion
|
175
|
+
- Data corruption
|
176
|
+
- Business logic bypass
|
177
|
+
- Privilege escalation
|
178
|
+
</impact>
|
179
|
+
|
180
|
+
<pro_tips>
|
181
|
+
1. Use HTTP/2 for better synchronization
|
182
|
+
2. Automate with Turbo Intruder
|
183
|
+
3. Test payment flows extensively
|
184
|
+
4. Monitor database locks
|
185
|
+
5. Try different concurrency levels
|
186
|
+
6. Test async operations
|
187
|
+
7. Look for compensating transactions
|
188
|
+
8. Check mobile app endpoints
|
189
|
+
9. Test during high load
|
190
|
+
10. Document exact timing windows
|
191
|
+
</pro_tips>
|
192
|
+
|
193
|
+
<remember>Modern race conditions require microsecond precision. Focus on financial operations and limited resource allocation. Single-packet attacks are most reliable.</remember>
|
194
|
+
</race_conditions_guide>
|