Signature-based Detection Using Network Timing
This talk demonstrates a technique for detecting malicious network traffic by analyzing the timing intervals between packets, rather than relying solely on traditional payload-based signatures. The speaker applies this method to identify command-and-control (C2) patterns in malware such as Emotet, Trickbot, and IcedID. By calculating the average time between transactions and using cointegration and Levenshtein distance on timing data, the speaker shows how to build signatures that can identify new variants of known malware. The presentation includes a custom Python-based tool that converts network timing patterns into audio files for identification.
Beyond Payloads: Detecting C2 Traffic Through Network Timing Analysis
TLDR: Traditional signature-based detection often fails against modern, encrypted C2 traffic because it relies on inspecting packet payloads. This research introduces a method to identify malicious beaconing by analyzing the precise timing intervals between network transactions. By applying mathematical techniques like cointegration and Levenshtein distance to these timing patterns, defenders can detect C2 activity even when the payload is fully encrypted or obfuscated.
Network security monitoring has hit a wall. As attackers shift toward ubiquitous encryption and sophisticated obfuscation, traditional signature-based detection—the bread and butter of most IDS/IPS deployments—is becoming increasingly ineffective. If you are still relying on matching strings in cleartext HTTP headers to catch C2 traffic, you are missing the vast majority of modern threats. The real-world risk is clear: attackers are hiding in plain sight, using standard protocols to tunnel their traffic, while our detection engines remain blind to the underlying behavioral patterns.
The Shift from Payload to Pattern
The core of this research is a simple but powerful observation: while attackers can easily change their payloads, obfuscate their code, and rotate their infrastructure, they struggle to change their fundamental behavioral habits. The way a piece of malware beacons to its C2 server is often dictated by its internal logic, which is notoriously difficult to refactor. Instead of looking at what is being sent, we should be looking at when it is being sent.
By capturing network traffic and focusing on the microsecond-level intervals between packets, we can build a behavioral fingerprint of a specific malware family. This is not about packet size or destination IP; it is about the rhythm of the communication. Whether it is Emotet, Trickbot, or IcedID, these tools often exhibit distinct timing signatures that persist across different infection environments.
Technical Implementation: From PCAP to Audio
To operationalize this, the research utilizes a custom approach that treats network timing as a time-series dataset. The process involves isolating individual network flows from a PCAP file, calculating the time delta between consecutive transactions, and normalizing these values to a common starting point.
The speaker demonstrated a clever, if unconventional, way to visualize and identify these patterns by converting the timing data into audio files. By mapping timing intervals to specific audio frequencies, the resulting MP3 files act as an audible signature of the malware's behavior. While this might sound like a novelty, it provides a unique way to compare different infection samples. If two samples "sound" the same, they are likely exhibiting the same C2 behavior.
For those looking to experiment with this, the yara-pcap tool is a great starting point for extracting these streams. Once you have your timing data, you can apply statistical methods to compare it against known baselines. The research specifically highlights the use of Levenshtein distance—typically used for string comparison—to measure the similarity between two sequences of timing intervals.
# Example of calculating the Levenshtein distance between two timing sequences
import Levenshtein
def calculate_similarity(sequence_a, sequence_b):
distance = Levenshtein.distance(sequence_a, sequence_b)
return distance
Real-World Application for Pentesters
For a pentester or a red teamer, this research is a double-edged sword. On one hand, it provides a new way to test the efficacy of your C2 infrastructure. If your beaconing pattern is too predictable, it will be trivial for a sophisticated defender to build a timing-based signature that flags your traffic, regardless of how well you encrypt your payloads.
During an engagement, you should be looking at your C2 traffic through the lens of timing. Are you using a fixed jitter? Is your beaconing interval consistent? If you are, you are leaving a trail that can be detected without a single byte of your payload being decrypted. When you are testing a client's detection capabilities, don't just check if they catch your shellcode; check if they catch your beaconing rhythm.
The Defensive Perspective
Defenders need to move beyond simple OWASP C2 detection strategies. While payload inspection remains necessary, it is no longer sufficient. Integrating timing analysis into your SIEM or network monitoring stack allows you to catch threats that are otherwise invisible.
The primary challenge here is noise. A busy network is full of jitter and latency that can mask these patterns. However, by focusing on long-term beaconing behavior rather than individual packets, you can significantly reduce false positives. The key is to establish a baseline of "normal" network behavior and then look for the persistent, rhythmic anomalies that characterize C2 traffic.
If you are interested in the code behind this, the full project is available on GitHub. It is a solid foundation for anyone looking to move their detection strategy from the static world of signatures into the dynamic, behavioral world of timing analysis. Stop looking for the needle in the haystack and start listening for the rhythm of the machine.
Vulnerability Classes
Up Next From This Conference

Breaking Secure Web Gateways for Fun and Profit

Listen to the Whispers: Web Timing Attacks That Actually Work

Abusing Windows Hello Without a Severed Hand
Similar Talks

Hiding in Plain Sight: Next-Level Digital Privacy

Tor: A Decade of Lessons

