The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

Match and Replace with random number

Mopam | Last updated: Jul 02, 2022 11:21PM UTC

I need to replace a header value in my requests with a random number (1-10000 let's say). The need arises to change the value of a header containing an IP address in all my requests (scanner included), the header I can add with the "Add custom Header" extension, but then I cannot assign a random value to it, so my idea is to match and replace a static value assigned to it with the random number.

Mopam | Last updated: Jul 03, 2022 11:11AM UTC

Update: found a temporary fix --> installed the "Request Randomizer" plugin, and then edited the "Add Custom Header" plugin options to add the header I want with the hard-coded value box set to "#RANDOMNUM#" as per the Randomizer plugin's instructions. This results in a 11 chars random number filling the header, it's not a random IP as I'd like but it works for my purposes. Real fix would be to be able to specify random range and syntax, for example: MyHeader: [1-255].[1-255].[1-255].[1-255]

Hannah, PortSwigger Agent | Last updated: Jul 04, 2022 10:18AM UTC

Hi Have you had a look at the extensions "Random IP Address Header" or "IP Rotate" available on the BApp Store?

Mopam | Last updated: Jul 06, 2022 07:41AM UTC

I have to try out the first one you mentioned. As for "IP Rotate", yes I did try it, that's exactly how I've found out I could bypass the WAF, as AWS "exit nodes" were overwriting the requests with X-Forwarded-For headers, and I was still getting blocked, suggesting the targeted system was vulnerable to the source IP overwrite through that header. Thanks will try the first header.

Mopam | Last updated: Jul 10, 2022 03:48PM UTC