Search K
Appearance
Appearance
Other ways to support HackTricks:
HTTP Parameter Pollution (HPP) is a technique where attackers manipulate HTTP parameters to change the behavior of a web application in unintended ways. This manipulation is done by adding, modifying, or duplicating HTTP parameters. The effect of these manipulations is not directly visible to the user but can significantly alter the application's functionality on the server side, with observable impacts on the client side.
A banking application transaction URL:
https://www.victim.com/send/?from=accountA&to=accountB&amount=10000
By inserting an additional from
parameter:
https://www.victim.com/send/?from=accountA&to=accountB&amount=10000&from=accountC
The transaction may be incorrectly charged to accountC
instead of accountA
, showcasing the potential of HPP to manipulate transactions or other functionalities such as password resets, 2FA settings, or API key requests.
OTP Manipulation Case:
email
parameter in the HTTP request.This scenario highlights a critical oversight in the application's backend, which processed the first email
parameter for OTP generation but used the last for delivery.
API Key Manipulation Case:
api_key
parameter to the POST request, they can manipulate the outcome of the API key update function.api_key
parameters: one legitimate and one malicious. The server, processing only the last occurrence, updates the API key to the attacker's provided value.This example further underscores the necessity for secure parameter handling, especially in features as critical as API key management.
The way web technologies handle duplicate HTTP parameters varies, affecting their susceptibility to HPP attacks:
a=1
in a query string a=1&a=2
, prioritizing the initial instance over subsequent duplicates.a=2
in the given example. This behavior can inadvertently facilitate HPP exploits by honoring the attacker's manipulated parameter over the original.Other ways to support HackTricks: