offensive-parameter-pollution
This Claude Code skill provides a systematic methodology for testing HTTP parameter pollution vulnerabilities in web applications. It includes a detailed checklist covering duplicate parameter injection, server-specific parsing differences across technologies like ASP.NET, PHP, JSP, and Node.js, and techniques for bypassing web application firewalls through parameter handling discrepancies. Use this skill when assessing web application security for parameter handling flaws or when exploring WAF evasion vectors through inconsistent parameter processing.
git clone --depth 1 https://github.com/SnailSploit/Claude-Red /tmp/offensive-parameter-pollution && cp -r /tmp/offensive-parameter-pollution/Skills/web/offensive-parameter-pollution ~/.claude/skills/offensive-parameter-pollutionSKILL.md
# SKILL: HTTP Parameter Pollution (HPP)
## Metadata
- **Skill Name**: parameter-pollution
- **Folder**: offensive-parameter-pollution
- **Source**: https://github.com/SnailSploit/offensive-checklist/blob/main/parameter-pollution.md
## Description
HTTP parameter pollution (HPP) checklist: duplicate parameter injection, backend vs frontend parsing differences, WAF bypass via HPP, server-side vs client-side HPP, and practical exploitation patterns. Use when testing web applications for parameter handling flaws.
## Trigger Phrases
Use this skill when the conversation involves any of:
`parameter pollution, HTTP parameter pollution, HPP, duplicate parameter, WAF bypass, parsing differences, server-side HPP, client-side HPP, parameter injection`
## Instructions for Claude
When this skill is active:
1. Load and apply the full methodology below as your operational checklist
2. Follow steps in order unless the user specifies otherwise
3. For each technique, consider applicability to the current target/context
4. Track which checklist items have been completed
5. Suggest next steps based on findings
---
## Full Methodology
# HTTP Parameter Pollution (HPP)
## Mechanisms
HTTP Parameter Pollution (HPP) is a web attack technique that exploits how web applications and servers handle multiple occurrences of the same parameter name. When a web application receives duplicate parameters, different technologies process them differently:
```mermaid
flowchart TD
subgraph "HTTP Parameter Pollution"
A[Multiple occurrences of same parameter] --> B{Server Technology}
B -->|ASP.NET/IIS| C[Uses first occurrence]
B -->|PHP/Apache| D[Uses last occurrence]
B -->|JSP/Tomcat| E[Uses first occurrence]
B -->|Perl CGI| F[Concatenates with comma]
B -->|Python/Flask| G[Builds array of values]
B -->|Node.js/Express| H[Uses first occurrence]
end
```
### Parameter Handling Behaviors
- **ASP.NET/IIS**: Uses the first occurrence of the parameter
- **PHP/Apache**: Uses the last occurrence of the parameter
- **JSP/Tomcat**: Uses the first occurrence of the parameter
- **Perl CGI/Apache**: Concatenates all occurrences with a comma delimiter
- **Python/Flask**: Builds an array of values
- **Node.js/Express**: Uses the first occurrence by default
### Notes and modern caveats
- Node.js `express` uses either `querystring` (first-wins) or `qs` (arrays/last-wins). `app.set('query parser', 'extended')` changes behavior. Many middlewares assume `param[]=a¶m[]=b` for arrays; duplicates without `[]` can produce surprising results.
- Spring MVC/Spring Boot binders often collect duplicates into lists; API gateways (Kong, APIGEE, NGINX, Cloudflare) may collapse/normalize differently than backends.
- JSON duplicate keys: most parsers accept last-wins; some gateways reject duplicates while backends accept, creating precedence gaps.
- Cookies: duplicate cookie names and comma/semicolon handling vary by proxies/agents.
HPP attacks leverage these inconsistencies in parameter handling across application layers, servers, proxies, and frameworks. Two main types of HPP exist:
1. **Server-side HPP**: Exploiting the server's handling of multiple parameters
2. **Client-side HPP**: Manipulating parameters that are later processed by client-side code
## Hunt
### Identifying HPP Vulnerabilities
```mermaid
sequenceDiagram
participant Attacker
participant WebApp
participant Backend
Attacker->>WebApp: Request with duplicate parameter<br/>param=safe¶m=malicious
Note over WebApp: Layer 1 processes first value
WebApp->>Backend: Forward request to backend
Note over Backend: Layer 2 processes last value
Backend->>WebApp: Process with malicious value
WebApp->>Attacker: Response
```
#### Testing Parameter Handling
1. Identify forms and request parameters
2. Test duplicate parameters with different values:
```
// Original request
https://example.com/search?param=value1
// Test request
https://example.com/search?param=value1¶m=value2
```
3. Observe application behavior
4. Identify which value is used (first, last, concatenated)
#### Vulnerable Scenarios
- **Parameter Overriding**: Search for places where parameters might be overridden
- **Request Proxies**: Applications forwarding requests to other services
- **Query String Processing**: Applications that process query strings manually
- **Multiple-Layer Processing**: Applications where parameters pass through multiple layers
- **OAuth/SAML Flows**: Authentication flows where parameters may be manipulated
### Testing Techniques
#### URL Parameter Pollution
```
# Original URL
https://target.com/page?parameter=original_value
# Polluted URL
https://target.com/page?parameter=original_value¶meter=malicious_value
```
#### Form Parameter Pollution
1. Intercept a legitimate form submission
2. Add duplicate parameters with different values:
```
// Original POST body
parameter=original_value
// Modified POST body
parameter=original_value¶meter=malicious_value
```
#### Hybrid Parameter Pollution
Combining parameters in both URL and POST body:
```
// URL
https://target.com/page?parameter=url_value
// POST body
parameter=body_value
```
#### JSON Parameter Pollution
Testing duplicate keys in JSON objects:
```json
{
"parameter": "value1",
"parameter": "value2"
}
```
Also test:
```http
Cookie: role=user; role=admin
X-Role: user
X-Role: admin
```
Observe which value the application trusts.
#### GraphQL Parameter Pollution
GraphQL queries can be polluted through aliasing, batch mutations, and duplicate variables:
```graphql
# Alias pollution - bypass rate limits
query {
a: user(id: 1) {
name
email
}
b: user(id: 2) {
name
email
}
c: user(id: 3) {
name
email
}
# ... repeat to z or beyond
}
# Variable pollution
query ($id: Int!, $id: Int!) {
user(id: $id) {
name
}
}
# Batch mutation pollution
mutation {
a: redeemCoupActive Directory attack methodology for internal network red team engagements. Covers reconnaissance (BloodHound, PowerView, ADExplorer), credential abuse (Kerberoasting, ASREProasting, NTLM relay, LLMNR/NBT-NS poisoning), privilege escalation (ACL abuse, GPO abuse, unconstrained/constrained delegation), lateral movement (Pass-the-Hash, Pass-the-Ticket, Overpass-the-Hash, WMI/WinRM/PsExec), persistence (Golden/Silver/Diamond Tickets, DCSync, DCShadow, AdminSDHolder, Skeleton Key), forest trust attacks, ADCS abuse (ESC1-ESC15), and modern MDI/Defender for Identity evasion. Use when assessing on-prem AD, hybrid AD/Entra ID environments, or ADCS deployments.
Comprehensive red team operations methodology covering full engagement lifecycle from planning through reporting. Addresses engagement scoping and rules of engagement negotiation, multi-tier C2 infrastructure design with redirectors and domain fronting, malleable traffic profiles and beacon tradecraft, OPSEC discipline including attribution avoidance and indicator management, EDR and AMSI evasion techniques using direct syscalls and unhooking, data collection with chain-of-custody controls, and structured reporting with purple team debrief workflows. Covers assumed-breach, external-to-internal, insider threat, and hybrid physical-cyber engagement scenarios with MITRE ATT&CK mapping throughout. Targets operators planning or executing adversary simulation engagements against mature defenders.
Anti-forensics and evidence destruction techniques for red team operators conducting authorized engagements. Covers log clearing on Windows (wevtutil, Clear-EventLog, ETW provider patching) and Linux (journal truncation, utmp/wtmp binary editing, syslog manipulation), timestamp manipulation via Timestomp and SetMACE to defeat timeline analysis, filesystem-level anti-forensics including NTFS Alternate Data Streams for payload hiding and secure deletion with sdelete/shred, memory artifact removal to counter live forensics, disk artifact manipulation targeting MFT entries and USN journal records, network forensics evasion through encrypted C2 channels and DNS-over-HTTPS tunneling, and anti-VM/sandbox detection to avoid dynamic analysis environments. Tools: Timestomp, wevtutil, sdelete, shred, MimiPenguin, Invoke-Phant0m. Aligns to MITRE ATT&CK T1070 (Indicator Removal), T1027 (Obfuscated Files or Information), T1497 (Virtualization/Sandbox Evasion). Each technique includes the forensic artifact it targets, the destruction or manipulation method, and the defender perspective so operators understand detection gaps they must account for.
Advanced API exploitation methodology focused on business logic abuse and sophisticated attack patterns that bypass traditional security controls. Covers business logic bypass through API call chaining and workflow manipulation. Addresses GraphQL-specific attacks including batching for credential brute-force, query depth exploitation, and introspection abuse. Includes pagination exploitation for data exfiltration, webhook hijacking for SSRF and data interception, and resource exhaustion through algorithmic complexity attacks. Covers race conditions in API transactions using parallel request techniques. Provides comprehensive JWT manipulation including algorithm confusion, kid injection, jku/x5u abuse, and claim tampering. Details API key leakage detection across source repositories, client-side code, and error messages. Covers undocumented endpoint discovery through predictable naming, debug routes, and source map analysis. Tooling includes Arjun, ParamSpider, jwt_tool, and GraphQL Voyager. Designed for authorized penetration testers targeting business logic layers that automated scanners miss.
Comprehensive API security testing methodology covering REST, gRPC, and WebSocket attack surfaces. Addresses the full OWASP API Security Top 10 2023 including BOLA/IDOR, broken authentication, excessive data exposure, rate limiting bypass, BFLA, mass assignment, SSRF, and security misconfiguration. Includes REST-specific attacks such as HTTP verb tampering, content-type switching, and parameter pollution. Covers gRPC exploitation through protobuf interception, reflection API enumeration, and metadata injection. Addresses WebSocket vulnerabilities including origin bypass, message injection, and cross-site WebSocket hijacking. Provides tooling guidance for Burp Suite, Postman, grpcurl, websocat, and mitmproxy. Each technique includes detection signatures and defensive indicators so you understand what artifacts your testing leaves behind. Designed for authorized penetration testing engagements against API-driven architectures.
Bluetooth Low Energy (BLE) attack methodology — GATT enumeration, characteristic read/write without auth, pairing downgrade (Just Works forced), LE Secure Connections bypass, MITM via active relay, sniffing with Sniffle (TI CC1352) / Ubertooth / Frontline, encryption key extraction (LE Legacy Pairing crackable, LE Secure Connections strong), proximity authentication abuse (cars, locks), and companion-app trust analysis. Use for IoT BLE devices, smart locks, fitness trackers, medical devices, BLE beacons, or any device pairing over BLE.