Understand HTTP request/response anatomy by hand-editing live requests in Burp Repeater
So today while officially starting the Red-Team Journey I just did a lot of research and found out that I should again start from the basic side that is learning the Web-side which is “HTTPS” but lets learn it with a twist.
So the twist was lets learn it in the Burp suite by seeing each and every request and how it intercepts the request easily and can see that side of the web that has never been seen by a normal developer or person.
Task 1 - See a raw request and response
1
curl -v https://httpbin.org/get
1
2
3
4
5
6
7
8
9
> GET /get HTTP/1.1
> Host: httpbin.org
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Thu, 27 Aug 2026 06:05:48 GMT
< Content-Type: application/json
< Content-Length: 256
> lines are what left my machine. < lines are what came back. That’s the entire anatomy of both halves — request line, headers, blank line, body.
Task 2 - Control a header
1
curl -H "X-Preet: hello" https://httpbin.org/headers
1
2
3
4
5
6
7
8
{
"headers": {
"Accept": "*/*",
"Host": "httpbin.org",
"User-Agent": "curl/8.4.0",
"X-Preet": "hello"
}
}
Here the header accepted the request without any problem.
Task 3 - GET versus POST: where the data lives
a)
1
curl "https://httpbin.org/get?user=preet&role=admin"
1
"args": { "role": "admin", "user": "preet" }
b)
1
curl -X POST -d "user=preet&role=admin" https://httpbin.org/post
1
2
"form": { "role": "admin", "user": "preet" },
"args": {}
GET puts the whole thing inside the URL where it lands in browser history, logs and Referer header whereas POST puts it in the body.
Task 4 - Walk the status codes
1
2
3
4
for code in 200 301 302 401 403 404 500; do
echo "--- $code ---"
curl -s -o /dev/null -D - "https://httpbin.org/status/$code"
done
1
2
HTTP/1.1 301 MOVED PERMANENTLY
Location: /redirect/1
Here the redirect isn’t a special kind of response, it is rather a normal response that just carries a Location header telling the browser where to go next.
Task 5 - Catch a request in flight
Burp -> Proxy -> Intercept ON -> then browse to http://httpbin.org/get in the embedded browser.
The browser just hangs here. And the request is now sitting inside Burp, frozen and fully editable, after the browser sent it but before the server ever saw it.
I changed the User-Agent, hit Forward, and the page loaded normally.
This one move is basically the whole idea of a proxy. You are sitting in the middle and nothing goes out until you allow it.
Task 6 - Replay it in Repeater
Right click the request in HTTP history -> Send to Repeater (Ctrl+R).
This is the request that came from the real browser:
1
2
3
4
5
6
7
8
9
GET /get HTTP/1.1
Host: httpbin.org
Accept-Language: en-US,en;q=0.9
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Now I have the same request in a box with a Send button, and I can edit any part of it as many times as I want without touching the browser again.
Task 7 - Change the path
1
2
GET /nonexistent HTTP/1.1
Host: httpbin.org
1
2
3
4
5
6
HTTP/1.1 404 NOT FOUND
Content-Type: text/html
Content-Length: 233
<title>404 Not Found</title>
<h1>Not Found</h1>
Just one word changed and the whole response changed. Also notice the Content-Type went from application/json to text/html, so the error page is a completely different type of document, not just a different message.
After this I put the path back to /headers so httpbin keeps echoing my headers.
Task 8 - Change a header
1
User-Agent: Preet/1.0
1
"User-Agent": "Preet/1.0"
Preet/1.0 is not a browser at all. The server did not know and did not care.
Task 9 - Add a header
1
2
3
4
5
6
7
8
9
10
GET /headers HTTP/1.1
Host: httpbin.org
Accept-Language: en-US,en;q=0.9
Upgrade-Insecure-Requests: 1
User-Agent: Preet/1.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
X-Test: hello
1
2
3
4
5
6
7
8
9
10
11
12
13
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 453
{
"headers": {
"Accept-Encoding": "gzip, deflate, br",
"Host": "httpbin.org",
"User-Agent": "Preet/1.0",
"X-Amzn-Trace-Id": "Root=1-6a8fd7b0-...",
"X-Test": "hello"
}
}
X-Test is a header that no browser in the world would ever send. I made it up and the server echoed it back like it was completely normal.
Task 10 - Delete a header
Removed the line Accept-Encoding: gzip, deflate, br
1
2
3
4
5
6
7
{
"headers": {
"Host": "httpbin.org",
"User-Agent": "Preet/1.0",
"X-Test": "hello"
}
}
Still 200 but now the body comes back uncompressed. That header was my client telling the server “I can handle gzip if you want to send it that way”. Once I removed the hint the server had to assume I cannot.
So a lot of what the server does is decided by hints the client itself is giving, and every one of those hints is a line I can just delete.
Task 11 - Break it by accident
While editing I deleted the blank line at the bottom and sent it.
1
Status: Cancelled
No response at all. Not a 400, not an error page, just silence.
The reason is that the server has no idea how many headers are coming. The only thing that tells it “headers are finished” is that one blank line. Remove it and the server keeps waiting for a header that never comes, until it times out.
This accident was actually the most useful part of the session because it showed me two very different failure types:
| What you sent | What happens | What it means |
|---|---|---|
| Malformed request | Hang or drop | Server could not even parse it |
| Well formed but invalid | A real status code | Server parsed it fine and said no |
Later when a payload is not landing, this is the first thing to check.
Task 12 - Delete Host, deliberately
1
2
3
4
5
GET /headers HTTP/1.1
Accept-Language: en-US,en;q=0.9
User-Agent: Preet/1.0
Connection: keep-alive
1
HTTP/1.1 400 Bad Request
This time it is a clean rejection. The server understood my request perfectly and still said no.
In HTTP/1.0 there was no Host header, one IP meant one website. HTTP/1.1 made Host mandatory so that many sites can sit behind a single IP, and the server reads that header to decide which site you are asking for.
Think about that for a second. A header that the client is sending is deciding which application handles the request. That is routing logic running on input I fully control, which is exactly why Host header attacks are their own category. I have not reached that topic yet but now I understand why it exists.
What I actually learned
A request is just text. There is no object, no validation, no library checking my work. Burp sends whatever bytes are in the box and the server parses whatever arrives.
Which means all the rules the browser enforces, like disabled fields, JavaScript validation and Same-Origin Policy, are enforced inside the browser only. A proxy sits below all of that. Client side controls are only suggestions.
The blue team side of it
Since I am not leaving detection behind, here is the other half.
Everything I did above is very easy to spot for anyone actually looking at HTTP logs:
User-Agent: Preet/1.0matches no real browser and no known crawler. UA anomaly rules are cheap to write and they catch a lot of basic tooling. Burp’s default UA is even louder if you forget to change it.- Browsers send headers in a consistent order and a consistent set. My hand edited requests did not. A request claiming to be Chrome but missing Accept-Encoding is a contradiction, and contradictions are detectable.
- Real browsing pulls CSS, images, fonts, favicon. Repeater traffic is one path repeated with small changes and nothing around it. The shape of the session gives it away before any single request does.
- The hang from Task 11 leaves a half open connection or a parse error depending on the server.
That is four different artifacts from a session where I was not even trying to be quiet. Learning how to be quiet comes much later. Knowing what is loud comes first, and that is the part my SOC time already prepared me for.
Where I reached
Covered: request anatomy, response anatomy, status codes, GET vs POST, important headers, and why a proxy gives total control.
Still left: request bodies and the other methods, cookies and their flags, sessions vs tokens, Same-Origin Policy, TLS, and encoding.
Next session I am moving off the echo server and onto OWASP Juice Shop, because cookies and Set-Cookie flags only get interesting when something is actually trying to remember who you are.
1
docker run --rm -p 3000:3000 bkimminich/juice-shop
My target for finishing this module: write a full authenticated HTTP request by hand, no browser involved, and get a valid response back. Not there yet, but I can now write an unauthenticated one and correctly guess what the server will say, including when it will say nothing at all.