A web testing setup with Burp, Firefox, and extensions

Firefox, PwnFox, Container Proxy, PwnFoxColor, and Burp make it easier to separate sessions and recognize their requests when testing authorization flaws such as IDOR.

Introduction

Before starting a pentest, I like to set up an environment that makes the work comfortable. When testing a web application, some checks need particular care. I could install a browser and Burp or Caido and start immediately, but a few minutes of preparation save time and some frustration later.

This setup is especially useful when working with different sessions, such as in an IDOR test. Authorization testing gets confusing when every request seems to come from the same session.

It uses Firefox, PwnFox, Burp Suite, Caido, and a custom extension. An IDOR is a good example of why the setup helps.

PwnFox opens Firefox containers so I can keep several sessions in one browser. That is useful on its own, but Burp’s HTTP history can still be a mess. With Container Proxy and a small extension, I can add colors and labels to the history and find the request I need more easily.

Prepare the browser and proxy

A dedicated Firefox profile is a good idea for testing.

I prefer to separate browsers altogether: Brave for personal use, Firefox for testing, and Chrome for other things. Browser profiles exist, of course; this is just my preference.

Burp normally starts with a proxy listener on 127.0.0.1:8080. We can leave it there, but the setup below uses other ports. For now, the default listener is enough to get started.

Before you start

If Burp already intercepts both HTTP and HTTPS traffic from Firefox, you can skip this section.

A little theory and an anecdote

When I first downloaded Kali Linux, I felt like a movie hacker: dangerous and unstoppable. The labs I practiced with all used HTTP, and everything worked. Then I tried visiting an HTTPS page through Burp and Firefox called it unsafe. My hacking career was over on the spot… until I learned how to fix it. The solution was so simple that it made me question a few things, but that is in the past.

How a server certificate is signed by a CA and checked by a client

With HTTPS, a server obtains a digital certificate signed by a certificate authority (CA). When a client connects, the server presents that certificate. The client checks its validity, identity, and chain of trust up to a root CA it trusts. The CA does not participate in every connection; it previously signed the certificates that establish that trust. When we use our own CA, we therefore need to add its root certificate to the client’s trust store.

Browsers already trust root certificates from many CAs. That is why ordinary HTTPS sites do not trigger a warning every time we open them.

To intercept HTTPS in Firefox, install Burp’s CA certificate in the testing profile, following PortSwigger’s documentation. Burp can then see and modify the traffic.

You can download the certificate from http://localhost:8080.

Burp's local page with the CA Certificate download link

Open about:preferences#connectionSecurity.

Firefox certificate settings

Firefox certificate manager with the Import button

After importing the certificate, an HTTPS page intercepted by Burp will look like this:

Firefox showing PortSwigger as the certificate issuer

Firefox extensions

PwnFox

PwnFox lets you create containers with separate site data, cookies, and local storage.

PwnFox on Mozilla Add-ons

PwnFox options and container colors

Container Proxy - Custom

Container Proxy works with PwnFox by letting you assign different proxies to profiles or containers.

While writing this post, I developed a variant of the original Container Proxy extension described below. Its change is aimed at making this setup quicker and more comfortable.

Container Proxy for PwnFox on Mozilla Add-ons

Container Proxy for PwnFox source on GitHub

Container Proxy for PwnFox with automatic setup controls

With one button, it can create or assign the containers automatically and give each one a port. The ports increase from the selected base: if it starts at 8081, the last one is 8088. It covers all eight containers that PwnFox creates by default.

Container Proxy - Original

Container Proxy on Mozilla Add-ons

Container Proxy's container assignments

Container Proxy's proxy list

The containers may appear like this by default. To manage them, open about:preferences#containers.

The setup is straightforward. First, add a proxy:

Adding a proxy on port 8081 in Container Proxy

Once it exists, you can assign it to a container. Traffic from a tab opened in that container by PwnFox will use the assigned proxy.

Assigning the Burp proxy to a PwnFox container

If you use the original extension, open all the PwnFox containers first so they are created and appear in Container Proxy.

Creating PwnFox container tabs

The configured PwnFox containers in Container Proxy

When you open a container and start browsing, Burp already has an indicator that distinguishes its traffic from the other containers:

Listener ports visible in Burp HTTP history

A page opened in the blue PwnFox container

At this point, you still need to create the Burp listeners on those ports manually.

PwnFoxColor

With requests arriving on different ports, the next step is to use that information to color Burp’s HTTP history.

I wrote a Burp extension called PwnFoxColor for this. It assigns colors similar to PwnFox’s to requests from each session and can optionally add a label to every request.

PwnFoxColor on GitHub

Load the PwnFoxColor JAR as a Java extension in Burp.

Loading the PwnFoxColor JAR in Burp

PwnFoxColor loaded in Burp

Once installed, a new Burp tab lets you configure the labels and colors for their corresponding ports, starting at 8081 by default.

PwnFoxColor rules, ports, labels, and colors

There is also a button to add ports 8081 through 8088 automatically, so you do not need to add them one by one.

Burp listeners configured on ports 8081 through 8088

Colored requests in Burp HTTP history

To add the session column, prepare it in PwnFoxColor’s settings and copy the generated Bambda code:

PwnFoxColor's session column code

Then add a custom column in Burp and paste the code.

Burp HTTP history with the session column

The custom column option in Burp's table layout menu

Burp's custom column editor

The custom column script in Burp

Enabling the custom column in Burp HTTP history

The column appears at the end when selected, but you can move it.

Results

Pwnfox containers

Containers

The final Burp HTTP history with PwnFox session labels

Happy hacking.