Finding Botnets Using Minimal Graph Clusterings

Peter Haider, Tobias Scheffer

Abstract

This paper presents a novel approach to botnet identification by framing the problem as a minimal graph clustering task. By modeling the conditional distribution of clusterings directly and enforcing a "minimal" constraint—where clusters are only merged based on direct empirical evidence—the authors develop a system that effectively groups IP addresses into botnets. Evaluated on real-world spam data, the method achieves an AUC of 0.784, significantly outperforming traditional spectral and threshold-based clustering techniques.

Introduction

Botnets, comprised of compromised "zombie" computers, facilitate the majority of malicious internet activity, including DDoS attacks, identity theft, and email spam. Identifying these networks is complicated by several factors: the absence of ground truth, the dynamic nature of botnet membership, and the overlap of multiple campaigns across different infrastructures. Traditional generative models often fail because they rely on rigid assumptions about botnet behavior that do not hold in practice. This research seeks to cluster IP addresses into botnets using only observable evidence without making risky guesses about underlying generative processes.

Methodology

Graph Representation

The authors construct a graph where nodes represent messages. An edge is established between two nodes if they share an IP address or were identified as part of the same spam campaign by detection tools. This representation allows the model to leverage the transitive property: if IP A is linked to campaign B, and campaign B is linked to IP C, the model can infer a relationship between A and C.

The Minimal Constraint

The core innovation is the "minimal" constraint. A clustering is considered minimal if it only merges two groups of nodes when there is direct empirical evidence (an edge in the input graph) connecting them. This prevents the model from hallucinating connections between unrelated networks, acting as a powerful defense against false positives.

Probabilistic Modeling and Inference

Instead of a generative model, the authors use a conditional model $P(Clustering | Graph)$. They employ a Chinese Restaurant Process (CRP) as a prior to handle the unknown number of botnets. To find the optimal clustering, they developed a specialized Gibbs sampler. Because the minimal constraint has non-local effects, the sampler updates entire rows and columns of the adjacency matrix simultaneously to ensure the Markov chain remains ergodic and can reach any valid state.

Experimental Setup

Datasets

The study utilized a real-world dataset collected over 11 days in January 2012 from a large email service provider.

  • Scale: The final dataset included 701,207 unique pairs of campaigns and IP addresses for training and 71,528 for testing.
  • Filtering: Known legitimate forwarding servers and very small campaigns (fewer than 100 messages) were excluded to reduce noise.
  • Evaluation: "Ground truth" was defined by the model's ability to predict future participation. If an IP was observed in Campaign A during the first 16 hours, the model was tested on its ability to predict the IP's appearance in Campaign B in the following 8 hours.

Results and Discussion

The Minimal Graph Clustering model was compared against three baselines: a threshold-based heuristic, spectral clustering, and a generative edge model.

  • Predictive Accuracy: The proposed model achieved an AUC of 0.784, significantly higher than the threshold-based baseline (0.675).
  • Robustness: The model was particularly effective at high true-positive rates, which is critical for real-world defense scenarios, such as deciding which traffic to drop during an active attack.
  • Efficiency: While more computationally expensive than simple heuristics, the Gibbs sampler's complexity was $O(n^2)$ in practice, making it feasible for large-scale datasets.

Conclusion

By prioritizing empirical evidence over generative assumptions, the minimal graph clustering approach provides a more accurate and robust means of identifying botnets. While the method is computationally more intensive than traditional heuristics, its predictive power offers a significant advantage for cybersecurity defense. Future work may involve optimizing the sampler for streaming scenarios and applying the logic to HTTP-based web attacks.

Summary updated

BibTeX
@misc{haider2012finding,
  author = {Peter Haider and Tobias Scheffer},
  title = {{Finding Botnets Using Minimal Graph Clusterings}},
  year = {2012},
  eprint = {1206.4675},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1206.4675},
}
Figure