In Burp Suite, what does invisible proxying change for a client that ignores proxy settings, and what two problems must be solved?
answer
- client is not proxy-aware
- destination comes from the Host header
- no CONNECT before the TLS handshake
- forwarding can loop back to Burp
- certificate needs a server name
basics
~10 sInvisible proxying lets Burp accept requests from a client unaware of any proxy, taking the destination from the Host header. It needs a fix for forwarding loops and for the certificate Burp presents.
solid answer
~40 sA thick client or plugin that ignores proxy settings sends **non-proxy-style requests**, such as `GET /foo.php` with a Host header, and for HTTPS starts TLS without a CONNECT. With **Support invisible proxying** on a listener, Burp takes the destination from the Host header and tolerates the direct TLS negotiation. Redirecting the client by a hosts-file entry creates two problems. First, Burp resolves the same name back to itself and loops, which the listener's redirection settings (one domain) or Burp's own hostname resolution settings (several domains) fix. Second, without the server name extension Burp falls back to a static self-signed certificate, so a CA-signed certificate for a specific hostname is needed.
go deeper
Recall that invisible proxying is for clients that cannot be pointed at a proxy and that Burp then reads the Host header.
Explain the request-line and CONNECT difference, and why a hosts-file redirect makes Burp forward to itself.
Solve both problems for one domain and for several: redirection or hostname resolution for the loop, and a specific-hostname or per-interface certificate for TLS.
Decide when a non-proxy-aware client is worth the setup, how the redirect is documented and removed, and who is told about the changed name resolution.
## The problem invisible proxying solves A normal web proxy relies on the client being told about it. For plain HTTP the client sends the full URL on the request line (`GET http://example.org/foo.php HTTP/1.1`), and for HTTPS it sends a `CONNECT` request naming the destination before it starts TLS. Some clients never do either: a thick client component, or a browser plug-in that makes HTTP requests outside the browser's framework, often has no proxy setting. Such a client is **non-proxy-aware**. It sends `GET /foo.php HTTP/1.1` with a Host header straight to whatever address its name resolves to, and for HTTPS goes directly into TLS. **Invisible proxying** is Burp's support for this case. On a listener, the **Support invisible proxying** setting makes Burp accept non-proxy-style requests and parse the destination out of the **Host header**, and makes it tolerate a TLS negotiation that arrives without a preceding CONNECT. ## How the client reaches Burp Burp's documentation describes redirecting the client by changing name resolution: add a hosts-file entry that points the application's hostname at the local machine (for example `127.0.0.1 example.org`), and create invisible listeners on the ports the application uses, such as 80 and 443 on the loopback address. The client then resolves the name to the tester's machine and connects to those listeners. ## Problem one: the forwarding loop In invisible mode Burp forwards by Host header. Because the hosts-file entry now resolves that same name to the local listener, Burp forwards the request back to itself, in an endless loop. Two fixes: 1. If all traffic goes to **one domain**, use the listener's redirection settings to send outgoing traffic to the correct address. 2. If the client contacts **several domains**, use Burp's own hostname resolution settings to override the hosts file and map each domain back to its real address. A related case is a client that sends no Host header at all, so Burp has no destination. One destination can again use the redirection settings; several destinations need a separate virtual network interface and listener per destination host, with the hosts file pointing each name at its own listener. ## Problem two: the certificate The default certificate behaviour generates a certificate for the destination host. A non-proxy-aware client sends no CONNECT, so Burp cannot know the host before the handshake. Many clients, including browsers, send the **server_name** extension in the Client Hello; if it is present Burp uses it to generate the certificate as normal. If it is absent, Burp falls back to a **static self-signed certificate**, which the client is unlikely to accept. The fixes mirror the loop: for one domain, configure the listener to generate a CA-signed certificate with that specific hostname; for several domains, use a listener per virtual interface, each with its own hostname. ## Normal proxy against invisible proxy | | Client uses a proxy | Non-proxy-aware client with invisible proxying | |---|---|---| | Plain HTTP request line | Full URL, `GET http://example.org/foo.php` | Path only, `GET /foo.php` | | Start of an HTTPS connection | A CONNECT request naming the host | TLS negotiation straight away | | Where Burp reads the destination | The request line or the CONNECT | The Host header | | Certificate generation | Per host, from the CONNECT | Needs the server_name extension, else a static self-signed certificate | ## Safe practice and what others see - Keep the hosts-file change and the extra listeners inside the test window, and remove them afterwards; a forgotten entry quietly sends that machine's traffic for the name to a local listener. - Because Burp forwards by Host header, review the requests the client actually sends before relying on scope to keep traffic on the authorised host. - From the application's side the client is the tester's workstation. The client never named a proxy, so the traces of the setup are on the test machine itself: the hosts-file entry and the extra listeners. ## Common mistakes - Reaching for invisible proxying when the client has a proxy setting: it is for clients that lack one. - Creating the hosts-file redirect and forgetting the loop. - Expecting the default per-host certificates to work with no server name. - Leaving the hosts-file entry in place after the test.
- Why do the default per-host certificates work with a normal browser proxy but not with a non-proxy-aware client?A browser using a proxy sends a CONNECT naming the host before TLS, so Burp knows which certificate to create. A non-proxy-aware client starts TLS directly, so Burp has only the server_name extension, if the client sends one; without it Burp presents a static self-signed certificate.
- When would you need more than one invisible listener for a single client?When the client sends no Host header and talks to several hosts, or needs a different CA-signed hostname certificate per destination. Each destination gets its own virtual interface and listener, and the hosts file points each name at the matching listener.
- Says invisible proxying reads the destination from the full URL on the request line
- Expects a hosts-file redirect to work without any loop fix
- Thinks default per-host certificates always work when no server name is sent
- Reaches for invisible proxying for clients that have a proxy setting
- Leaves the hosts-file redirect in place after the test