Deep packet inspection (DPI) goes beyond traditional firewall filtering by examining the actual data payload inside network packets, enabling detection of malware, data exfiltration, and other threats that IP header analysis alone would miss.
Deep Packet Inspection
I've heard this term deep packet inspection for a long time now, and way back when, I used to think, wow, that sounds like something really crazy and advanced. But I'm here to tell you it really isn't.
Here is an IP packet right here. When we're doing deep packet inspection, it's on these packets. Now, a typical firewall takes a look at the IP header and looks for certain information there, specifically the source and destination IP address. It looks at the TCP connection and what port it's involved with. And we also learned how it actually takes a look at the application layer. So it'll go into this data right here and take a look at the application and see what application is running to do some of its filtering.
But when we're talking about deep packet inspection, we're actually getting into the data and what the data looks like. So not only is it taking a look at what application is running here at layer 7, but also what data is being transferred back and forth. Now we have the ability to take a look and see, well, is there a file in there that's malicious software, that's some sort of virus? Is there some sort of data that's being exfiltrated and being taken from our systems and being stolen? And so we have a deeper look into what's happening within those packets.
How would we do deep packet inspection? Well, I'm on a Windows machine to show you exactly that. I'm going to open up Wireshark. Wireshark is a program that we can use to monitor traffic across a network, specifically across an interface. So I'm going to open up one of the interfaces, and we're going to see that a bunch of data is coming in across this interface. I'm actually also going to open up a web page, so let's go to how about techknowsurge.com and just generate some traffic from that.
So there we have it, we've generated some traffic. I am going to stop this from happening. We're going to sort by protocol over here so I can get all those TCP connections together. It's taking a second because I did capture 15,000 packets, so that's a ton of packets, so we'll give it a second to do that.
I've got a packet selected here. A regular firewall, or an older firewall, would just take a look at this layer 3 right here and take a look at the IP address. Here's the source and destination IP addresses. And then take a look at layer 4 and see what port it's on, and it would base a lot of its filtering off of that. We know as things progressed, then they started looking into this application layer and seeing what's inside the application layer.
Now what we're doing is we're starting to look into the deep packet. So if I look at here, here's the actual data stream that's right here. And now by looking at the data stream, I'm really digging down deep into this packet. In fact, what we're going to do is I can even take a look at the bits. So it doesn't really get too much deeper than this. We're actually looking at the bits that's coming through here.
Now, we'll say that this is encrypted traffic, and most of our traffic is going towards encrypting all of our traffic. So this actually makes it more difficult on a firewall to be able to inspect this stuff to do deep packet inspections. And encrypting is a great thing, that's what we want to have happen. So it makes it a little more difficult in some aspects from a firewall perspective, because now it can't analyze if this is malicious software or whatever the case may be.
But this essentially is what we're talking about when we're talking about deep packet inspection. It's going all the way down to these data bits and the data that's being transferred back and forth that typically older firewalls didn't look at, and now newer firewalls are looking at that.
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 →