Come on boy, most said it’s not possible, but in reality it’s yes!
I don’t know if you’re going to use this for good or if you want to go hacking around, what you’re going to do with this kind of information is up to your conscience and everyone who’s going to read it!
Thanks to peculiarities in the implementation of the TCP/IP stack of different suppliers it is possible to analyze and identify different operating systems/devices.
To understand how this works it is important that you know the structure of an IP package:
Look at how much information a TCP package loads, I’m not going to handle each parameter that’s a bit extensive, what’s important for you to know is that some of this information changes from OS to OS and you can analyze it using traffic analysis techniques.
This can be done passively or actively:
- Active - Your device (PC, etc.) sends packets to the IP you want and analyzes the answer.
- Passive - Only intercepts packets that traffic on the network (sniffers).
One very rudimentary way is to analyze the Time to Live (TTL) and Window fields!
TTL - Maximum time packets can take before they are destroyed (can be seen in the figure of the IP package structure in the red part).
window - Size of the receiving window (can be seen in the figure of the IP package structure in the yellow part).
See how certain patterns for these two fields can tell you differentiated operating systems just by analyzing the return of packages:
Linux (kernel 2.4 and 2.6)
- Time To Live = 64
- TCP Window Size = 5840
Google Linux
- Time To Live = 64
- TCP Window Size = 5720
Freebsd
- Time To Live = 64
- TCP Window Size = 65535
Windows XP
- Time To Live = 128
- TCP Window Size = 65535
Windows Vista and 7 (Windows Server 2008)
- Time To Live = 128
- TCP Window Size = 8192
iOS 12.4 or Cisco Routers
- Time To Live = 255
- TCP Window Size = 4128
Okay, now you have an idea of how this is possible, imagine now instead of just analyzing two fields, analyzing a larger set, defining and observing the patterns and thus achieving greater consistency and correctness. Well, this is possible, with 67 bits of analysis you will possess a very reliable signature:
- Initial package size - Using Field values IHL and
Total Length it is possible to know the initial package size (16
bits).
- Time to Live field value (8 bits).
- Window field value (16 bits).
- Maximum segment size (16 bits) - In the field TCP Options can contain the information that defines the maximum size of segment reception, this information is sent in the initial communication, if this parameter does not exist any segment size is allowed.
- Window scaling value (8 bits) - In the field TCP Options can contain information allowing the size of incoming packages to increase.
- "don’t Fragment" flag (1 bit) - In the field Fragment Offset may or may not contain information on fragmentation.
- "sackOK" flag (1 bit) - In field TCP Options may contain information on how packages are retransmitted in case of percas, says whether selective receipts are allowed or not.
- "Nop" flag (1 bit) - plus an option defined in the field TCP Options, the length of the TCP header needs to be multiple of 4. However this will not always happen, when this disparity occurs it is necessary to send some Nops (1 bit or more) to adjust the header size and depending on where these Nops are added and whether they are at the beginning or end along the options, we can identify patterns from certain OS’s.
If you sum all the BITS of these 8 fields will have 67 bits of information that vary and behave differently, now you can build a Fingerprint (fingerprint) and trace the behavior patterns that each operating system has on the network!
You have two good answers, one speaking of the IP number (that of Victor) and the other speaking of the protocol known as IP (that of ederwander), whose interpretation is independent of the number itself. To which of the two things the question refers, the number or the protocol?
– Bacco
Actually the question was open to interpretation as @Bacco said, when I read the question I just interpreted that any IP traffic can be analyzed and classified, imagine that I go to your home connect on your Wifi network and do not know any of the other ips of your network, I can use a scan to discover which ips are alive and apply fingerprint to them sending packets and analyzing returns, but now I’ve really been in doubt if that’s what you’d like to know huauahu
– ederwander
@ederwander as the question is ambiguous, I consider that at the time of the answers both you and Victor answered correctly. I only commented, because although the two have information that seems conflicting, in fact they are complementary, because the aspects addressed are different, then I thought to make it clear :)
– Bacco