Skip to content
Tutorials Center
My learning

Topics

Lesson 4 of 38 ยท Getting Started

HTTP for Burp Users

A focused HTTP refresher for Burp Suite users. Read requests, status codes, headers, cookies and bodies so every message in the proxy makes sense.

Burp Suite shows you raw HTTP. If you can read it fluently, the tool feels obvious; if not, every screen looks like noise. This lesson is a focused refresher on the parts of HTTP you will see all day in the Proxy, Repeater and Intruder tabs.

You do not need to memorise the standards. You need to recognise the five pieces of a message, know what the common headers do, and understand how the server tracks you between requests.

Anatomy of a request

HTTP
GET /search?q=laptop&page=2 HTTP/1.1
Host: shop.lab.test
User-Agent: Mozilla/5.0
Accept: text/html
Cookie: session=abc123; theme=dark
  1. Request line: method (GET), target (/search?q=laptop&page=2), protocol version.
  2. Headers: Name: value pairs. Host is mandatory in HTTP/1.1.
  3. Blank line ends the headers.
  4. Body (optional): form data, JSON, files.

The target has a path (/search) and a query string (q=laptop&page=2). Parameters in the query string are visible in URLs, logs and the browser's address bar, so sensitive values do not belong there.

Methods you will meet

  • GET reads a resource and should not change anything.
  • POST sends data to be processed: logins, form submissions.
  • PUT, PATCH, DELETE appear mostly in APIs.
  • OPTIONS is used by browsers for cross-origin "preflight" checks.
  • HEAD asks for headers only.

A common finding is a server that lets you change state through GET, which makes cross-site request forgery easier. In Burp you can switch a method in Repeater to see how the server reacts.

Anatomy of a response

HTTP
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Set-Cookie: session=abc123; Secure; HttpOnly; SameSite=Lax
Content-Length: 1523

<html>...</html>

The status line gives a numeric code and reason. The headers describe the body and give instructions (cookies, caching, redirects). Then the body follows.

Range Meaning Examples
1xx Informational 101 Switching Protocols (WebSocket upgrade)
2xx Success 200 OK, 201 Created, 204 No Content
3xx Redirect 301, 302, 304 Not Modified
4xx Client error 400, 401 Unauthorized, 403 Forbidden, 404
5xx Server error 500, 502, 503

Testers read status codes as signals. A 403 and a 404 for the same path may reveal that a resource exists but you cannot access it. A 500 after unusual input suggests the server did not handle it gracefully, which is worth investigating.

Headers worth knowing

Header Direction Why it matters
Host request Selects the virtual site on a shared server
Cookie / Set-Cookie both Session tracking
Authorization request Tokens or credentials (Bearer ...)
Content-Type both Format of the body (form, JSON, multipart)
Content-Length both Body size; Burp updates it for you after edits
Location response Redirect target
Referer request Page that led here
Origin request Origin for cross-site requests
Cache-Control response Caching rules
Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options response Security hardening

Cookies and sessions

HTTP is stateless: each request stands alone. Servers add memory with cookies. After login, the server sends Set-Cookie: session=...; the browser attaches Cookie: session=... to every later request. Whoever holds that value is treated as the logged-in user, which is why session values must be unpredictable, which you can examine with the Sequencer, and why cookie flags matter:

  • Secure: only sent over HTTPS.
  • HttpOnly: JavaScript cannot read it, limiting theft by injected scripts.
  • SameSite: limits sending on cross-site requests.

Body formats

  • application/x-www-form-urlencoded: a=1&b=2, the classic HTML form encoding, with special characters percent-encoded (%20 for space).
  • application/json: {"qty": 2}, typical for APIs.
  • multipart/form-data: file uploads, with boundary lines separating parts.

Burp's Inspector panel breaks these into editable fields, but knowing the raw form helps when something looks off.

Try it: parse a request and its cookies

A stand-in that parses a raw request, its query string and cookies using only Python's standard library.

Python Stand-in: parse request line, query and cookies

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice the repeated q parameter. Different servers pick the first, last, or all values, a difference attackers can exploit (HTTP parameter pollution) and testers can check by hand.

Try it: audit response headers

A second stand-in reads a response and reports missing security headers and weak cookie flags, a small version of what a scanner's passive checks do.

Python Stand-in: response header audit

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

HTTP versions and HTTPS

Burp displays HTTP/1.1 text. HTTP/2 uses binary frames, but Burp shows them in a readable form too, and its Inspector lets you edit pseudo-headers. HTTPS wraps all of this in TLS; to read it, the proxy decrypts and re-encrypts traffic using its own certificate, which is why you will install Burp's CA in the next chapter.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which part of an HTTP message ends the headers?

    A blank line separates the headers from the optional body.
  2. 2. A response sets a session cookie without the HttpOnly flag. What is the risk?

    HttpOnly hides the cookie from JavaScript. Without it, cross-site scripting can leak the session value.
  3. 3. What does a 403 status code usually mean?

    403 Forbidden means the server refuses access. Comparing it with 404 can reveal whether a resource exists.
  4. 4. Why should sensitive values not be sent in the query string?

    URLs are widely stored and shared. Secrets belong in the request body or headers over HTTPS.

Summary

  • A message is request or status line, headers, a blank line, then an optional body.
  • Methods, status codes and headers are signals; learn to read them quickly.
  • Cookies give stateless HTTP a memory; their flags (Secure, HttpOnly, SameSite) matter.
  • Bodies come as form encoding, JSON or multipart.
  • HTTPS hides this text on the wire, so Burp decrypts and re-encrypts with its own certificate.

Next: A web testing methodology