ProfessionalCommunity Edition

Burp Logger view filter

  • Last updated: December 14, 2023

  • Read time: 4 Minutes

You can use the view filter to control which captured items Burp Logger displays. For more information on which items Logger captures, see Burp Logger capture filter.

Items that are not displayed because of view filter settings can be accessed by removing the view filter.

You can configure the Logger view filter in two different ways:

  • Settings mode enables you to configure a view filter using checkboxes and drop-downs.
  • Bambda mode enables you to write a powerful custom view filter using Burp's Java-based Bambdas.

To filter which of the captured items are displayed, click on the View filter bar. This opens the Configure view filter dialog.

The View filter bar only appears when there is one or more items recorded in Logger.

The view filter bar in Logger

Settings mode

On the Settings mode tab, you can apply a view filter using the following options:

Filter by request type

Choose which request types Logger displays. You can select from:

  • Show only in-scope items. For more information on how to set your scope, see Target scope.
  • Hide items without responses.
  • Show only parameterized requests.

Filter by MIME type

Choose which MIME type Logger displays, such as HTML or XML.

Filter by status code

Choose which status codes Logger displays.

Filter by tool

Choose which Burp tools Logger displays items from. This enables you to ignore traffic from a noisy tool, or direct Logger to display traffic from one tool only. By default, all tools are selected.

Filter by search term

Choose to display only records that contain a specific search term:

  • Regex. Specify whether the search term is a literal string or a regular expression.
  • Case sensitive. Specify whether the search term is case-sensitive.
  • Negative search. Display only items that do not match the search term.

Filter by file extension

Choose which types of file Logger displays, such as PHP or CSS.

Filter by annotation

Choose whether to show only items that have been annotated, either by a comment or highlight. To learn how to annotate items, see Working with Burp Logger entries.

Bambda mode

On the Bambda mode tab, you can write Java-based Bambdas to apply custom view filters to Logger.

Two interfaces of the Montoya API are available to help you write your Bambdas:

  • LoggerHttpRequestResponse
  • Utilities

To filter the view in Logger using a Bambda:

  1. In Logger, click the View filter bar to open the Configure view filter window.

    The filter bar only appears when there are one or more items recorded in Logger.

  2. In the Configure view filter window, click the Bambda mode tab.
  3. Write your Bambda using Java.
  4. Click Apply.

Burp compiles your Bambda and applies it to every item already captured in Logger, and to any future items captured in this project.

Example Bambda

In the example below, we'll create a Bambda that filters the Logger view to display only requests that meet the following criteria:

  • The request must have a response.
  • The time between Burp sending the request and the start of the response must be greater than 1000ms.

In this example, our Bambda is:

if (!requestResponse.hasResponse()) { return false; } var timingData = requestResponse.timingData(); return timingData.timeBetweenRequestSentAndStartOfResponse().toMillis() > 1000;

Converting filter settings to Bambdas

If you have already used filter settings to configure a Logger view filter, you can convert this to a Bambda.

Note

Converting your filter settings overwrites any existing Bambda applied to your Logger view.

To convert your view filter settings to a Bambda:

  1. In the Logger tab, click the View filter bar to open the Configure view filter window.
  2. Make changes to the filter settings (if necessary).
  3. At the bottom of the Configure view filter window, click Convert to Bambda.

Your filter is now converted into a Bambda, enabling you to customize it further using Java.

Saving Bambdas

You can save your Bambda as a JSON file. This makes it easy for you to migrate your filter configuration to other projects.

To save a Bambda:

  1. In the Bambda mode tab of the Configure view filter window, click settings .
  2. Click Save settings.

Your Bambda now downloads as a JSON file.

Loading Bambdas

You can load a saved Bambda into other projects.

Note

Bambdas are only compatible with the tool that they were exported from. For example, a Bambda created for filtering the Logger view cannot be loaded in a different Burp tool.

To load a Bambda:

  1. In the Bambda mode tab of the Configure view filter window, click settings .
  2. Click Load settings, then select your Bambda JSON file via the system dialogue.
  3. Click Apply.

Your Bambda is now loaded in Burp.

Troubleshooting

There are two types of error you may encounter when working with Bambdas: compilation and runtime.

Compilation errors

Burp highlights compilation errors in real time by underlining them in red in the Bambda mode editor. You must resolve any compilation errors before Burp can apply your Bambda.

To display details of the error, hover over the red underline. If you click Apply while your Bambda contains compilation errors, the error details are shown in the Compilation errors tab.

Runtime errors

Runtime errors can occur after the Bambda has been applied. If Burp detects any runtime errors in your Bambda, a banner appears above the filter bars on the Logger tab.

Click Edit Bambda to view the error details, and make changes to the code.

Was this article helpful?