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

Macro: How to receive a parameter from POST response to use in the Header of the next GET request

SHA256 | Last updated: Oct 19, 2023 07:31PM UTC

I am currently testing a REST API and I would like to use a JSON parameter from a POST response in the next GET request. The POST request is set to run in the Intruder with custom payloads to fetch unique Tokens. The workflow is the following: 1. POST to application like: POST /rest/requests [...] { "parameter":"test", } 2. The application replies with a unique Token in JSON format: {"token":"myToken"} 3. If I now use "myToken" in the Authorization Header of the next GET request to a different URL I could get more details about the parameters stored in the DB like: GET /rest/requests/info [...] Authorization: "myToken" I would like to automate this with a macro. Once the Intruder runs a POST and fetches the Token, the macro should extract the Token, run a GET request with this Token in the Authorization Header, and return the response as the Intruder's response. Is this somehow possible with Burp Macros?

Michelle, PortSwigger Agent | Last updated: Oct 20, 2023 10:54AM UTC