Intercepting and Manipulating Web Traffic
Capture one profile edit, change a single value, and connect the result to the server code that allowed or denied it.
You’re reading a preview. Premium includes the full lesson and specialist practice. View the full curriculum.
Alice can change her own profile name in a contact app. She captures that request, keeps her login unchanged, and replaces her profile ID with Bob's. Should the same request still work?
An intercepting proxy lets you see and edit the messages between the browser and server. A replay tool lets you send a copy. We'll use those tools to answer one small question at a time, starting with that profile edit.
Follow this sequence: capture a working request → change one value → replay it → check the stored result → find the server check. Burp Suite and Caido use different controls, but the reasoning is the same.
1. Set up a private testing browser
Use a dedicated browser profile and test accounts. Intercepting a browser session exposes that session's cookies, headers, form bodies, and private responses to the proxy's project storage. A separate profile prevents unrelated traffic from entering the evidence set. Configure the target scope, close unrelated tabs, and use harmless marker values such as review-marker-17 instead of real personal data.
Burp's built-in browser is a practical starting point because its proxy integration is prepared for testing. With an external browser, configure its proxy explicitly and follow the tool's current certificate instructions for HTTPS. Caido also provides documented proxy and browser setup. Installing a testing certificate changes which traffic that profile trusts; keep this within the dedicated testing environment and remove temporary trust when the lab is over.
The names and arrangement of proxy controls can change between tool releases. Follow the official setup pages linked below for your installed version. The method remains the same: establish connectivity, capture one request, identify editable bytes, send a copy to the replay tool, and preserve the baseline unchanged. In Burp this replay workflow uses Repeater; in Caido it uses Replay.
2. Capture one working profile edit
A normal update might look like this. The session and CSRF values are placeholders, not usable credentials. JSON escaping shown in the body belongs to the HTTP representation, not to a shell command.
PATCH /api/profiles/profile-alice HTTP/1.1
Host: training.local
Cookie: training_session=ALICE_SESSION
Origin: https://training.local
Content-Type: application/json
X-CSRF-Token: ALICE_CSRF
Accept: application/json
{
"displayName": "review-marker-17"
}
The request line selects an operation and a resource. The cookie supplies a credential. The Origin header describes browser context when a browser supplies it. The CSRF token participates in the application's intent defense. The body proposes a new value. You can edit all of these bytes in a proxy, but that does not mean the application should trust them equally.
Compare the request with the route implementation. Find the actual router, authentication middleware, CSRF middleware, parser, object policy, and repository call. Check route prefixes and method overrides: the code named updateProfile may be reached through several methods or an older API version. A client-side function with the same name is not the server policy.
Select each stage and ask what it contributes. Capturing traffic and understanding authority are complementary tasks.
Capture. A legitimate owner request establishes the baseline and the actual wire format.
PATCH /api/profiles/alice HTTP/1.1
Cookie: session=ALICE
X-CSRF-Token: VALID
Content-Type: application/json
{"displayName":"marker"}
Mutate. Keep identity and intent proof fixed while selecting a forbidden fixture object.
PATCH /api/profiles/bob HTTP/1.1
Cookie: session=ALICE
X-CSRF-Token: VALID
Content-Type: application/json
{"displayName":"marker"}
Explain. Inspect the object policy, repository predicate, and persisted record to establish the result.
UPDATE profiles
SET display_name = ?
WHERE id = ?
AND owner_id = ?;
Review question: An unchanged actor plus a changed target isolates object authorization only when the request reaches that decision.