Burp Suite Intercept Localhost

2/15/2022by admin

Introduction

Proxies like the one included in Burp Suite are designed for traffic interception. This allows the owner of the proxy to view, modify and drop packets passing through the proxy. While this can certainly be used for criminal purposes, it can also be used by cyberdefenders to protect against malware and dangerous user behavior.

  1. Site:- Other channels: Snapchat:- https://www.snapchat.com/add/osa.
  2. Task 1 Intro Burp Suite, a framework of web application pentesting tools, is widely regarded as the de facto tool to use when performing web app testing. Throughout this room, we'll take a look at the basics of installing and using this tool as well as it's various major components. Reference links to the associated documentation per section have been provided at the bottom of most tasks.
  3. And that’s the basics of using Burp Suite to intercept a request and modify its request. If you’ve been looking for an application that provides this level of sophistication for web application security testing, especially one that’s got a free edition, then Burp is the one to get started with.

In this article, we’ll discuss how to use Burp Suite to intercept Web traffic, both encrypted and unencrypted. We’ll start with unencrypted traffic (HTTP) and then cover the modifications necessary for HTTPS.

To jump ahead, confirm your proxy IP: Burp Suite Proxy Options. How interesting. When I run the following program with the Intercept off in Burp Suite the browser works just fine: You've said: Also, Burp GUI is frozen while Selenium tries to load the page, so I cannot switch the view from my extension to the Proxy one. This sounds strange.

Intercepting HTTP Traffic

The first step to intercepting web traffic with Burp Suite is installing it on your system. The Burp Suite Community Edition is available from PortSwigger. After installing and opening Burp Suite, you’ll see a screen similar to the one below. [CLICK IMAGES TO ENLARGE]

When using Burp Suite as a proxy, it’s a good idea to ensure that the proxy is active. As shown in the screen above, this information is found under Proxy in the first row of tabs and Options in the second row. Note that the Burp proxy runs on 127.0.0.1:8080 by default.

If the proxy is running, the next step is setting up a Web browser to use the proxy. In this example, we’re using Chrome, so these settings can be found by opening Options and searching for Proxy as shown below.

Clicking on the “Open proxy settings” button in the above screen opens up the computer’s Internet Settings. As shown in the screen below, we’re using Windows for this example.

In the above screen, click on the LAN settings button, which opens the screen below. At the bottom of this screen is the computer’s proxy settings.

As shown above, we’ve set the proxy settings for the computer to Burp Proxy’s default address and port (127.0.0.1 and 8080). If you’ve changed this information for your Burp Suite instance, use your modified values here.

When complete, click OK and attempt to browse to a website. For this example, we’ve used an HTTPS site. As a result, we see the warning below.

Clicking Advanced and Proceed to site allows us to actually visit the website. At this point, take a look at Burp Proxy. Under the Proxy → Intercept tab, you can see the requests as they move through. As shown below, we see the GET request for the requested website.

Forwarding the requests in Burp eventually allows the webpage to load (as shown below).

However, as shown in the address bar, the site is not considered secure. This is because Burp breaks the certificate chain between the client and the server and uses its own certificate instead. Since Burp’s certificate is self-signed and untrusted by the browser, Chrome makes it obvious to the user that this isn’t a secure connection.

But what if we try to visit a site using HTTPS Strict Transport Security (HSTS), where the site requires that a secure connection is made between the server and the client? The image below shows an attempt to browse to Google while Burp is performing interception.

As shown in the screen above, Chrome gives you no option to continue on to the untrusted site. Since Burp is providing its own (untrusted) certificate to the client, the connection is completely untrusted and not allowed to continue. In order to visit Google, we need to get Chrome to trust Burp Proxy’s certificate.

Making the jump to HTTPS

Burp Proxy generates its own self-signed certificate for each instance. In order to get a copy of your Burp CA certificate, browse to 127.0.0.1:8080 (or wherever your Burp Proxy instance is running). Once there, you’ll see the screen below.

In the screen above, click on CA certificate in the top right corner. This will allow you to save a copy of your CA certificate to your computer.

Once you have the certificate, you need to mark it as trusted in your browser. In Chrome, this option is under Settings → Advanced Settings → Privacy and Security. At the bottom of the screen below is an option to manage certificates.

Clicking on “Manage certificates” will open up a window for managing certificates locally on your computer. On Windows, you will see the screen below.

To force Chrome to trust Burp’s certificate, move to the Trusted Root Certification Authorities tab and click Import. Click through the prompts and point it to your newly downloaded certificate. Once you have received a success message, restart both Burp and your browser.

Browsing to our original site on infosec.com, we no longer get an error message about an untrusted certificate. Examining the certificate (shown below), we see that Chrome is perfectly happy to accept a certificate signed by PortSwigger CA, which is the company that makes Burp Suite.

Burp Suite Intercept Localhost

But what about interception for sites enforcing HTTPS via HSTS? Browsing to Google again throws no errors and, as shown below, Chrome accepts the PortSwigger CA certificate as valid.

At this point, we’re capable of intercepting any Web traffic using Burp Proxy.

Conclusion: Applications and limitations of HTTPS interception

As mentioned above, interception of HTTPS traffic is valuable for both benign and malicious purposes. A cyberdefender who can unwrap the encryption provided by TLS may be able to detect and remediate malware infections or threat actor intrusions on the corporate network. However, an attacker with the same capabilities poses a significant threat to the privacy and security of users on the network.

The fact that the user needs to trust the Burp proxy certificate can be an annoyance to the defender but is a significant bonus when dealing with malicious parties. An organization can force trust of the Burp CA (and many have similar policies for organizational root CA certificates for deep packet inspection), but this makes it necessary to appropriately protect the Burp proxy instance. Anyone with access to the private key corresponding to Burp’s self-signed certificate has the ability to read any data sent by browsers using the proxy.

Sources

  1. Download Burp Suite Community Edition, PortSwigger
  2. Intercepting HTTP and HSTS enabled HTTPS / SSL traffic on Chrome/Firefox using Burp Suite, Zeroday-Security

We will use Burp Suite to solve the DVWA challenges.To do so we need to configure the tool and our web browser.

Burp Suite installation

Please refer to the official documentation to learn how to install Burp.

On Linux you just have to download and run a script.

Starting Burp Suite

Once Burp Suite is installed start it.The Community Edition of Burp Suite only allows for temporary projects, so choose this and click next.

Since we haven't got a configuration yet we choose Burp defaults on the next screen. Later on we can save our config in a file a reload it on the next Burp launch.

Configuring the target scope

Burp Suite is now started.The first thing to do is to configure our target scope which will define the requests we will intercept and modify. To do so :

  1. Target > Scope > Add.
  2. Set the prefix to localhost.
  3. Click OK.

We choose to avoid accumulating data and click Yes on the pop up that follows.

Burp Suite Intercept Localhost

Configuring the interception options

Burp Suite Intercept Localhost

We configure the proxy to intercept the client requests and server responses only when the URL is in the target scope.

To do so :

  1. Proxy > Options > Intercept Client Requests.
  2. Check the box And URL Is in target scope.

Burp Suite Intercept Localhost Tutorial

Do the same for the option Intercept Server Responses.

We now disable the interception, we will enable it when needed.To do so Proxy > Intercept > Intercept is on.

Configure your browser proxy

Burp suite proxy is by default 127.0.0.1:8080.We configure our Firefox proxy to redirect all requests to Burp.

To do so :

  1. Click Preferences in the Firefox menu.
  2. Search for proxy.
  3. Click on Settings....

Configure Burp Suite To Intercept Localhost

Then configure the proxy with the following settings.

Intercept
SettingValue
Manual proxy configurationChecked
HTTP Proxy127.0.0.1
Port8080
SOCKS v4Checked
No Proxy forEmpty

Burp Suite Not Intercepting Localhost Kali Linux

Firefox is now setup to use Burp as its proxy. You can now do some challenges with Burp Suite and Firefox.

Comments are closed.