caon.io
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Parameter Pollution

When searching for HPP keep in mind some servers handle parameters differently.

Take http://example.com?username=foo&username=bar as an example.

  • PHP and Apache use the last username occurence.
  • Tomcat uses the first occurence.
  • ASP and IIS uses all occurences

A study containing all the servers can be found here: https://owasp.org/www-pdf-archive/AppsecEU09_CarettoniDiPaola_v0.8.pdf

Often a websites offers its user a feature to share a given page in social media. The fearture works this way: An user clicks the share button and a pop-ip page shows the message and action button that the user click uses to share content.

Amost always the original link from the site is reflected in the request.

We can use HPP to leverage this function to overwrite shared content:

  1. Find a page with a share feature
  2. Choose Twitter (as an example)
  3. Replace the URL from example.com/cool-article to example.com/cool-article?text=;Visit https://evil.com
  4. Load the the new URL and click the share button
  5. The user will now share a tweet with <original_message>;Visit https://evil.com

Bypass WAF with HPP

Sometimes a single payload will cause WAF to be triggered, one can abuse pollution to fill a payload in different parameters.

target.com/file.asp?p=SOME&p=PAYLOAD&p=HERE

Ideas for pollution

?id=id=1
&id=1?id=2
?id['&id=1']=2
?id[1&id=2]=1
?id=1&id=2
&id=1&id=2
?id=1%26id%3D2
?id&id=1
????id=1
&&&&id=1
?id=id['1']=2
?id=1#id=2
?id==1
?id===1
;id=1?id=2
?id;id=1
&id=1;id=2
#id=1?id=2&id=3
?id=1,2
?id1,id2=1
?id[=1&id=2]=3
?id[&id=2]=1
?id=[1,2]
?id&=1
?id[]=1&id=2
?id=/:@&=+$&id=2
?id[=/:@&=+$&id=2]=1
?id={id:{id:1},2}
?id[{id:{id[]:1},2}]=3
?id=%23?id=1
?id=1%26id=2
?id=1%2526id=2
?id=1%c0%a6id=2
?id=1\uc0a6id=2
?id=1&amp;id=2
?id=1&#38;id=2
?id=1%u0026;id=2