PortSwigger / param-miner

https://portswigger.net/blog/practical-web-cache-poisoning
Other
1.2k stars 163 forks source link

Cachebuster in the User-Agent headers causes CloudFlare 403 block #77

Closed m0pam closed 6 days ago

m0pam commented 1 year ago

Param miner automatically adds a cache buster to the user-agent, this gets blocked by CloudFlare. I've attempted everything, please how can I stop this behaviour???

albinowax commented 1 year ago

For now, you could potentially work around this using the 'Add custom header' extension.

99smith commented 1 year ago

Hi @albinowax

I tried using 'Add custom header' extension to solve this issue but it is just adding extra useragent header at the bottom of request which defeats the whole purpose as again we get 403 or 429 status. request like below:

`POST /magic-login HTTP/2 Host: xyz.com Cookie: a=dde9a3d5-1899-4452-80e4-0f0159433ed6-p; User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0 Accept: application/json Accept-Language: en-GB,en;q=0.5 Accept-Encoding: gzip, deflate X-Requested-With: XMLHttpRequest Content-Type: application/json Content-Length: 31 Origin: https://quizlet.com Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin Te: trailers Cookie: _gat_UA-1203987-1=1 User-Agent: Mozilla/5.0 Superman

{"username":"jhbj"}`

AkikoOrenji commented 1 year ago

@99smith use Reshaper for this. It can rewrite anything on the fly using When & Then rules. Often you don't even need regex to use the Reshaper so i'd highly recommend it.

albinowax commented 6 days ago

I fixed this a while ago by adding the misc header cachebusters setting but forgot to close the issue.