Protocol Analysis

Reading HTTP traffic

HTTP is one of the easiest protocols to read in a capture because it is plain text. If the traffic is not encrypted, you can see every request and response in full.

3 min readLesson 2

Captures used in this lesson

HTTP traffic is a goldmine for packet analysis. Unlike encrypted protocols where you can only see metadata, unencrypted HTTP shows you everything: the URL being requested, the headers, the cookies, and the response body. Even in an era where most traffic uses HTTPS, you will still encounter HTTP in internal networks, IoT devices, legacy systems, and malware traffic.

Anatomy of an HTTP request

An HTTP request in a packet capture looks something like this:

GET /api/users HTTP/1.1
Host: internal-api.example.com
User-Agent: Mozilla/5.0
Accept: application/json
Cookie: session=abc123

Each line tells you something useful:

  • Method + Path: GET /api/users tells you what resource was requested and how. GET reads data, POST sends data, PUT updates, DELETE removes.
  • Host header: tells you which domain the client was contacting. This is especially useful when multiple websites share the same IP.
  • User-Agent: identifies the client software. An unusual or generic User-Agent can indicate scripted requests or malware.
  • Cookies: session identifiers, authentication tokens. These are sensitive.

Anatomy of an HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1234

{"users": [...]}

The status code tells you what happened:

Code RangeMeaningExamples
2xxSuccess200 OK, 201 Created
3xxRedirect301 Moved, 302 Found
4xxClient error401 Unauthorized, 404 Not Found
5xxServer error500 Internal Server Error, 503 Service Unavailable

What to look for

POST requests with data

POST requests often carry the most interesting data: login credentials, form submissions, API calls with payloads. If HTTP traffic is unencrypted, any POST body is visible in the capture.

Filter for POST requests: http.request.method == POST

Large responses

Unusually large HTTP responses might indicate data exfiltration or file downloads. You can sort by packet size or filter by content length to find these.

Suspicious paths

Look for paths that do not match normal application behaviour. Things like /cmd, /shell, /upload, or encoded paths with ../ can indicate exploitation attempts.

Missing or unusual headers

Legitimate browsers send a recognisable set of headers. Malware and scripts often send minimal headers or use unusual User-Agent strings. Compare what you see against what a normal browser would send.

To reconstruct the full HTTP conversation (request + response), use TCP stream following. This assembles the packets in order so you can read the exchange as it happened.

HTTPS and what you can still see

When traffic is encrypted with TLS (HTTPS), you cannot read the request or response body. But the TLS handshake still gives you useful information:

  • Server Name Indication (SNI): the domain name the client is connecting to, visible in the Client Hello packet
  • Certificate information: the server's identity and certificate chain
  • JA3/JA3S fingerprints: cryptographic fingerprints of the client and server TLS implementations, useful for identifying malware

Filter for TLS handshakes: tls.handshake.type == 1 (Client Hello)

You see an HTTP POST request to /api/login with a body containing username and password in plain text. What does this tell you?

Practical tips

When analysing HTTP in a capture:

  1. Start with http filter to see all HTTP traffic
  2. Look at http.request for requests and http.response for responses
  3. Follow TCP streams for complete request/response pairs
  4. Pay special attention to POST bodies and response codes
  5. Check User-Agent strings for anything unusual
  6. Look for credentials, tokens, or sensitive data in headers and bodies