Tunneling is a network stealth technique that encapsulates Layer 3 packets under a new header to reroute traffic covertly, often combined with encryption to form a VPN connection between an attacker and a compromised machine.
Tunneling as Stealth Technique
Another stealth technique that we can use to get information in and out of the network without being discovered is tunneling.
Tunneling is the idea that we get a new header for this layer 3 packet. So here we have just a regular layer 3 packet, and in this we have a layer 3 header. The layer 3 header has a source and destination IP address, and what happens is that this gets routed from router to router until it gets to its destination. That's regular routing for a regular packet.
But tunneling is the idea that we're going to actually put a different layer 3 header on this, and now it's going to get routed according to this different layer 3 header. So it could be routed a little differently to get to its final destination based off of this different source and destination IP address.
So for instance, if we wanted something to be tunneled to us, we could possibly disguise it by putting a different header on the front of it and then send it directly to us. One example might be if we were doing sniffing on this network and packets were making it to our compromised machine here. One way to get it back to us would be to put a different layer 3 header on there and then have it come back to us, and now the original packet is still intact.
Probably a little more common though is we do some sort of encryption. So what we would do is we would encrypt this layer 3 packet right here, and then we put a new layer 3 header on this, and then send it our way. This actually creates what's called a virtual private network, or VPN. A VPN is an encrypted tunnel. So then we would get traffic from the compromised machine right here to our machine via encrypted tunnel. That's one way: establish a VPN between the adversary and the compromised machine.
Here's the attack card on the stealth technique of tunneling. Tunneling is a way that we can use some sort of encapsulation and encapsulate the original layer 3 packet, and then it could be used for like extending a network, or sending it our way, or going across other protocols. So it's a way to get traffic to us, but we can also encrypt it. So it's commonly used with encryption to get packets to our machine from some other machine. If that information were encrypted we'd call that a virtual private network, or VPN. So we could establish this VPN connection so no one else could see what this traffic looked like, because it was encrypted.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →