> For the complete documentation index, see [llms.txt](https://itrp19-notes.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://itrp19-notes.gitbook.io/notes/reference/hacking/burp/setting-up-macro-for-intruder.md).

# Setting up Macro for intruder

The provided text describes an advanced credential-stuffing attack using Burp Suite's Intruder and Macro functionalities. To execute this, follow these instructions:

**Setting Up the Request Capture:**

1. Start by capturing a login request to `http://10.10.129.2/admin/login/`.
2. Note the response, especially the session cookie and CSRF token, which are dynamic.

**Configuring the Intruder:**

1. With the Burp Proxy, intercept and capture the login request.
2. In Intruder, set up the attack:
   * Use the "Pitchfork" attack type.
   * Only select the username and password fields, leaving the session cookie and CSRF token fields unselected.

**Loading Payloads:**

1. Go to the Payloads tab in Intruder.
2. Load your username and password wordlists.

**Setting Up the Macro:**

<figure><img src="https://3401258663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAKc2IccofCPFp0RqLn1n%2Fuploads%2FtdLzMOn9r0l7taNUfmT6%2Fimage.png?alt=media&amp;token=5c3a08e4-025d-4729-bd23-e04f692e8ee5" alt=""><figcaption></figcaption></figure>

1. Navigate to the "Settings" tab and select "Sessions".
2. Under "Macros," add a new macro.

   * Choose a GET request to `http://10.10.129.2/admin/login/` from your history.
   * Name the macro appropriately.

   <figure><img src="https://3401258663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAKc2IccofCPFp0RqLn1n%2Fuploads%2Fz1CNQCVVuJcWCRBhnr83%2Fimage.png?alt=media&amp;token=a7be3950-226f-4fc2-97e3-dce1b8333da8" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://3401258663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAKc2IccofCPFp0RqLn1n%2Fuploads%2Fs0iGtLzpdInQMgV0Ul7O%2Fimage.png?alt=media&amp;token=83291c63-20c2-44f6-a6e5-ba8fecb5090c" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://3401258663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAKc2IccofCPFp0RqLn1n%2Fuploads%2FnAjiHMMWe4OXFoOyN9vp%2Fimage.png?alt=media&amp;token=fade87f0-19d8-4a96-a26c-abf911b317b7" alt=""><figcaption></figcaption></figure>

**Configuring Session Handling Rules:**

1. Under "Session Handling Rules," add a new rule.
2. In the Scope tab:
   * Enable only for Intruder.
   * Set URL scope to "Use suite scope" or define a custom scope for `http://10.10.129.2/`.
3. In the Details tab, under "Rule Actions":

   * Add the "Run a Macro" action.
   * Select the macro you created.

   <figure><img src="https://3401258663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAKc2IccofCPFp0RqLn1n%2Fuploads%2FsYQ7JWVlOmHbibn4g8Tq%2Fimage.png?alt=media&amp;token=a1a2d3b1-d16a-4d3c-8426-e624270262f9" alt=""><figcaption></figcaption></figure>

   * Specify to update only the "loginToken" parameter and the "session" cookie.

   <figure><img src="https://3401258663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAKc2IccofCPFp0RqLn1n%2Fuploads%2F7jnd70tyiMPI5nbQnPRY%2Fimage.png?alt=media&amp;token=6eb9a63a-90af-4a74-a752-7b7a5bfd5436" alt=""><figcaption></figcaption></figure>

**Launching the Attack:**

1. Return to Intruder and start the attack.
2. Monitor for 302 status code responses; 403 errors indicate a problem with the macro.
3. Sort responses by length to identify successful login attempts, which should be notably shorter

<figure><img src="https://3401258663-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAKc2IccofCPFp0RqLn1n%2Fuploads%2Fw8rS5rpBM6RVfoDPnHAk%2Fimage.png?alt=media&amp;token=a522be3c-4afe-466f-807c-fe8b927cc4ea" alt=""><figcaption></figcaption></figure>

This lab Credit goes to Try Hack Me on Burp Intruder Page TASK 12: The Extra Mile.
