19.09.2017 Views

the-web-application-hackers-handbook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

604 Chapter 14 n Automating Customized Attacks<br />

Figure 14-10: The Burp Suite cookie jar<br />

In itself, <strong>the</strong> cookie jar does not actually do anything, but <strong>the</strong> key values it tracks<br />

can be used within <strong>the</strong> o<strong>the</strong>r components of Burp’s session-handling support.<br />

Request Macros<br />

A macro is a predefined sequence of one or more requests. Macros can be used<br />

to perform various session-related tasks, including <strong>the</strong> following:<br />

n Fetching a page of <strong>the</strong> <strong>application</strong> (such as <strong>the</strong> user’s home page) to check<br />

that <strong>the</strong> current session is still valid<br />

n Performing a login to obtain a new valid session<br />

n Obtaining a token or nonce to use as a parameter in ano<strong>the</strong>r request<br />

n When scanning or fuzzing a request in a multistep process, performing<br />

<strong>the</strong> necessary preceding requests to get <strong>the</strong> <strong>application</strong> into a state where<br />

<strong>the</strong> targeted request will be accepted<br />

Macros are recorded using your browser. When defining a macro, Burp displays<br />

a view of <strong>the</strong> Proxy history, from which you can select <strong>the</strong> requests to be<br />

used for <strong>the</strong> macro. You can select from previously made requests, or record <strong>the</strong><br />

macro afresh and select <strong>the</strong> new items from <strong>the</strong> history, as shown in Figure 14-11.<br />

For each item in <strong>the</strong> macro, <strong>the</strong> following settings can be configured, as shown<br />

in Figure 14-12:<br />

n Whe<strong>the</strong>r cookies from <strong>the</strong> cookie jar should be added to <strong>the</strong> request<br />

n Whe<strong>the</strong>r cookies received in <strong>the</strong> response should be added to <strong>the</strong> cookie jar<br />

n For each parameter in <strong>the</strong> request, whe<strong>the</strong>r it should use a preset value<br />

or a value derived from a previous response in <strong>the</strong> macro

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!