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

Burp Suite change value cookie

Luigi | Last updated: Mar 14, 2020 12:03AM UTC

I'm trying to change the value of a cookie using the Burp option, "Match and Replace". Here is my configuration: Item: Request header Match: cookieName:.*; Replace: cookieName:myValue; Type: Literal. Unfortunately, it does not work with this configuration. Do you have any suggestions?

Uthman, PortSwigger Agent | Last updated: Mar 16, 2020 09:05AM UTC

You have included some Regex in your 'Match' when it is a Literal string you are matching and replacing. You need to create a rule like: Match: cookieName= Replace: newValue Type: Literal Change cookieName to the actual name of the cookie. 'Replace:' should only include what the cookie value is to be replaced with. Alternatively, you can create a session handling rule. Select Project options > Sessions > Add (Session Handling Rules) > Add (Rule Actions) > Set a specific cookie or parameter value. You can define the scope here too.

wolf | Last updated: Aug 17, 2024 11:03AM UTC

GET / HTTP/1.1 Host: ncsc.softether.net:20617 Accept-Language: en-US Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.100 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 Accept-Encoding: gzip, deflate, br Cookie: admin=true Connection: keep-alive

wolf | Last updated: Aug 17, 2024 11:03AM UTC