Notes
What it does
You configure your browser to send all of its traffic to the proxy, which runs on your own machine. The proxy forwards each request to the application and passes the response back. In between, you see the raw HTTP exactly as it travels: the method, the path, every header, every cookie and the body. Web pages hide all of this behind buttons and forms. The proxy shows you the actual conversation the browser and server are having.
- the browser is told to send all traffic to the proxy (127.0.0.1:8080)
- the proxy forwards it to the application
- and passes the response back
- in between, you see the raw HTTP: method, path, headers, cookies, body
HTTPS
How does it read HTTPS? The proxy creates its own certificate authority, and you install that authority's certificate into your test browser. From then on the proxy presents a certificate for each site, signed by its own authority, and your browser accepts it. There are really two TLS connections: browser to proxy, and proxy to site. It is exactly the man in the middle attack from earlier, except that you set it up, on your own device, by choice.
- the proxy generates its own certificate authority (CA)
- you install that CA in your test browser
- the proxy presents a certificate for each site, signed by its CA
- two TLS connections: browser to proxy, proxy to site
- this is a consented man in the middle
A warning
A warning that matters. Whoever holds that certificate authority's private key can impersonate any website to a browser that trusts it. So keep it contained. Use a separate browser profile only for testing, never install a proxy authority on a device you use for banking or personal accounts, and remove it when you finish. The same mechanism is how corporate networks inspect encrypted traffic, which is why that practice needs careful rules too.
- anyone holding that CA's private key can impersonate any site to that browser
- use a separate browser profile just for testing
- never install a proxy CA on a device you bank with remove it when you finish
- the same idea powers corporate TLS inspection
Intercept and edit
With interception on, each request pauses and waits for you. Now you can change anything before it continues. A hidden form field holding a price. The order number in the address, from your order to someone else's. A cookie. A value the page limited with a dropdown or a maximum length. Even the method. The question you are asking every time is the same: does the server check this, or was the web page the only thing stopping me?
- a hidden form field: price, role, user id
- the id in the path: /api/orders/1001 to 1002
- a cookie or header
- a value the page restricted with a dropdown or a max length
- the method: GET to DELETE
- the question: does the server check, or only the page?
The core features
Proxies come with a small toolbox. The history keeps every request so you can search it later. The repeater resends one request with small changes while you compare the responses, which is where most testing happens. An automation tool tries a list of values in one position, such as a range of order numbers. Some include an automated scanner. And the scope setting limits everything to your target, so you never accidentally send test traffic to a third party.
- history: every request, kept and searchable
- repeater: resend one request with small changes, compare the responses
- intruder / fuzzer: try a list of values in one position
- scanner: automated checks (Burp Pro, ZAP)
- scope: limit the tool to your target only
Which tool
There are three good tools. Burp Suite is the industry standard; its community edition is free, and the paid version adds an automated scanner. OWASP ZAP is free and open source, with good support for running scans inside a pipeline. And mitmproxy runs in a terminal and can be scripted in Python, which makes it excellent for APIs and mobile apps. Your browser's developer tools are fine for looking at requests, but not for systematic testing.
- Burp Suite: the industry standard. Community edition is free; Pro adds a scanner
- OWASP ZAP: free, open source, good automation for CI
- mitmproxy: terminal and Python scripting; great for APIs and mobile
- browser dev tools: fine for looking, not for editing at scale
Mobile and pinning
Mobile apps add a step. You point the phone or emulator at the proxy and install the proxy's certificate authority, but modern Android apps ignore user-installed authorities by default. Many apps go further with certificate pinning: the app accepts only its own expected certificate or key. Pinning is a useful defense against interception on hostile networks. It does not replace server-side checks, because a determined tester with their own device can still remove it.
- point the phone or emulator at the proxy; install the proxy CA
- modern Android apps ignore user-installed CAs by default
- certificate pinning: the app accepts only its own certificate or key
- pinning does not replace server-side checks
The lesson
Here is the lesson this tool teaches better than any lecture. Everything the client sends is under the user's control, and therefore the attacker's. JavaScript validation is skipped. Disabled buttons and hidden fields are ignored. The price in the form is edited. The mobile app's logic is bypassed entirely. So the server must check everything again: who you are, whether you may do this, and whether every value is sane. Client-side checks help honest users. They stop no one else.
- JavaScript validation: skipped
- disabled buttons and hidden fields: ignored
- the price in the form: edited
- the mobile app's logic: bypassed
- the server must re-check everything: identity, permission, values, limits
- the client is a convenience, not a control
For defenders
This is not only an attacker's tool. Developers and security engineers use it daily. To see exactly what an application sends, including to third-party trackers. To reproduce a bug report precisely. To check security headers and cookie flags. To debug an API without a user interface. And, most valuable, to verify a fix: save the request that demonstrated the vulnerability, and replay it after the patch. If it still works, the fix did not.
- see exactly what your own app sends, including to third parties
- reproduce a bug report
- check security headers and cookie flags
- verify a fix: replay the attack request
- debug an API without the UI
- test a mobile app's backend calls
Common mistakes
Mistakes. Testing applications you do not own or have no permission for. Forgetting to set a scope, so your tools send attack traffic to third-party services the page happens to load. Installing the proxy's certificate authority in your everyday browser. Pointing an active scanner at a production system. Trusting client-side validation as a developer. And the classic: leaving the proxy configured and wondering why every website is broken.
- testing sites you do not own
- no scope set: traffic to third parties gets attacked
- proxy CA on your everyday browser
- running an active scanner against production
- trusting client-side checks
- leaving the proxy on and wondering why sites break
Say it like this
In the interview: client-side validation cannot be trusted because the client is under the user's control. With an intercepting proxy such as Burp, I can pause and edit any request after the page's own checks have run: hidden fields, object identifiers, prices, headers and cookies. So every check that matters has to be enforced on the server: authentication, authorization on each object, and validation of every value. Client-side checks are only for usability.
- "Because the client is under the user's control. With an intercepting proxy I can edit
- any request after the page's
- checks: hidden fields, ids, prices, headers. So every check that matters must run
- on the server: authentication, authorization, validation."