You can apply Java-based Bambdas to create powerful custom filters for your HTTP history. You can do this in two ways:
Load existing Bambdas - Load Bambdas from your Bambda library.
Create new Bambdas - Write and apply Bambdas directly in the HTTP history filter window.
To speed up your workflow when creating or loading Bambdas, you can use the following keyboard shortcuts:
Save - Ctrl + S or Cmd + S
Save as - Ctrl + Shift + S or Cmd + Shift + S
Create new Bambda - Ctrl + N or Cmd + N
Load recent Bambda - Ctrl + O or Cmd + O
You can load and apply Bambdas that are stored in your library to filter the HTTP history.
To load a Bambda from your library:
In Proxy > HTTP history, click the filter bar to open the HTTP history filter window.
In the HTTP history filter window, click Bambda mode.
Click Load.
Select a recent Bambda from the list.
[Optional] If required, edit the Bambda:
Make your changes.
Click Apply to compile and test the Bambda. Fix any errors shown in the Compilation errors panel. For more information, see Troubleshooting Bambdas.
Save your changes:
To overwrite the existing Bambda, click Save > Save.
To save a new version, click Save > Save as.
Click Apply & close.
Burp compiles your Bambda and applies it to every item already logged in your HTTP history, as well as any future HTTP traffic generated in this project.
You can write your own Bambdas directly in the HTTP history filter window.
Before you begin writing, we recommend exploring our Bambdas GitHub repository. There may be an existing Bambda that meets your needs or provides inspiration for creating your own.
You can also explore built-in templates in the Bambda library. For more information, see Creating Bambdas in the Bambda library.
You can convert filter settings to a Bambda as a starting point for further customization:
In Proxy > HTTP history, click the filter bar to open the HTTP history filter window.
Make changes to the filter settings as necessary.
At the bottom of the HTTP history filter window, click Convert to Bambda.
Your filter is converted into a Bambda, enabling you to customize it further using Java.
Two objects of the Montoya API are available to help you write your Bambda:
ProxyHttpRequestResponse
Utilities
To create a Bambda to filter your HTTP history:
In Proxy > HTTP history, click the filter bar to open the HTTP history filter window.
In the HTTP history filter window, click Bambda mode.
Write your Bambda using Java.
Click Apply to compile and test the Bambda. Fix any errors shown in the Compilation errors panel. For more information, see Troubleshooting Bambdas.
[Optional] Click Save > Save. The Bambda is saved to your Bambda library for future use across Burp.
Click Apply & close.
Burp compiles your Bambda and applies it to every item already logged in your HTTP history, as well as any future HTTP traffic generated in this project.
Using slow running or resource-intensive Bambdas can slow down Burp. Write your Bambda carefully to minimize performance impact.
In the example below, we'll create a Bambda that filters the HTTP history to show only items that meet the following criteria:
The request must have a response.
The response must have a 3XX status code.
The response must have a cookie set with the name session.
In this example, our Bambda is:
if (!requestResponse.hasResponse()) {
return false;
}
var response = requestResponse.response();
return response.isStatusCodeClass(StatusCodeClass.CLASS_3XX_REDIRECTION) && response.hasCookie("session");