Deep Packet Inspection

Deep Packet Inspection (DPI) analyzes network traffic beyond basic headers, examining payloads, protocol structures, and content inside packets. Unlike simple packet capturing, DPI understands what the traffic means, not just where it is going. Pentesters use DPI to detect anomalies, bypass evasions, uncover hidden protocols, analyze malicious traffic, and identify policy violations. DPI is essential for advanced network analysis.

What DPI Does

DPI goes beyond Layer 2 and 3 headers and inspects:

  • Full packet payloads

  • Application-layer data

  • Encoded or wrapped protocols

  • Metadata hidden inside sessions

  • Protocol violations

  • Unusual sequences

It reveals information not visible through standard packet sniffing.

DPI identifies:

  • Malware patterns

  • Tunneling activity

  • Encrypted vs unencrypted segments

  • Covert channels

  • Application misuse

  • Hidden commands inside protocols

DPI vs Basic Packet Capture

Basic packet capture:

  • Records packets

  • Shows headers

  • Displays unencrypted data

DPI:

  • Interprets application behavior

  • Detects protocol anomalies

  • Identifies patterns in encrypted traffic

  • Recognizes signatures and heuristics

  • Reconstructs sessions fully

DPI gives meaning to what packets contain.

Performing DPI with Wireshark

Wireshark has built-in DPI capabilities through protocol dissectors.

Following TCP Streams

Right-click → Follow → TCP Stream

This reconstructs full sessions, useful for HTTP, FTP, SMTP, or unencrypted protocols.

Inspecting Application Payloads

Wireshark automatically decodes:

  • HTTP headers and bodies

  • DNS queries and responses

  • SMB negotiation

  • TLS handshakes

  • SIP/VoIP traffic

  • Routing protocols

DPI reveals hidden details like cookies, tokens, SQL queries, and user activity.

Identifying Protocol Anomalies

DPI identifies incorrect protocol behavior, such as:

  • Invalid TCP flags

  • Incorrect sequence numbers

  • Fragmentation anomalies

  • Malformed DNS responses

  • Suspicious TLS negotiation

  • Embedded binary data in text protocols

These anomalies often indicate scanning, tunneling, or exploitation attempts.

DPI for Encrypted Traffic

Even without decrypting traffic, DPI extracts metadata such as:

Detecting SNI (Server Name Indication)

tls.handshake.extensions_server_name

Reveals domain names in encrypted sessions.

Identifying TLS Versions

ssl.record.version

Weak or deprecated versions indicate insecure configurations.

Fingerprinting Encrypted Traffic

DPI identifies:

  • Tor traffic

  • VPN protocols

  • Malware using custom encryption

  • Tunneling inside TLS

These patterns help uncover hidden communication.

DPI with Suricata

Suricata performs DPI using IDS/IPS rules.

Running Suricata for DPI

sudo suricata -i eth0 -s /etc/suricata/rules

Suricata detects:

  • Malware C2 traffic

  • Exploits

  • SQL injection patterns

  • Command injections

  • Brute-force attempts

  • Suspicious DNS tunneling

DPI logs appear in eve.json.

DPI with Zeek

Zeek interprets traffic at a high level and logs detailed behavioral information.

Starting Zeek Analysis

sudo zeek -i eth0

Zeek generates logs for:

  • HTTP

  • DNS

  • SSL/TLS

  • SMB

  • FTP

  • SSH

  • RDP

  • Kerberos

Zeek logs contain protocol semantics, not just packets, making DPI more analytic and structured.

Detecting Covert Channels

DPI detects hidden communication inside legitimate protocols such as:

  • DNS tunneling

  • ICMP tunneling

  • HTTPS obfuscation

  • Steganographic payloads

  • Suspicious header padding

These channels bypass firewalls and traditional monitoring.

Identifying Malware and Exploit Activity

DPI identifies attack patterns such as:

  • Buffer overflow attempts

  • Suspicious user agents

  • Encoded payloads (Base64, XOR)

  • Shellcode signatures

  • C2 beacon intervals

  • Reverse shells

DPI provides evidence for intrusion detection and incident response.

DPI for Network Policy Violations

DPI reveals misuse or prohibited activities, such as:

  • Streaming services

  • P2P protocols

  • Unauthorized VPNs

  • Non-work related applications

  • Rogue cloud services

This is essential for compliance testing.

Why Deep Packet Inspection Matters

DPI gives complete visibility into network behavior. It is essential for:

  • Detecting hidden attacks

  • Understanding application behavior

  • Analyzing malware traffic

  • Monitoring encrypted sessions

  • Investigating intrusions

  • Revealing covert channels

  • Validating security controls

DPI elevates network analysis from raw packets to meaningful insights.

Intel Dump

  • DPI analyzes payloads and application behavior

  • Tools: Wireshark, Suricata, Zeek

  • Detects anomalies, malware, tunneling, and protocol misuse

  • Extracts metadata from encrypted traffic

  • Provides full visibility for advanced pentesting and incident response

HOME LEARN COMMUNITY DASHBOARD