@aegis-scan/skills 0.1.1

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.
Files changed (69) hide show
  1. package/ATTRIBUTION.md +75 -0
  2. package/CHANGELOG.md +129 -0
  3. package/LICENSE +21 -0
  4. package/README.md +123 -0
  5. package/dist/bin.d.ts +3 -0
  6. package/dist/bin.d.ts.map +1 -0
  7. package/dist/bin.js +122 -0
  8. package/dist/bin.js.map +1 -0
  9. package/dist/commands/info.d.ts +5 -0
  10. package/dist/commands/info.d.ts.map +1 -0
  11. package/dist/commands/info.js +75 -0
  12. package/dist/commands/info.js.map +1 -0
  13. package/dist/commands/install.d.ts +7 -0
  14. package/dist/commands/install.d.ts.map +1 -0
  15. package/dist/commands/install.js +87 -0
  16. package/dist/commands/install.js.map +1 -0
  17. package/dist/commands/list.d.ts +7 -0
  18. package/dist/commands/list.d.ts.map +1 -0
  19. package/dist/commands/list.js +82 -0
  20. package/dist/commands/list.js.map +1 -0
  21. package/dist/index.d.ts +13 -0
  22. package/dist/index.d.ts.map +1 -0
  23. package/dist/index.js +13 -0
  24. package/dist/index.js.map +1 -0
  25. package/dist/skills-loader.d.ts +23 -0
  26. package/dist/skills-loader.d.ts.map +1 -0
  27. package/dist/skills-loader.js +213 -0
  28. package/dist/skills-loader.js.map +1 -0
  29. package/package.json +63 -0
  30. package/skills/defensive/README.md +9 -0
  31. package/skills/mitre-mapped/README.md +10 -0
  32. package/skills/offensive/snailsploit-fork/advanced-redteam/SKILL.md +148 -0
  33. package/skills/offensive/snailsploit-fork/ai-security/SKILL.md +592 -0
  34. package/skills/offensive/snailsploit-fork/basic-exploitation/SKILL.md +10783 -0
  35. package/skills/offensive/snailsploit-fork/bug-identification/SKILL.md +1256 -0
  36. package/skills/offensive/snailsploit-fork/crash-analysis/SKILL.md +12466 -0
  37. package/skills/offensive/snailsploit-fork/deserialization/SKILL.md +185 -0
  38. package/skills/offensive/snailsploit-fork/edr-evasion/SKILL.md +1806 -0
  39. package/skills/offensive/snailsploit-fork/exploit-dev-course/SKILL.md +428 -0
  40. package/skills/offensive/snailsploit-fork/exploit-development/SKILL.md +699 -0
  41. package/skills/offensive/snailsploit-fork/fast-checking/SKILL.md +487 -0
  42. package/skills/offensive/snailsploit-fork/file-upload/SKILL.md +822 -0
  43. package/skills/offensive/snailsploit-fork/fuzzing/SKILL.md +340 -0
  44. package/skills/offensive/snailsploit-fork/fuzzing-course/SKILL.md +2105 -0
  45. package/skills/offensive/snailsploit-fork/graphql/SKILL.md +209 -0
  46. package/skills/offensive/snailsploit-fork/idor/SKILL.md +608 -0
  47. package/skills/offensive/snailsploit-fork/initial-access/SKILL.md +1528 -0
  48. package/skills/offensive/snailsploit-fork/jwt/SKILL.md +276 -0
  49. package/skills/offensive/snailsploit-fork/keylogger-arch/SKILL.md +197 -0
  50. package/skills/offensive/snailsploit-fork/mitigations/SKILL.md +1351 -0
  51. package/skills/offensive/snailsploit-fork/oauth/SKILL.md +366 -0
  52. package/skills/offensive/snailsploit-fork/open-redirect/SKILL.md +487 -0
  53. package/skills/offensive/snailsploit-fork/osint/SKILL.md +399 -0
  54. package/skills/offensive/snailsploit-fork/osint-methodology/SKILL.md +434 -0
  55. package/skills/offensive/snailsploit-fork/parameter-pollution/SKILL.md +595 -0
  56. package/skills/offensive/snailsploit-fork/race-condition/SKILL.md +881 -0
  57. package/skills/offensive/snailsploit-fork/rce/SKILL.md +1069 -0
  58. package/skills/offensive/snailsploit-fork/request-smuggling/SKILL.md +773 -0
  59. package/skills/offensive/snailsploit-fork/shellcode/SKILL.md +477 -0
  60. package/skills/offensive/snailsploit-fork/sqli/SKILL.md +372 -0
  61. package/skills/offensive/snailsploit-fork/ssrf/SKILL.md +830 -0
  62. package/skills/offensive/snailsploit-fork/ssti/SKILL.md +349 -0
  63. package/skills/offensive/snailsploit-fork/vuln-classes/SKILL.md +1229 -0
  64. package/skills/offensive/snailsploit-fork/waf-bypass/SKILL.md +820 -0
  65. package/skills/offensive/snailsploit-fork/windows-boundaries/SKILL.md +15153 -0
  66. package/skills/offensive/snailsploit-fork/windows-mitigations/SKILL.md +14546 -0
  67. package/skills/offensive/snailsploit-fork/xss/SKILL.md +784 -0
  68. package/skills/offensive/snailsploit-fork/xxe/SKILL.md +996 -0
  69. package/skills/ops/README.md +6 -0
@@ -0,0 +1,487 @@
1
+ <!-- aegis-local: forked 2026-04-23 from SnailSploit/Claude-Red@c74d53e2938b59f111572e0819265a1e73029393; attribution preserved, see ATTRIBUTION.md -->
2
+
3
+ # SKILL: Open Redirect Vulnerabilities
4
+
5
+ ## Metadata
6
+ - **Skill Name**: open-redirect
7
+ - **Folder**: offensive-open-redirect
8
+ - **Source**: https://github.com/SnailSploit/offensive-checklist/blob/main/open-redirect.md
9
+
10
+ ## Description
11
+ Open redirect vulnerability checklist: parameter identification, bypass techniques (URL encoding, double slashes, CRLF injection, protocol handlers), chaining with OAuth/SSRF, and impact escalation paths. Use for web app testing and bug bounty open redirect discovery.
12
+
13
+ ## Trigger Phrases
14
+ Use this skill when the conversation involves any of:
15
+ `open redirect, URL redirect, redirect bypass, URL encoding bypass, CRLF, protocol handler, redirect chain, OAuth redirect, SSRF chain, open redirection`
16
+
17
+ ## Instructions for Claude
18
+
19
+ When this skill is active:
20
+ 1. Load and apply the full methodology below as your operational checklist
21
+ 2. Follow steps in order unless the user specifies otherwise
22
+ 3. For each technique, consider applicability to the current target/context
23
+ 4. Track which checklist items have been completed
24
+ 5. Suggest next steps based on findings
25
+
26
+ ---
27
+
28
+ ## Full Methodology
29
+
30
+ # Open Redirect Vulnerabilities
31
+
32
+ ## Shortcut
33
+
34
+ - Search for redirect URL parameters. These might be vulnerable to parameter based open redirect.
35
+ - Search for pages that perform referer based redirect. These are candidates for a referer based open redirect.
36
+ - Test the pages and parameters you've found for open redirect.
37
+ - If the server blocks the open redirect, try the protection bypass techniques mentioned before.
38
+ - Brainstorm ways of using the open redirect in your other bug chains.
39
+
40
+ ## Mechanisms
41
+
42
+ Open redirect vulnerabilities occur when web applications improperly validate user-supplied URLs used for redirections. These vulnerabilities allow attackers to craft links that appear legitimate but redirect victims to malicious websites. When exploited, the victim initially connects to a trusted domain, giving the malicious link an appearance of legitimacy, before being redirected to an attacker-controlled destination.
43
+
44
+ ```mermaid
45
+ sequenceDiagram
46
+ participant Victim
47
+ participant TrustedSite
48
+ participant AttackerSite
49
+
50
+ Victim->>TrustedSite: Click malicious link<br/>trusted.com/redirect?url=evil.com
51
+ Note over TrustedSite: Inadequate URL validation
52
+ TrustedSite->>Victim: HTTP 302 Redirect to evil.com
53
+ Victim->>AttackerSite: Automatic redirect
54
+ AttackerSite->>Victim: Malicious content
55
+ ```
56
+
57
+ The core technical flaws leading to open redirects include:
58
+
59
+ - **Insufficient URL Validation**: Failure to properly validate redirect targets
60
+ - **Improper Allowlist Implementation**: Flawed validation logic that can be bypassed
61
+ - **Inadequate Sanitization**: Incorrect handling of special characters or encoding
62
+ - **Trusting Client-Side Input**: Using user-supplied parameters for redirection without verification
63
+
64
+ ### Notes
65
+
66
+ - Browsers restrict `javascript:` navigations from cross-origin contexts more, but many apps forward redirects to clients; validate server-side before emitting 3xx.
67
+ - OAuth/SSO stacks increasingly require exact `redirect_uri` match; test for partial/path-only allowlists and case/encoding mismatches.
68
+ - Mobile deep links: open redirects can escalate to app link hijack; test `intent:` URLs on Android and iOS universal link fallbacks.
69
+
70
+ ### Modern Browser Behaviors
71
+
72
+ - **Chrome 120+ Restrictions**: Enhanced protection against cross-site redirects; test if app relies on specific redirect chains
73
+ - **SameSite Cookie Implications**: `SameSite=Lax` default affects redirect flows; test authentication state preservation
74
+ - **Referrer-Policy Impact**: `no-referrer` or `strict-origin` may break redirect detection; test logging/analytics dependencies
75
+ - **COOP/COEP Headers**: Cross-Origin-Opener-Policy can break popup-based OAuth flows
76
+ - **Fenced Frames**: New iframe replacement affects redirect chains in isolated contexts
77
+
78
+ Open redirects can exist in various implementation patterns:
79
+
80
+ - **URL Parameter Redirects**: Explicit redirect parameters (e.g., `?redirect=`, `?url=`, `?next=`)
81
+ - **Path-Based Redirects**: URL paths that trigger redirects (e.g., `/redirect/https://example.com`)
82
+ - **Referer-Based Redirects**: Redirects based on the HTTP Referer header
83
+ - **Post-Authentication Redirects**: Return URLs after login or authentication flows
84
+ - **URL Shorteners**: Services that redirect to expanded URLs
85
+ - **Framework Redirector Endpoints**: Dedicated redirection functionality in web frameworks
86
+
87
+ ## Hunt
88
+
89
+ ### Identifying Open Redirect Vulnerabilities
90
+
91
+ #### Target Discovery
92
+
93
+ 1. **Identify Redirection Parameters**:
94
+ - Common redirect parameter names:
95
+ ```
96
+ redirect, redirect_to, url, link, goto, return, returnTo, destination,
97
+ next, checkout, checkout_url, continue, return_path, return_url,
98
+ forward, path, redir, redirect_uri, view, img_url, image_url, load_url
99
+ ```
100
+
101
+ 2. **Find Redirection Endpoints**:
102
+ - Social login integrations
103
+ - Authentication flows
104
+ - Payment gateways
105
+ - "Share" functionality
106
+ - URL shorteners
107
+ - SSO implementations
108
+ - File/resource access endpoints
109
+
110
+ 3. **Search Code and Documentation**:
111
+ - Review JavaScript for redirect functions
112
+ - Check for framework-specific redirect endpoints
113
+ - Analyze HTTP 3xx response patterns
114
+
115
+ #### Testing Methodologies
116
+
117
+ 1. **Basic Open Redirect Testing**:
118
+ - Test with absolute URLs:
119
+ ```
120
+ https://target.com/redirect?url=https://attacker.com
121
+ https://target.com/redirect?next=https://attacker.com
122
+ ```
123
+ - Test with protocol-relative URLs:
124
+ ```
125
+ https://target.com/redirect?url=//attacker.com
126
+ ```
127
+ - Test with relative path traversal:
128
+ ```
129
+ https://target.com/redirect?url=/../redirect?url=https://attacker.com
130
+ ```
131
+
132
+ 2. **Referer-Based Open Redirect Testing**:
133
+ - Identify pages that redirect based on Referer header
134
+ - Modify Referer header to external domains
135
+ - Test login/logout pages with custom Referer values
136
+
137
+ 3. **OAuth Redirect Testing**:
138
+ - Identify OAuth implementation redirect_uri parameters
139
+ - Test for improper validation:
140
+ ```
141
+ https://target.com/oauth/authorize?client_id=CLIENT_ID&redirect_uri=https://attacker.com
142
+ ```
143
+
144
+ ## Bypass Techniques
145
+
146
+ ```mermaid
147
+ graph TD
148
+ subgraph "Open Redirect Bypass Techniques"
149
+ A[Validation Bypasses] --> B[Domain Spoofing]
150
+ A --> C[Encoding Bypasses]
151
+ A --> D[Protocol Confusion]
152
+ A --> E[Path-Based Bypasses]
153
+ A --> F[Special Character Abuse]
154
+
155
+ B --> B1["target.com.attacker.com"]
156
+ B --> B2["attacker.com?target.com"]
157
+
158
+ C --> C1["URL Encoding: %68%74%74%70%73..."]
159
+ C --> C2["Double Encoding"]
160
+
161
+ D --> D1["javascript:alert(1)"]
162
+ D --> D2["data:text/html;base64,..."]
163
+
164
+ E --> E1["////attacker.com"]
165
+ E --> E2["/\/attacker.com"]
166
+
167
+ F --> F1["target.com@attacker.com"]
168
+ F --> F2["attacker.com#target.com"]
169
+ end
170
+ ```
171
+
172
+ ### Domain Spoofing Techniques
173
+
174
+ ```
175
+ https://target.com/redirect?url=https://target.com.attacker.com
176
+ https://target.com/redirect?url=https://attacker.com?target.com
177
+ https://target.com/redirect?url=https://attackertarget.com
178
+ ```
179
+
180
+ ### CDN/Reverse Proxy Quirks
181
+
182
+ - Mixed scheme parsing (https;/) accepted upstream but normalized downstream.
183
+ - Double decode at different layers (edge vs. origin) enabling `%252F` style bypass.
184
+ - Header-driven redirects (X-Original-URL, X-Forwarded-Proto) abused through misconfigured proxies.
185
+
186
+ ### Encoding Bypass Techniques
187
+
188
+ ```
189
+ https://target.com/redirect?url=https%3A%2F%2Fattacker.com
190
+ https://target.com/redirect?url=%68%74%74%70%73%3a%2f%2f%61%74%74%61%63%6b%65%72%2e%63%6f%6d
191
+ ```
192
+
193
+ ### Protocol Confusion Bypasses
194
+
195
+ ```
196
+ https://target.com/redirect?url=javascript:alert(document.domain)
197
+ https://target.com/redirect?url=data:text/html;base64,PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg==
198
+ https://target.com/redirect?url=https;/attacker.com
199
+ ```
200
+
201
+ ### Path-Based Bypasses
202
+
203
+ ```
204
+ https://target.com/redirect?url=/\/attacker.com
205
+ https://target.com/redirect?url=////attacker.com
206
+ https://target.com/redirect?url=\/\/attacker.com/
207
+ ```
208
+
209
+ ### Special Character Abuse
210
+
211
+ ```
212
+ https://target.com/redirect?url=https://target.com@attacker.com
213
+ https://target.com/redirect?url=https://attacker.com#target.com
214
+ https://target.com/redirect?url=https://attacker.com\@target.com
215
+ ```
216
+
217
+ ## Vulnerabilities
218
+
219
+ ### Common Open Redirect Vulnerability Patterns
220
+
221
+ #### Implementation-Specific Vulnerabilities
222
+
223
+ 1. **Framework Redirector Vulnerabilities**:
224
+ - **Spring MVC**: Improper handling of the `url` parameter
225
+ ```
226
+ /spring/login?url=https://attacker.com
227
+ ```
228
+ - **Laravel**: Unvalidated redirect in `redirect()` helper
229
+ ```
230
+ /redirect?url=https://attacker.com
231
+ ```
232
+ - **Express.js**: Unvalidated `res.redirect()` calls
233
+ ```
234
+ /login?redirect=https://attacker.com
235
+ ```
236
+ - **Next.js (App Router)**: Server Actions redirect abuse
237
+ ```
238
+ // Test Server Action redirect injection
239
+ /api/action?redirect=https://attacker.com
240
+ ```
241
+ - **SvelteKit**: `goto()` and `redirect()` manipulation
242
+ ```
243
+ // Test in hooks.server.ts
244
+ /auth/callback?redirectTo=https://attacker.com
245
+ ```
246
+ - **Remix**: loader/action redirect injection
247
+ ```
248
+ /login?redirectTo=https://attacker.com
249
+ ```
250
+ - **Astro**: redirect() in API routes
251
+ ```
252
+ /api/redirect?url=https://attacker.com
253
+ ```
254
+
255
+ 2. **OAuth Implementation Vulnerabilities**:
256
+ - **Implicit Flow Redirect**: Missing validation in `redirect_uri`
257
+ ```
258
+ /oauth/authorize?response_type=token&redirect_uri=https://attacker.com
259
+ ```
260
+ - **Authorization Code Flow**: Improper `state` parameter handling
261
+ ```
262
+ /oauth/callback?code=ABC123&state=https://attacker.com
263
+ ```
264
+
265
+ 3. **Social Login Vulnerabilities**:
266
+ - **Facebook Login**: Unvalidated return_url parameter
267
+ ```
268
+ /login/facebook/callback?return_url=https://attacker.com
269
+ ```
270
+ - **Google OAuth**: Improper redirect_uri validation
271
+ ```
272
+ /auth/google/callback?redirect_uri=https://attacker.com
273
+ ```
274
+
275
+ ### Impact Scenarios
276
+
277
+ ```mermaid
278
+ graph LR
279
+ subgraph "Open Redirect Impact Scenarios"
280
+ A[Open Redirect] --> B[Phishing Attacks]
281
+ A --> C[CSRF Augmentation]
282
+ A --> D[Advanced Attack Chains]
283
+
284
+ B --> B1[Domain Credibility Abuse]
285
+ B --> B2[Context-Aware Phishing]
286
+
287
+ C --> C1[Redirect Chaining]
288
+ C --> C2[Login CSRF]
289
+
290
+ D --> D1[XSS via Redirect]
291
+ D --> D2[SSRF via Redirect]
292
+ D --> D3[OAuth Token Theft]
293
+ end
294
+ ```
295
+
296
+ #### Phishing Attack Vectors
297
+
298
+ - **Domain Credibility Abuse**: Leveraging trusted domain for phishing
299
+ - **Session Fixation Enhancement**: Combining with session fixation attacks
300
+ - **Context-Aware Phishing**: Using information from the original site
301
+
302
+ #### CSRF Augmentation
303
+
304
+ - **Redirect Chaining**: Creating multi-step attack chains
305
+ - **Login CSRF**: Forcing login to attacker-controlled accounts
306
+
307
+ #### Advanced Attack Chains
308
+
309
+ - **XSS via Open Redirect**: Using JavaScript URIs for XSS
310
+ ```
311
+ https://target.com/redirect?url=javascript:alert(document.cookie)
312
+ ```
313
+ - **SSRF via Open Redirect**: Internal service access
314
+ ```
315
+ https://target.com/redirect?url=http://internal-service/admin
316
+ ```
317
+ - **OAuth Token Theft**: Stealing OAuth tokens via redirect_uri manipulation
318
+
319
+ ## Methodologies
320
+
321
+ ### Tools
322
+
323
+ #### Open Redirect Detection Tools
324
+
325
+ - **OWASP ZAP**: Open redirect scanner
326
+ - **Burp Suite**: Collaborator for testing blind redirects
327
+ - **OpenRedireX**: Specialized open redirect testing tool
328
+ - **Gxss**: Tool to check for redirect XSS
329
+ - **Waybackurls**: For discovering historical redirect endpoints
330
+ - **Param Spider**: For discovering URL parameters
331
+
332
+ #### Custom Detection Scripts
333
+
334
+ ```python
335
+ import requests
336
+ from urllib.parse import urlparse
337
+
338
+ def test_open_redirect(target_url, redirect_param, payloads):
339
+ for payload in payloads:
340
+ test_url = f"{target_url}{redirect_param}={payload}"
341
+ try:
342
+ # Disable redirects to manually check
343
+ response = requests.get(test_url, allow_redirects=False, timeout=10)
344
+ if response.status_code in [301, 302, 303, 307, 308]:
345
+ location = response.headers.get('Location', '')
346
+ parsed = urlparse(location)
347
+ if parsed.netloc and parsed.netloc not in target_domain:
348
+ print(f"Potential Open Redirect: {test_url} -> {location}")
349
+ except Exception as e:
350
+ print(f"Error testing {test_url}: {e}")
351
+
352
+ # Target website
353
+ target_url = "https://target.com/redirect?"
354
+ target_domain = "target.com"
355
+ redirect_param = "url"
356
+
357
+ # Common bypass payloads
358
+ payloads = [
359
+ "https://attacker.com",
360
+ "//attacker.com",
361
+ "https%3A%2F%2Fattacker.com",
362
+ "/\/attacker.com",
363
+ "https://target.com@attacker.com",
364
+ "https://target.com.attacker.com",
365
+ "javascript:alert(document.domain)"
366
+ ]
367
+
368
+ test_open_redirect(target_url, redirect_param, payloads)
369
+ ```
370
+
371
+ ### Testing Strategies
372
+
373
+ ```mermaid
374
+ flowchart TD
375
+ A[Open Redirect Testing Strategy] --> B[Discovery Phase]
376
+ A --> C[Initial Testing]
377
+ A --> D[Bypass Testing]
378
+ A --> E[Exploitation]
379
+ A --> F[Documentation]
380
+
381
+ B --> B1[Map redirect functionality]
382
+ B --> B2[Identify parameters]
383
+ B --> B3[Review source code]
384
+
385
+ C --> C1[Test basic payloads]
386
+ C --> C2[Observe behavior]
387
+
388
+ D --> D1[Test domain validation bypasses]
389
+ D --> D2[Test encoding bypasses]
390
+
391
+ E --> E1[Create PoC exploits]
392
+ E --> E2[Chain with other vulnerabilities]
393
+
394
+ F --> F1[Document vulnerable endpoints]
395
+ F --> F2[Note successful bypasses]
396
+ ```
397
+
398
+ #### Comprehensive Open Redirect Testing Process
399
+
400
+ 1. **Discovery Phase**:
401
+ - Map all redirection functionality
402
+ - Identify redirect parameters through:
403
+ - Manual testing
404
+ - Automated crawling
405
+ - Source code review
406
+ - Parameter discovery tools
407
+
408
+ 2. **Initial Testing Phase**:
409
+ - Test basic payload patterns:
410
+ ```
411
+ ?redirect=https://attacker.com
412
+ ?redirect=//attacker.com
413
+ ?redirect=\/\/attacker.com
414
+ ```
415
+ - Observe redirection behavior
416
+ - Document instances of successful redirects
417
+
418
+ 3. **Bypass Testing Phase**:
419
+ - Test against identified protection mechanisms:
420
+ - Domain validation bypasses
421
+ - Encoding bypasses
422
+ - Protocol bypasses
423
+ - Path manipulation bypasses
424
+
425
+ 4. **Exploitation Phase**:
426
+ - Create proof-of-concept exploits
427
+ - Chain with other vulnerabilities where possible
428
+ - Demonstrate potential impact scenarios
429
+
430
+ 5. **Documentation Phase**:
431
+ - Document vulnerable parameters and endpoints
432
+ - Note successful bypass techniques
433
+ - Provide clear reproduction steps
434
+
435
+ ### Real-World Testing Examples
436
+
437
+ #### OAuth Redirect Testing
438
+
439
+ 1. Identify OAuth implementation
440
+ 2. Locate redirect_uri parameter
441
+ 3. Test various redirect_uri values:
442
+ - https://attacker.com
443
+ - https://target.com.attacker.com
444
+ - https://targetattacker.com
445
+ 4. Check for token leakage in the redirection
446
+
447
+ #### Post-Authentication Redirect Testing
448
+
449
+ 1. Authenticate to the application
450
+ 2. Identify post-login redirects
451
+ 3. Test redirect parameters with different formats:
452
+ - Absolute URLs: `https://attacker.com`
453
+ - Relative with protocol: `//attacker.com`
454
+ - Encoded values: `%68%74%74%70%73%3a%2f%2f%61%74%74%61%63%6b%65%72%2e%63%6f%6d`
455
+
456
+ #### URL Shortener Testing
457
+
458
+ 1. Identify URL shortening functionality
459
+ 2. Submit malicious URLs for shortening
460
+ 3. Test shortening of various payload formats:
461
+ - javascript:alert(1)
462
+ - data: URLs
463
+ - Protocol-less URLs: //attacker.com
464
+
465
+ ## Remediation Recommendations
466
+
467
+ - **Implement Proper Validation**:
468
+ - Use allowlists of permitted domains
469
+ - Validate using server-side logic (not client-side)
470
+ - Implement URI parsing libraries for proper validation
471
+
472
+ - **Use Indirect References**:
473
+ - Instead of directly using user input for redirects, map to server-side values
474
+ - Example: Use numeric IDs that map to pre-approved URLs
475
+
476
+ - **Implement Safe Redirect Patterns**:
477
+ - Create a warning page for external redirects
478
+ - Include clear indicators of leaving the site
479
+ - Add visual cues for external navigation
480
+
481
+ - **Technical Controls**:
482
+ - Validate protocol (only http/https)
483
+ - Validate domain against allowlist
484
+ - Use full URL parsing rather than simple string checks
485
+ - Implement CSRF protection for redirect endpoints
486
+ - For mobile deep links, validate package/bundle IDs and enforce App Links/Universal Links verification.
487
+