I'm reading about 'Header manipulation attacks' and came across a statement which has me scratching my head. First I'm going to transcribe the statement and following that I have a few questions.
What I read: "TCP/IP packages data into packets before sending them over a network. These packets have headers, which include different types of information depending on the header type. For example,
TCP headers include port numbers to identify the protocol, and IP headers include source and destination IP address."
The first thought that came to mind was, port numbers don't mean anything when it comes to identifying a protocol. I understand TCP headers include a port number but the part that really has me asking question is "to identify the protocol". The transport protocol is identified in the previous layer (IP) however the transport layer itself doesn't identify what to expect in the application layer protocol as far as I can tell. If I wanted, I could run a web server (http 1.1) on port 6667 so obviously we can't really depend on ports to identify an application layer protocol.
1. Am I missing something, or is my understanding of things as explained above correct?
2. Question about wireshark: The field 'hypertext transfer protocol' which is highlighted in blue, am I correct to assume that's Wireshark's analysis of what I'm looking at (and not an actual field) and everything else which is indented is what's actually found within that layer?
3. I see there's a field which reads 'GET / HTTP/1.1\r\n'. I am aware of the fact that HTTP 2.0 also exists so I guess it's reasonable for web servers and web browsers to tell each other which protocol they're speaking. My question is, do applications ALWAYS have to tell each other what protocol/version they're talking? Considering the traffic is always guaranteed to go to the correct proto:port (socket?), isn't it a bit redundant to always announce the application layer protocol and version of that protocol (unless I guess we're dealing with an application which has multiple
versions of its protocol, such as http which has 1.1 and 2.0)
TIA


