Abstract
Botnets remain a critical threat to network security, facilitating large-scale attacks such as DDoS and identity theft. Traditional detection methods often struggle with "zero-day" attacks or subtle variations in traffic flow. This paper proposes a robust, two-stage machine learning framework that analyzes network communication as a graph. By integrating unsupervised pruning with supervised classification and introducing a neighborhood normalization technique, the system achieves near-perfect detection rates and maintains high precision even against previously unseen botnet variants.
Introduction
Botnets—networks of compromised "zombie" computers under the control of a "botmaster"—are responsible for significant economic and infrastructure damage. Existing detection strategies typically rely on signature-based matching or flow-based statistical analysis. While signature-based methods are fast, they fail against new attacks. Flow-based methods, while more flexible, often overlook the structural communication patterns that characterize botnet behavior.
This research advocates for a graph-based analysis, which provides a more intuitive representation of network interactions. By treating IP addresses as nodes and communications as edges, the system can identify malicious behaviors through structural features.
Proposed Methodology
The proposed framework consists of three primary stages: graph transformation, neighborhood normalization, and a two-phase machine learning pipeline.
1. Graph Transformation and Feature Extraction
The system processes bidirectional network flows to construct a directed graph. From this graph, seven key features are extracted for each node:
- Degree (In/Out): The count of unique communication partners.
- Weight (In/Out): Total packet volume.
- Betweenness Centrality (BC): A measure of how often a node serves as a bridge on the shortest paths between other nodes.
- Local Clustering Coefficient (LCC): Indicates the "tight-knit" nature of a node's neighborhood, useful for identifying P2P botnets.
- Alpha Centrality (AC): Measures a node's influence while accounting for external sources.
2. Neighborhood Normalization (F-Norm)
To ensure the model remains effective across diverse network topologies, the authors introduced F-Norm. This technique scales a node's features relative to its immediate neighbors. This normalization ensures that a benign host appears "normal" regardless of whether it is located within a small home network or a large-scale data center, providing spatial stability to the model.
3. Two-Phased Machine Learning
The core of the detection engine is a two-stage process designed to handle the massive class imbalance typical of network traffic (where the vast majority of hosts are benign).
- Phase 1 (Unsupervised): A Self-Organizing Map (SOM) clusters hosts based on their graph features. The largest cluster is assumed to represent benign traffic. Any host falling outside this "normal" cluster is flagged as "suspicious" (Highly Objectionable Behavior, or HOB).
- Phase 2 (Supervised): A Decision Tree classifier is then applied only to the suspicious hosts identified in Phase 1. This "pruning" step allows the supervised model to focus on the most difficult cases, significantly improving overall precision.
Experimental Evaluation
The framework was evaluated using the CTU-13 dataset, which includes 13 scenarios featuring seven distinct malware types. The models were trained on 12 subsets and tested on the remaining data.
Key Results
- High Performance: The SOM + Decision Tree approach achieved 100% recall and 90.9% precision on standard test data.
- Zero-Day Resilience: In tests against a bot type not present in the training set (Scenario #6), the system maintained 100% recall and 100% precision. In contrast, standalone models like Logistic Regression saw precision drop to 50% in the same scenario.
- Operational Efficiency: Despite the overhead of graph analysis, the two-phase system was 11 seconds faster than a standalone Logistic Regression model during testing, as the second phase processed a significantly reduced volume of data.
Conclusion and Future Work
The two-phase graph-based approach demonstrates exceptional robustness and accuracy in botnet detection. The integration of neighborhood normalization allows the model to be deployed across different network architectures without losing effectiveness. However, the computational complexity of calculating Betweenness Centrality ($O(V \cdot E)$) remains a bottleneck for real-time application in massive networks. Future research will explore more efficient graph metrics or parallelized algorithms to enhance scalability.
Summary updated