Skip to content
← Back to the module
Lesson 0715 min read

Intercepting Traffic with a Proxy

Set up Burp Suite Community with your browser and HTTPS, then use Proxy, Repeater, Intruder, Decoder, Comparer, scope and match-and-replace; ZAP and Caido as alternatives.

See and change every request

An intercepting proxy is a program that sits between your browser and the web server. Your browser sends every request to the proxy, the proxy forwards it to the server, and the response comes back through the proxy to the browser. Because the traffic passes through a tool you control, you can:

  • Inspect every request and response, including the calls JavaScript makes silently in the background and requests the browser would never show you.
  • Pause and edit a request before it reaches the server (interception).
  • Replay a request again and again with small changes, which is the heart of manual testing.
  • Keep a searchable history of everything you did, for the whole engagement.
  • Automate repetitive variations, such as trying many values for one parameter.

Why not just use the browser? The browser enforces rules the server quietly relies on. It URL-encodes input, applies the same-origin policy, refuses to send malformed headers, hides some headers and fills in others. A proxy removes those guardrails so you can send the exact bytes you choose. The server has no way of knowing whether a human at a browser or a script is on the other end, and that asymmetry is where web hacking happens.

This lesson teaches Burp Suite Community Edition, the free edition of the most widely used web security proxy, and then shows alternatives. Concepts transfer between tools, so whichever one you use, aim to understand what each feature does.

Use a proxy only on applications you own, practice labs, or targets for which you have written authorization. Intercepting your own browser's traffic is legal; testing someone else's system without permission is not.

The tool landscape

Tool Cost Notes
Burp Suite Community (PortSwigger) Free Industry standard UI. Includes Proxy, Repeater, Decoder, Comparer, Sequencer and a rate-limited Intruder. No automated scanner, no saving projects to disk, and no Collaborator.
Burp Suite Professional Paid Adds the vulnerability scanner, full-speed Intruder, project files, Collaborator (out-of-band testing), and more.
OWASP ZAP Free, open source Intercepting proxy plus an active/passive scanner, spider, fuzzer, scripting, automation and API. Good for CI pipelines.
Caido Free tier and paid Newer, lightweight, Rust-based proxy with a modern UI, replay, automate and workflows.
mitmproxy Free, open source Command-line/TUI proxy, scriptable with Python. Excellent for mobile apps and automation.
Browser DevTools Free Reading and light replay, but no interception.

You do not need all of them. Pick one for daily work. This lesson uses Burp because most courses, write-ups and PortSwigger's Web Security Academy assume it.

Installing Burp Suite Community

  1. Download it from portswigger.net/burp/communitydownload for your operating system. It bundles its own Java runtime.
  2. Install and launch it.
  3. At the start screen choose Temporary project (the only option in Community) and Use Burp defaults, then Start Burp.

You will see tabs such as Dashboard, Target, Proxy, Intruder, Repeater, Sequencer, Decoder, Comparer, Extensions and Settings. Burp's UI changes slightly between versions; if a menu is not where this lesson says, use the search box in Settings.

Connecting your browser to the proxy

By default Burp listens on 127.0.0.1:8080. You have two easy ways to route a browser through it.

Option A: Burp's built-in browser (easiest)

In Proxy, Intercept tab, click Open browser. It is a Chromium instance already configured for the proxy and already trusting Burp's CA certificate. Everything works immediately, including HTTPS. Many testers use this exclusively.

Option B: Your own browser (Firefox recommended)

Using a dedicated browser or profile keeps testing separate from daily use.

  1. In Firefox: Settings, search for "proxy", Settings... under Network Settings, choose Manual proxy configuration, HTTP Proxy 127.0.0.1, Port 8080, and tick "Also use this proxy for HTTPS".
  2. Better: install the FoxyProxy extension and create a profile for 127.0.0.1:8080 that you can toggle on and off with one click.
  3. In Firefox, also remove localhost, 127.0.0.1 from the "No proxy for" field if you are testing a local lab, otherwise local traffic bypasses the proxy.

Installing the CA certificate for HTTPS

Without extra steps, HTTPS sites show certificate errors. Why? For encrypted traffic, Burp must decrypt it, read it and re-encrypt it to the server. It does this by presenting your browser with certificates it generates on the fly, signed by Burp's own certificate authority (CA). Your browser rejects them until you tell it to trust that CA. (This is the same mechanism corporate TLS inspection uses, and the reason you should never install an untrusted CA on a device you do not own.)

  1. With the proxy active in your browser, visit http://burpsuite (or http://127.0.0.1:8080). Click CA Certificate to download cacert.der.
  2. In Firefox: Settings, Privacy & Security, View Certificates, Authorities, Import..., choose the file and tick Trust this CA to identify websites.
  3. In Chrome/Edge on Windows: open the certificate manager (certmgr.msc or Settings, Privacy and security, Security, Manage certificates), import into Trusted Root Certification Authorities. On macOS, add to Keychain Access and set it to Always Trust. On Linux, Chrome uses the NSS database (Settings, Manage certificates, Authorities, Import).
  4. Restart the browser, then browse to an HTTPS site. If no error appears, it works; check the certificate: the issuer will be PortSwigger CA.

Remove or limit Burp's CA when you stop testing, and never share the exported private key. Anyone holding it could impersonate sites for browsers that trust it. Using a separate browser profile for testing avoids the issue.

Sites with certificate pinning (mobile apps especially) reject the proxy's CA and need extra work (outside this lesson).

The Proxy tab

Intercept

Proxy, Intercept. When Intercept is on, each request is held until you click Forward (send it) or Drop (discard it). You can edit the request in the panel first. When Intercept is off, traffic flows freely and is just recorded.

Practical advice: leave interception off most of the time. Browse normally, then use HTTP history to find requests of interest. Turn interception on only for a specific action, such as intercepting one particular form submission to modify it before it is sent. A page can fire dozens of requests, and forwarding each by hand is painful. You can also intercept responses (right-click a request, Do intercept, Response to this request) to modify what the browser receives.

HTTP history

Proxy, HTTP history lists every request passing through, with Method, URL, Status, Length, MIME type, whether it has parameters, and more. Click a row to see the request and response in the panels below, in Pretty, Raw, Hex and Render views.

Skills to practice:

  • Filter (the bar above the table): show only in-scope items, hide images/CSS/JS, show only requests with parameters, filter by status code or search term.
  • Sort by columns, e.g. status or length, to spot anomalies.
  • Highlight and comment interesting rows.
  • Search within history: use the filter's search text, or Ctrl+F in the request/response panel.
  • WebSockets history is a separate sub-tab.
  • Right-click any row for the action menu: Send to Repeater (Ctrl+R), Send to Intruder (Ctrl+I), Send to Comparer, Send to Decoder, Copy URL, Copy as curl command, Add to scope, and more.

Target and scope

Target, Site map builds a tree of every host and path discovered through your browsing. It helps you see the shape of the application and find paths you have not visited.

Scope defines which targets you are actively testing:

  1. In Target, Site map, right-click your host and choose Add to scope.
  2. Burp may offer to stop logging out-of-scope traffic. Accepting it keeps your history clean (no analytics, ad networks or browser telemetry) and prevents accidentally testing hosts you are not authorized to test.
  3. In the history filter, tick Show only in-scope items.

Scope is both a productivity and a safety feature. For real bug bounty or client work, define scope exactly as the rules of engagement state, and use the proxy to enforce it. A scope rule matches protocol, host, port and file path using regular-expression-like patterns.

Repeater: the manual testing workhorse

Repeater lets you send a request, read the response, edit the request and send again, as many times as you like, each attempt side by side with its response.

Workflow:

  1. Find a request in HTTP history, right-click, Send to Repeater (Ctrl+R). Go to the Repeater tab (Ctrl+Shift+R).
  2. Click Send. The response appears on the right.
  3. Change one thing: an id in the URL, a JSON field, a cookie value, a header, the HTTP method. Click Send again.
  4. Compare: status code, response length, body, headers, timing (shown at the bottom).
  5. Open multiple Repeater tabs (right-click or Ctrl+T-style duplicate) to keep different experiments organized. Rename tabs.

Tips:

  • Use Pretty for readability and Raw to see exact bytes. Inspector (side panel) lets you edit parameters, cookies and headers as structured data and shows the decoded value of encoded text.
  • Right-click inside the request: Change request method (converts GET to POST), Change body encoding (form to multipart), Engagement tools, and Convert selection for URL, Base64 and HTML encoding on the fly.
  • Follow redirection button to see where a 302 goes.
  • Use the history arrows to step back through previous attempts.
  • Make one change at a time. Otherwise you will not know which change caused a response difference.

Common Repeater experiments:

Goal Edit
Test access control Change an id (/orders/1001 to /orders/1002), or remove the session cookie, or use a low-privilege user's cookie on an admin request
Test input handling Replace a parameter value with unusual input, quotes, long strings, other types ([], null)
Test method handling Switch GET/POST/PUT/DELETE and read Allow
Test trust in headers Add X-Forwarded-For: 127.0.0.1, change Host, Origin, Content-Type
Explore errors Remove a parameter or break JSON syntax and read the error message

Intruder: automation (limited in Community)

Intruder sends many variations of a request by replacing marked positions with payloads. Typical uses: iterate ids, try wordlists of values, fuzz parameters, test many usernames.

Setup:

  1. Send a request to Intruder (Ctrl+I).
  2. In Positions, wrap the part to vary with § markers (the Add § button): for example id=§1§.
  3. Choose an attack type:
Attack type Behavior
Sniper One payload set, one position at a time; tests each position independently
Battering ram One payload set, the same value put into all positions simultaneously
Pitchfork A payload set per position, iterated in parallel (1st with 1st, 2nd with 2nd)
Cluster bomb A payload set per position, every combination (cartesian product)
  1. In Payloads, choose a type: simple list, numbers (range), runtime file, custom iterator, and so on.
  2. Start the attack and watch the results table: sort by Status, Length, response time, or add Grep - Match rules (text to look for in the response, such as "Welcome" or "Invalid") and Grep - Extract.

Interpretation: in a successful attack, one result usually differs from the rest in status or length. Always compare to a baseline.

In Burp Community, Intruder is throttled (requests are heavily delayed) and the newer "Burp Suite" attack configuration is limited, so it is fine for learning and small tests, but too slow for big wordlists. For high-volume work people use ffuf, wfuzz, custom scripts, Burp Pro, or Caido's Automate. Also remember that sending many requests to a production system can look like an attack or cause an outage; follow the rules of engagement and rate limits.

Decoder

Decoder converts data between encodings, with chaining. Paste text, then pick Decode as or Encode as: URL, HTML, Base64, ASCII hex, hex, octal, binary, GZIP, and Smart decode, which guesses. You can chain operations (for instance URL-decode, then Base64-decode, then read), and compute hashes (MD5, SHA-1, SHA-256, and others).

When to use: read a Base64 cookie, decode a JWT payload, craft a payload you must double-encode, check what a parameter looks like after one decoding step. Ties directly to the encodings lesson. Right-click selected text anywhere in Burp, Send to Decoder, or use Repeater's Inspector for quick conversion.

Comparer

Comparer shows differences between two items, either words or bytes. Send two responses (right-click, Send to Comparer), choose Words or Bytes and look at the highlighted differences.

Why it matters: many bugs present as subtle differences. Compare a response for an existing username versus a non-existing one (user enumeration), the same page for two different users (access control), or a response before and after your change (blind injection). A difference of a single word, header or byte is a clue.

Sequencer (brief)

Sequencer analyses the randomness of tokens (session ids, CSRF tokens, reset links). Capture many samples of a token and Burp estimates entropy. Weak, predictable tokens enable session guessing. Community includes it.

Match and replace

Proxy, Settings (or the older Options), HTTP match and replace rules lets you automatically rewrite requests and responses as they pass through, for example:

Goal Rule
Pretend to be mobile Request header, replace User-Agent: .* with a mobile UA
Add a header to every request Request header, empty match, replace X-Forwarded-For: 127.0.0.1
Swap a cookie to another account Request header, match Cookie: session=.*, replace with the other session
Remove client-side security Response body, match integrity= or a script that disables a button
Reveal hidden elements Response body, match type="hidden", replace type="text" (a classic: see hidden fields as editable text)
Strip CSP Response header, match Content-Security-Policy:.*, replace empty (in your own test instance only, to see whether XSS would work without it)

Rules can use regular expressions and can apply to the request or response, header or body. Remember to turn them off when finished, or you will wonder why the app behaves strangely.

A typical workflow, end to end

  1. Start Burp, open the built-in browser (or your proxied browser), and add the target to scope.
  2. Explore the app with interception off: sign up, log in, use every feature. Complete each flow (checkout, password reset, file upload).
  3. Review HTTP history (in-scope only) and Site map. List endpoints, parameters, ids, tokens, roles.
  4. Pick an interesting request and send it to Repeater. Change one thing, resend, compare.
  5. Use Comparer for subtle differences, Decoder for encoded values, Intruder for small enumerations.
  6. When you find something, confirm it reproducibly, write down the exact request and response, and note the impact.
  7. Save notes: Community cannot save projects, but you can right-click and save selected items, copy requests, or export to files.

Alternatives in brief

OWASP ZAP

Free, open source, maintained by the Software Security Project (formerly OWASP). Configure the same way (proxy 127.0.0.1, default port 8080, import its root CA from Tools, Options, Network, Server Certificates, Save). Key features: Sites tree, History, Manual Request Editor (like Repeater), Fuzzer, Active Scan and Passive Scan, Spider/AJAX Spider, Break (interception), scripting, and a headless automation framework that works well in CI. Its UI is a different layout but each concept maps one-to-one to Burp's.

Caido

A newer, lightweight proxy with a modern interface: Intercept, HTTP History, Replay (Repeater), Automate (Intruder, not throttled in the free tier at the time of writing, check current terms), Match & Replace, Scope, Findings and Workflows. It runs as a local service you open in a browser. Good if Burp's weight or Java stack bothers you.

mitmproxy

A terminal-based interactive proxy (mitmproxy, mitmweb, mitmdump) scriptable in Python. Strong for mobile traffic, API work and automation; less friendly for manual workflows.

Whatever tool you use, the muscle memory is the same: record, find, replay, change one thing, compare.

Troubleshooting

Symptom Likely cause
Browser says "proxy server is refusing connections" Burp is not running or is listening on a different port (check Proxy, Proxy settings, listeners)
HTTPS pages show certificate warnings CA not imported or not trusted by that browser; import and restart
Nothing appears in HTTP history Browser not using the proxy; check FoxyProxy is on; or scope filter hides traffic
Page hangs Intercept is on and a request is waiting; click Forward or turn Intercept off
localhost traffic not captured Browser bypasses proxies for localhost; remove the exception, or use 127.0.0.1 with a hostname alias
Some apps do not work through the proxy Certificate pinning, HTTP/2-only or WebSocket quirks, or non-HTTP protocols
Repeater returns different results than the browser Missing cookies, stale CSRF tokens or timestamps, or request headers you changed

Hands-on exercises

  1. Install and connect. Install Burp Community, start a temporary project, open the built-in browser and visit http://example.com. Find the request in HTTP history. What is the status and length?
  2. HTTPS test. Visit https://example.com in the proxied browser. Check the certificate issuer. Then stop the proxy and compare.
  3. Scope. Add example.com (or your lab) to scope and enable the history filter "show only in-scope". Browse a news site (also through the proxy) and see that it disappears from your filtered history.
  4. Repeater. On a practice app you control, send a request to Repeater and change one parameter at a time. List three things the response differences taught you.
  5. Decoder. Take a Cookie or Authorization header value, send it to Decoder, and decode it. Chain URL-decode then Base64-decode on a value you create yourself.
  6. Comparer. Send two login responses (valid user versus invalid user, on a practice app) to Comparer. What differs?
  7. Intruder. On a safe practice target or your own local app, attack a numeric id parameter using Sniper with a numbers payload from 1 to 20. Sort by length. Why do some results differ?
  8. Match and replace. Add a rule that changes type="hidden" to type="text" in responses, reload a form, and observe the revealed fields. Disable the rule afterwards.
  9. Try an alternative. Install ZAP or Caido and reproduce exercise 1 and 4. Note which concepts mapped directly.

Checklist

  • I can route a browser through a proxy and trust its CA for HTTPS.
  • I can explain why the proxy needs its own CA certificate.
  • I keep interception off by default and use HTTP history.
  • I can define scope and use it to avoid testing out-of-bounds hosts.
  • I can send a request to Repeater and change one thing at a time.
  • I know the four Intruder attack types and when each fits.
  • I can use Decoder, Comparer and match-and-replace.
  • I know what Burp Community lacks compared with Professional.

Key takeaways

  • A proxy lets you control the exact bytes you send and see everything the app does.
  • Record first (history), then analyse, then replay with one change at a time.
  • Scope keeps your work focused and authorized.
  • Repeater is for thinking, Intruder is for volume, Comparer and Decoder help you read results.
  • Tools differ; the workflow of observe, modify, resend and compare is universal.

Further reading

  • PortSwigger documentation: Burp Suite Community Edition, "Getting started with Burp Proxy", "Installing Burp's CA certificate", Repeater, Intruder, Decoder, Comparer
  • PortSwigger Web Security Academy: free labs designed to be solved with Burp
  • OWASP ZAP documentation (zaproxy.org) and Getting Started guide
  • Caido documentation (docs.caido.io)
  • OWASP Web Security Testing Guide: testing methodology and tools