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.

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.

Open about:preferences#connectionSecurity.


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

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

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

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


The containers may appear like this by default. To manage them, open about:preferences#containers.
The setup is straightforward. First, add a 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.

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


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


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.
Load the PwnFoxColor JAR as a Java extension in Burp.


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

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


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

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





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



Happy hacking.
- 01 YesWeHack - PwnFox github.com/yeswehack/PwnFox ↗
- 02 Mozilla Add-ons - PwnFox addons.mozilla.org/en-US/firefox/addon/pwnfox ↗
- 03 Mozilla Add-ons - Container proxy addons.mozilla.org/en-US/firefox/addon/container-proxy ↗
- 04 Mozilla Add-ons - Container Proxy for PwnFox addons.mozilla.org/en-US/firefox/addon/container-proxy-for-pwnfox ↗
- 05 Malwarian - Container Proxy for PwnFox github.com/malwarian/firefox-container-proxy-pwnfox ↗
- 06 Malwarian - PwnFoxColor github.com/malwarian/PwnFoxColor ↗
- 07 PortSwigger - Installing Burp's CA certificate in Firefox portswigger.net/burp/documentation/desktop/external-browser-config/certificate/ca-cert-firefox ↗
- 08 PortSwigger - Proxy settings and listeners portswigger.net/burp/documentation/desktop/settings/tools/proxy ↗
- 09 PortSwigger - HTTP history portswigger.net/burp/documentation/desktop/tools/proxy/http-history ↗
- 10 PortSwigger - Adding custom columns in HTTP history portswigger.net/burp/documentation/desktop/tools/proxy/http-history/custom-columns ↗