Packet tracing
Packet tracing is a technique to find the number of hosts between us and our target. Sometimes, we may even get information about intermediate hosts πΊοΈ.
The main technique used is an increasing TTL (Time-To-Live). The TTL determines the number of hops before the packet is destroyed. Intermediate machines that destroy a packet may answer back saying that the packet was destroyed.
We keep sending a packet, and increasing by one the TTL. This is how we may map the network.
Refer to the traceroute/tracepath commands, or tracert on Windows.
Additional notes
π₯ Routes taken by packets may change.
π Some well-known operating systems have well-known TTL values. We may use that to identify the operating system that responded, while it's very unreliable.