How to use Burp Suite for penetration testing
The sections below describe the essentials of how to use Burp Suite within your web application testing workflow. For help with installing and launching Burp, starting projects, and configuring display settings, please see the help on Getting started with Burp Suite.
If this is your first time using Burp Suite, we recommend watching the following video to familiarize yourself with the user interface.
You can check out the rest of our "Burp Suite Essentials" playlist on YouTube.
To use Burp for penetration testing, you can either:
- Use Burp's embedded browser, which requires no additional configuration. Go to the "Proxy" > "Intercept" tab and click "Open Browser". A new browser session will open in which all traffic is proxied through Burp automatically. You can even use this to test over HTTPS without the need to install Burp's CA certificate.
- Use an external browser of your choice. For various reasons, you might not want to use Burp's embedded browser. In this case, you need to perform some additional steps to configure your browser to work with Burp, and install Burp's CA certificate in your browser.
Once you have Burp running and have either opened the embedded browser or configured your own external browser, go to the "Proxy" > "Intercept" tab, and ensure that interception is turned on (if the button says "Intercept is off" then click it to toggle the interception status). Then, go to your browser and visit any URL.
Each HTTP request made by your browser is displayed in the "Intercept" tab. You can view each message, and edit it if required. When you are done making changes, click the "Forward" button to send the request on to the destination web server. If at any time there are intercepted messages pending, you will need to forward all of these in order for your browser to complete loading the pages it is waiting for.
You can toggle the "Intercept is on / off" button in order to browse normally without any interception, if you require. For more help, see Getting started with Burp Proxy.
As you browse an application with Burp running, the "Proxy" > "HTTP history" tab keeps a record of all requests and responses, even while the intercept feature is turned off. From this tab, you can review the series of requests you have made.
Select an item in the table to view the full request and response in the message editor panel.
You can use the message inspector to quickly access various features that help you analyze potentially interesting items found in messages. For example, if you drill down into an encoded item in the inspector, it will apply the appropriate sequence of decoding steps so that you can study the value in a more human-readable form.
For editable messages, such as in Burp Repeater, you can also make changes to this decoded value in the inspector. The relevant encodings will automatically be reapplied to the value as you type.
As you browse, Burp also builds up a site map of the target application by default. You can view this on the "Target" > "Site map" tab.
The site map contains all of the URLs you have visited in your browser, and also all of the content that Burp has inferred from responses to your requests (e.g. by parsing links from HTML responses). Items that have been requested are shown in black, and other items are shown in gray. You can expand branches in the tree, select individual items, and view the full requests and responses (where available).
Burp Suite is designed to be a hands-on tool, where the user controls the actions that are performed. At the core of Burp's penetration testing workflow is the ability to pass HTTP requests between the Burp tools in order to carry out particular tasks.
You can send messages from the "Proxy" > "Intercept", "HTTP history", or "Site map" tabs, and indeed anywhere else in Burp that you see HTTP messages. To do this, select one or more messages, and use the context menu to send the request to another tool.
The Burp tools you will use for particular tasks are as follows:
- Scanner - This is used to automatically scan websites for content and security vulnerabilities.
- Intruder - This allows you to perform customized automated attacks, to carry out all kinds of testing tasks.
- Repeater - This is used to manually modify and reissue individual HTTP requests over and over.
- Collaborator client - This is used to generate Burp Collaborator payloads and monitor for resulting out-of-band interactions.
- Clickbandit - This is used to generate clickjacking exploits against vulnerable applications.
- Sequencer - This is used to analyze the quality of randomness in an application's session tokens.
- Decoder - This lets you transform bits of application data using common encoding and decoding schemes.
- Comparer - This is used to perform a visual comparison of bits of application data to find interesting differences.
You can combine Burp's different tools in numerous ways, to perform testing tasks ranging from very simple to highly advanced and specialized.
Burp lets you combine manual and automated techniques effectively, gives you complete control over all of the actions that Burp performs, and provides detailed information and analysis about the applications you are testing.
The diagram below is a high-level overview of the key parts of Burp's penetration testing workflow:
Recon and analysis
The Proxy tool lies at the heart of Burp's workflow. It lets you use Burp's embedded browser, or your own external browser, to navigate the application, while Burp captures all relevant information and lets you easily initiate further actions. In a typical test, the recon and analysis phase involves the tasks described below.
Manually map the application
Using your browser while proxying traffic through Burp, manually map the application by following links, submitting forms, and stepping through multi-step processes. This process will populate the Proxy history and Target site map with all of the content requested, and (via live scanning) will add to the site map any further content that can be inferred from application responses (via links, forms, etc.). You should then review any unrequested items (shown in gray in the site map), and request these using your browser.
Perform automated mapping where necessary
You can optionally use Burp to automate the mapping process in various ways. You can:
- Carry out automated scanning to crawl the application's content.
- Use the content discovery function to find further content that is not linked from visible content that you can browse to or crawl.
- Perform custom discovery using Burp Intruder, to cycle through lists of common files and directories, and identify hits.
Analyze the application's attack surface
The process of mapping the application populates the Proxy history and Target site map with all the information that Burp has captured about the application. Both of these repositories contain features to help you analyze the information they contain, and assess the attack surface that the application exposes. Further, you can use Burp's Target Analyzer to report the extent of the attack surface and the different types of URLs the application uses.
Burp contains a wealth of configuration options, which it is often necessary to use at different stages of your testing, to ensure that Burp works with your target application in the way you require. For example:
- Display - You can configure the font and character set used to display HTTP messages, and also the font in Burp's own UI.
- Target scope - The target scope configuration tells Burp the items that you are currently interested in and willing to attack. You should configure this early in your testing, as it can control which items are displayed in the Proxy history and Target site map, which messages are intercepted in the Proxy, and which items may be scanned.
- Platform authentication - If the application server employs any platform level (HTTP) authentication, you configure Burp to handle the authentication automatically.
- Session handling - Many applications contain features that can hinder automated or manual testing, such as reactive session termination, use of per-request tokens, and stateful multi-stage processes. You can configure Burp to handle most of these situations seamlessly, using a combination of session handling rules and macros.
- Task scheduling - You can configure Burp to schedule tasks at given times or intervals, to allow you to work within specified testing windows.
Vulnerability detection and exploitation
After completing your recon and analysis of the target application, and any necessary configuration of Burp, you can begin probing the application for common vulnerabilities. At this stage, it is often most effective to use several Burp tools at once, passing individual requests between tools to perform different tasks, as well as going back to your browser to perform additional tests. Throughout Burp, you can use the context menu to pass items between tools and carry out other actions.
In Burp's default configuration, it automatically performs live passive scanning of all requests and responses that pass through the Proxy. So before you begin actively probing the application, you might find that Burp Scanner has already recorded some issues that warrant closer investigation.
Burp's tools can be used in numerous different ways to support the process of actively testing for vulnerabilities. Some examples are described below for different types of issues.
- You can perform scans using Burp Scanner. You can select items anywhere in Burp, and initiate scans using the context menu. Or you can configure Burp to do live scanning of all in-scope requests passing through the Proxy.
- You can use Burp Intruder to perform fuzzing, using your own test strings and payload positions.
- You can send individual requests to Burp Repeater, to manually modify and reissue the request over and over.
- Having identified some types of bugs, you can actively exploit these using Burp Intruder. For example, you can often use the recursive grep payload type to exploit SQL injection vulnerabilities.
Logic and design flaws
For issues like unsafe use of client-side controls, failure to enforce account lockout, and the ability to skip key steps in multi-stage processes, you generally need to work manually:
- Typically, a close review of the Proxy history will identify the relevant requests that need to be investigated.
- You can then probe the application's handling of unexpected requests by issuing these individually using Burp Repeater, or by turning on Proxy interception and manually changing requests on the fly while using your browser.
- You can actively exploit many logic and design flaws using Burp Intruder. For example, Intruder can be used to enumerate valid usernames, guess passwords, cycle through predictable session tokens or password recovery tokens, or even simply to reissue the same request a large number of times (using the null payloads type).
- Having confirmed a logic or design flaw, many of these can be actively exploited by using Burp Proxy's match/replace function, or session handling rules, to change requests in systematic ways.
Access control issues
Burp contains several features that can help when testing for access control vulnerabilities:
- You can use the Compare site maps function for various tasks, including: identifying functionality that is visible to one user and not another; testing whether a low privileged user can access functions that should be restricted to higher privileged users; and discovering where user-specific identifiers are being used to segregate access to data by two users of the same type.
- You can use different browsers to access the application in different user contexts, and use a separate Burp Proxy listener for each browser (using different ports). You can then open additional Proxy history windows (via the context menu) and set the display filter on each window to show only items received on a specific listener port. As you use the application in each browser, each history window will show only the items for the associated user context. You can then use the "Request in browser in current browser session" function (via the context menu) to switch requests between browsers, to determine how they are handled in that browser's user context.
- Many privilege escalation vulnerabilities arise when the application passes a user identifier in a request parameter, and uses that to identify the current user context. You can actively exploit this type of vulnerability by using Burp Intruder to cycle through identifiers in the appropriate format (e.g. using the numbers or custom iterator payload types) and configuring extract grep items to retrieve interesting user-specific data from the application's responses.
Burp contains functions that can be used to deliver, and often automate, virtually any task that arises when probing for other types of vulnerabilities. For example:
- You can review the contents of the Target site map for information leakage issues, using the Search and Find comments functions to assist you.
- Having identified a possible CSRF vulnerability, you can use the CSRF generator to quickly create a proof-of-concept attack in HTML, then use the "Test in browser" function to load the attack into your browser, and then review the browser results and Proxy history to verify whether the attack was successful.
- You can use Burp Sequencer to analyze a sample of session tokens from the application, and estimate the quality of their randomness.
- For some types of encrypted session tokens or other parameters, you can use the bit flipper and ECB block shuffler payload types in Burp Intruder to blindly modify the encrypted data in an attempt to meaningfully change the decrypted data that the application processes.
- You can write your own custom Burp extensions to carry out more specialized or customized tasks.
There is extensive documentation for all of Burp's tools and features, and the typical workflow you need to use when testing with Burp.
Use the links below for help about using each of the main Burp tools:
You can also check out some of our additional Support Center articles on using Burp Suite.