Headers: The Hidden Instructions Traveling With Your Data
A header is structured information that tells software about the data it's handling. It can identify a destination, describe the type of content, or carry instructions, while the main content is usually called the body or payload.
There isn't one universal header format. Network packets, web messages, and email each use their own fields, which are the named pieces of information inside a header.
The word also has a publishing meaning: a page's visible banner or a document's repeating top section. A website's logo and navigation header is different from the technical headers exchanged behind the scenes.
The Seven Layers Behind Every Network Message
On the web, headers guide the browser
HTTP, the Hypertext Transfer Protocol, is the set of rules browsers and web servers use to exchange requests and responses. HTTP headers carry extra information with those messages.
A server might include this field in its response:
Content-Type: text/plain
Content-Type is the field name, and text/plain is its value. It declares that the response contains plain text, helping the browser decide how to handle the body.
Other headers control behavior rather than describe content. For example, Cache-Control: no-store tells compliant caches, which keep reusable copies of responses, not to store that response.
Headers can also carry sensitive information. The Authorization field can contain credentials used to access an account or service, so a copied request shouldn't be treated as harmless text to post publicly.
In a packet, headers help data reach the right place
A packet is a chunk of data traveling across a network. Its Internet Protocol, or IP, header includes source and destination addresses used in moving it between devices.
Inside that packet, another protocol may add another header. TCP, the Transmission Control Protocol, uses fields including port numbers and sequence numbers.
Ports help identify the communicating applications; sequence numbers help track the order of the data. The TCP specification defines these fields separately from the data they accompany.
These headers belong to different layers of the communication system. An IP address, a TCP port, and an HTTP content type answer different questions, even when they all help deliver the same webpage.
- Keep work, guest and smart-home gear apart with up to 32 VLANs on one small switch.
- Copy any port's traffic to your laptop with port mirroring and see what is on the wire.
- Set it up from a web page instead of learning a command line.
In email, a field isn't proof of identity
Email headers include familiar fields such as From, To, Date, and Subject, along with less visible delivery and authentication information. Mail services can add fields as they process a message.
The visible To line isn't the whole delivery instruction. The mail-transfer standard separates the message's headers and body from its delivery envelope, which supplies recipient addresses to mail servers.
Similarly, a From field states who the message claims to be from; it doesn't prove that person's identity. Reading more header lines doesn't automatically reveal the sender's device or physical location.
Some fields record the results of authentication checks, but their origin matters. The standard for Authentication-Results explicitly addresses forged fields and the need to trust the system that supplied them.
When examining a header, ask which protocol defines it, what the field means, and who was able to set its value. That last question separates a useful observation from an unsupported assumption.
Payloads: What a Packet Carries and an Attack Delivers

Encapsulation: Why It Means Different Things in Code and Networks

Protocol Stacks and OSI: How Network Jobs Fit Together

QUOTE:
"Amateurs hack systems, professionals hack people."
