In Burp Suite's Proxy, how do intercept, the history tables and match and replace rules each affect traffic?
answer
- one holds, one records, one rewrites
- history updates even with Intercept off
- rules run in order on every message
- original, edited and auto-modified views
- a rule persists after you stop looking
basics
~20 sIntercept holds a message until you forward or drop it, the history records traffic even when Intercept is off, and match and replace rules rewrite matching messages automatically and persistently. Each changes what a later reader sees.
solid answer
~40 sIn Burp Suite's Proxy, **intercept** stalls messages that match its rules so you can edit, forward or drop them; left on, it stalls the client. The **HTTP history** and **WebSockets history** record traffic as it passes, even when Intercept is off, and a filter only changes what is displayed. **Match and replace** rules rewrite parts of HTTP or WebSocket messages automatically, in order, for every message they match, until disabled; **Only apply to in-scope items** limits them. Modified messages are shown separately in the history and the default display can be Original, Edited or Auto-modified. A reviewer therefore asks whether a rule was enabled before trusting what a history shows.
go deeper
Recall the three jobs: intercept holds, history records, match and replace rewrites.
Explain interception rules, why history updates with Intercept off, and the Type, Match, Replace and Regex match fields of a rule.
Diagnose a divergent result: a forgotten rule, a stalled request, a filtered history, or a view set to Original rather than Auto-modified.
Standardise project hygiene: rules reviewed and cleared between engagements, histories exported with their settings, and the state of interception recorded in test notes.
## Three different jobs Burp Suite's Proxy does three things to traffic that are easy to blur together: it can **hold** a message, **record** it, and **rewrite** it. Knowing which one is in play tells you what the tester saw, what the application received and what the history will show afterwards. | Feature | What it does | Does it persist? | |---|---|---| | Intercept (Proxy > Intercept) | Stalls matching messages so they can be edited, forwarded or dropped | Only while Intercept is on | | HTTP and WebSockets history | Records messages that passed through | Yes, in the project | | Match and replace | Rewrites matching parts of messages as they pass | Yes, until the rule is disabled or removed | ## Intercept - **Intercept on** holds messages for you; **Intercept off** forwards everything automatically. Controls include Forward, Forward all, Drop and Drop all. - Which messages are stalled is decided by **request and response interception rules**: each has a boolean operator (AND or OR), a match type, a match relationship (Matches or Does not match) and a match condition, combined with the rules above it in order. - The WebSocket rules hold client-to-server or server-to-client messages, and can be limited to in-scope messages. - The **Default Proxy interception state** setting chooses whether interception is on at start-up: enabled, disabled, or restored from the last session. - A held request means the browser is waiting. Left on and forgotten, the application under test appears hung or times out, which can look like an application fault in the test notes. ## The histories The **HTTP history** records the traffic that passed through the Proxy, and it is **always updated, even if Intercept is off**. Its columns include `#`, Host, Method, URL, Params, Edited, Status code, Length, MIME type, Extension, Title, Notes, TLS, IP, Cookies, Time and Listener port, plus two response-timer columns. The **WebSockets history** holds the WebSocket messages Burp's browser exchanges, with columns including URL, Direction, Edited, Length, Notes, TLS, Time, Listener port and WebSocket ID. Filters, such as showing only in-scope items or only items with notes, **control what is displayed and do not delete anything**. Hidden items return when the filter is reset. Notes and highlights help a second reader follow the tester's reasoning. ## Match and replace Rules automatically replace parts of HTTP and WebSocket messages as they pass through. In Settings mode a rule has a Type (for HTTP, such as Request header or Response body) or a Direction (for WebSocket), a Match, a Replace and a Comment, with an optional **Regex match**. For a header rule, a blank Match adds the replacement as a new header and a blank Replace removes a matching header. A **Script mode** with Java scripts exists in Professional. Enabled rules run in turn in the table's order, a built-in test function shows the effect, and **Only apply to in-scope items** limits them. ## A worked example A tester points a listener's **Redirect to host** at a staging server. Burp's documentation notes that a server expecting a different Host header from the one the browser sends may need a match and replace rule that rewrites it, so the tester adds one. Weeks later the project is reused against a different staging host and the rule is still enabled. Every request now carries the old Host value, replies come from the wrong virtual host, and the results make no sense until someone opens the rules table. The history's auto-modified view shows the rewritten request, and the Comment field on a rule is where the tester should have written why it exists. ## Reading a history you did not produce 1. Check whether any match and replace rule is enabled, and whether it is limited to scope. 2. Remember that modified messages are shown separately, whether the change came from the tester's interception, automatic response modification or a rule. 3. Check the **Default Proxy history message display** setting: Original, Edited or Auto-modified. 4. Compare the history with the application's own logs. The application saw the rewritten request, not the one the browser sent. ## Common mistakes - Switching Intercept off and assuming nothing is being recorded. - Leaving a rule enabled in a project reused for the next test. - Reading a filtered history as the full record. - Reporting an application's reaction without noting the rule that changed the request.
- An assessor reruns last month's test and the application behaves differently. How could a match and replace rule explain it?A rule left enabled in the project keeps rewriting every matching message, so the application receives something different from what the tester typed. Check the rules table, the scope limit, and the history's auto-modified view; compare them with the application's own log of the received request.
- What does the WebSockets history add that the HTTP history does not?It records individual WebSocket messages, with a Direction column for outgoing against incoming and a WebSocket ID that ties messages to one connection. It has the same filtering, search and notes, and the same listener port column.
Intercept is a hold bench in a mailroom, the history is the mailroom's log book, and a match and replace rule is a standing instruction to re-label every parcel that matches: the instruction keeps acting long after you stop watching the bench.
- Believes the history stops recording while Intercept is off
- Thinks a history filter deletes the hidden items
- Forgets that match and replace rules persist and run on every matching message
- Blames the application when Intercept was simply left on
- Assumes the history always shows what the application received