Introduction
Burp Suite is a powerful set of tools for web application security testing. One of its most useful features is Burp Comparer, a tool for performing a visual "diff" of any two pieces of data, such as HTTP requests or responses. This is incredibly helpful for identifying subtle differences that might reveal vulnerabilities, such as changes in session tokens, hidden form fields, or error messages.
In this lab, you will learn the basic workflow of using Burp Comparer. You will capture two similar HTTP requests using the Burp Proxy, send them to the Comparer tool, and then analyze the highlighted differences.
Find Two Similar Requests in Your Proxy History
In this step, you will launch Burp Suite and a web browser to generate two similar login requests. These requests will then be used for comparison.
First, launch the required applications. You can find both Burp Suite and the Chromium Web Browser on the desktop.
- Double-click the Burp Suite icon on the desktop to start it. If a dialog box appears, you can use the default settings and click
Nextand thenStart Burp. - Double-click the Chromium Web Browser icon on the desktop.
Next, you need to capture some traffic. We will attempt to log in to a fictional website twice with different credentials.
- In Burp Suite, navigate to the
Proxytab, and within it, theInterceptsub-tab. If the button saysIntercept is off, click it so it changes toIntercept is on. - In the Chromium browser, navigate to the following address:
http://www.google.com. You will see the request get "stuck" in Burp Suite. - Go back to Burp Suite. You will see the captured request. For this lab, we don't need to modify it. Just click the
Forwardbutton to let the request proceed. Repeat this a few times until the Google homepage loads in your browser. - Now, let's generate our target requests. In the browser, search for "login page example". Click on any result that provides a simple login form. For this example, let's assume you found a page and entered
user1for the username andpass1for the password. Click the login button. - Go back to Burp Suite and click
Forwardto let the login request pass. - Return to the browser and enter different credentials, such as
user2andpass2, and click the login button again. - Go back to Burp Suite and click
Forwardone more time.
Now that you have generated the traffic, you can find the requests in your proxy history.
In Burp Suite, go to the Proxy tab and then the HTTP history sub-tab. Here you will see a log of all the requests that have passed through the proxy. Look through the list to find the two POST requests to the login page you used. These are the two requests we will compare in the next steps.
Right-Click the First Request and 'Send to Comparer'
In this step, you will send the first of the two login requests to the Comparer tool.
Stay within the Proxy -> HTTP history tab in Burp Suite, where you can see the list of captured requests.
- Locate the first login request you made (e.g., the one containing the credentials
user1andpass1). - Right-click on that specific request in the history list. This will open a context menu with many options.
- From this context menu, find and select the option
Send to Comparer.
This action takes a copy of the selected request and loads it into the Comparer tool. The Comparer tab at the top of the Burp Suite window should now be highlighted or change color, indicating that it has received new data. You can click on the Comparer tab to confirm that one item has been loaded.
Right-Click the Second Request and 'Send to Comparer'
Now, you will send the second login request to the Comparer tool. This will provide the second item needed for the comparison.
- Navigate back to the
Proxy->HTTP historytab. - Locate the second login request you made (e.g., the one containing the credentials
user2andpass2). - Right-click on this second request in the history list.
- From the context menu that appears, select
Send to Compareragain.
After you perform this action, the Comparer tab will now contain both requests. If you switch to the Comparer tab, you will see two items listed, ready to be compared.
In Comparer, Select the Two Items and Click 'Words' to Compare
With both requests loaded into Comparer, you are now ready to perform the actual comparison.
- Navigate to the
Comparertab in Burp Suite. - At the top of the Comparer interface, you will see a list of the items you have sent. It should show two items.
- Select both items. You can do this by first clicking on the first item, then holding down the
Ctrlkey and clicking on the second item. Both should now be highlighted. - At the bottom of the window, you will see comparison options. The two main options are
WordsandBytes. TheWordscomparison is ideal for text-based data like HTTP requests because it analyzes differences on a word-by-word basis, making the output very readable. TheBytescomparison performs a byte-level diff, which is more suitable for binary data. - Click the
Wordsbutton to initiate the comparison.
Burp Suite will now process the two requests and prepare a side-by-side visual comparison.
Analyze the Highlighted Differences Between the Requests
In this final step, you will analyze the results of the comparison to understand what changed between the two requests.
After you clicked Words in the previous step, the main panel in the Comparer tab will update to show the two requests side-by-side. Burp Comparer uses a color-coding system to make differences easy to spot:
- Yellow: Highlights modified data.
- Pink: Highlights added data.
- Blue: Highlights deleted data.
Scroll through the two request panels. The scroll bars on the side will also have color markers to help you quickly jump to the locations of changes.
You should be able to clearly see the differences in the request body. The values for the username and password parameters (user1 vs. user2 and pass1 vs. pass2) will be highlighted in yellow, indicating they were modified.
Depending on the web application, you might also notice other differences. For example:
- The
Content-Lengthheader might be different if the new parameter values have a different length. - A
Cookieheader might have changed if the server assigned a new session ID.
By analyzing these highlighted differences, you can quickly understand how a web application responds to different inputs. This is a fundamental technique for discovering a wide range of security vulnerabilities.
Summary
In this lab, you have learned the fundamental workflow of using Burp Comparer to analyze HTTP requests. You successfully generated network traffic, isolated two similar requests from your proxy history, and sent them to the Comparer tool. By performing a word-based comparison, you were able to visually identify the exact differences between the two requests.
This skill is essential for many web security testing tasks, such as analyzing authentication mechanisms, testing for parameter tampering, and identifying potential injection points by observing how an application's response changes with different inputs.
