Next Article in Journal
Development of a Fault Detection and Localization Model for a Water Distribution Network
Next Article in Special Issue
Research on the Simulation Method of HTTP Traffic Based on GAN
Previous Article in Journal
Hydraulic Characterization of Green Roof Substrates by Evaporation Experiments
Previous Article in Special Issue
Android Malware Detection Based on Hypergraph Neural Networks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Distributed Detection of Large-Scale Internet of Things Botnets Based on Graph Partitioning

1
School of Information and Communication Engineering, Beijing University of Posts and Telecommunications, Beijing 100876, China
2
State Grid Laboratory of Power Cyber-Security Protection and Monitoring Technology, Sgri Power Grid Digitizing Technology Department, State Grid Smart Grid Research Institute Co., Ltd., Beijing 100190, China
3
Cyberspace Institute of Advanced Technology, Guangzhou University, Guangzhou 511363, China
*
Authors to whom correspondence should be addressed.
Appl. Sci. 2024, 14(4), 1615; https://doi.org/10.3390/app14041615
Submission received: 11 January 2024 / Revised: 9 February 2024 / Accepted: 10 February 2024 / Published: 17 February 2024

Abstract

:
With the rapid growth of IoT devices, the threat of botnets is becoming increasingly worrying. There are more and more intelligent detection solutions for botnets that have been proposed with the development of artificial intelligence. However, due to the current lack of computing power in IoT devices, these intelligent methods often cannot be well-applied to IoT devices. Based on the above situation, this paper proposes a distributed botnet detection method based on graph partitioning, efficiently detecting botnets using graph convolutional networks. In order to alleviate the wide range of IoT environments and the limited computing power of IoT devices, the algorithm named METIS is used to divide the network traffic structure graph into small graphs. To ensure robust information flow between nodes while preventing gradient explosion, diagonal enhancement is applied to refine the embedding representations at each layer, facilitating accurate botnet attack detection. Through comparative analysis with GATv2, GraphSAGE, and GCN across the C2, P2P, and Chord datasets, our method demonstrates superior performance in both accuracy and F1 score metrics. Moreover, an exploration into the effects of varying cluster numbers and depths revealed that six cluster levels yielded optimal results on the C2 dataset. This research significantly contributes to mitigating the IoT botnet threat, offering a scalable and effective solution for diverse IoT ecosystems.

1. Introduction

With the innovation and advancement of information technology, the application of Internet of Things (IoT) technology has experienced explosive growth in various fields. Increasingly, IoT products, systems, and platforms have emerged, covering industries such as industrial control [1,2], agriculture [3], logistics [4], healthcare [5], transportation [6], energy [7], and smart living [8]. According to data released at the 2023 Global Digital Economy Conference, by the end of May this year, the number of mobile IoT terminal users in China exceeded 2.05 billion, making it the first among major economies worldwide to achieve a “thing” connection count surpassing the “people” connection count.
However, this growth brings with it significant security challenges. The diversity and proliferation of Internet of Things (IoT) devices have made them prime targets for botnet attacks. As these devices become infected with malicious programs and turned into puppets under attackers’ control, the rapid expansion of botnet nodes gives rise to large-scale network security incidents, including distributed denial of service (DDoS) attacks. These incidents cause substantial losses to IoT users, highlighting the urgent need for effective security measures. The issue of detecting botnet nodes within the Internet of Things (IoT) ecosystem has emerged as a prominent research area, garnering significant attention from both industry and academia [9].
The botnet, consisting of a vast network of infected computers, poses a significant threat to the security of the Internet of Things. Attackers have compromised these computers through various means, infecting them with malicious programs and turning them into puppet hosts under the attackers’ control. Once the attacker successfully infects victim devices with bot programs, these devices become botnet hosts and join the attacker’s command and control network. As shown in Figure 1, when there is a need for attack activities, the attacker sends various attack commands through a control channel, which are received and executed by these puppet hosts, forming a highly controllable botnet. Due to the dynamic nature of network traffic, it is challenging to detect botnet nodes effectively.
According to Threat Intelligence Report 2023 [10], 60% of attacks in telecom mobile networks are linked to Internet of Things (IoT) bots scanning for vulnerable hosts to expand their botnets for use in distributed DDoS attacks. Botnets have become a major generator of DDoS traffic. In 2016, attackers exploited Mirai [11] to compromise thousands of IoT devices and use them as nodes to launch large-scale DDoS attacks, causing significant disruptions to numerous mainstream websites. The Mirai attack wave reached its peak in September 2016 when this botnet launched massive DDoS attacks, resulting in temporary outages of prominent sites such as OVH, Dyn, and Krebs on Security, rendering them unable to provide normal services. According to reports from OVH and Dyn, the peak traffic of these attacks exceeded 1 Tbps, making it the largest known attack in terms of scale. The Necurs botnet [12], composed of millions of infected devices, is capable of sending 5 million spam emails worldwide every hour. IoT botnets have increasingly become a serious threat to network security.
Existing botnet detection methods mostly rely on machine learning or deep learning-based approaches. Beigi et al. [13] evaluated the effectiveness of features such as the source port, destination port, protocol, communication duration, first packet length, packet exchange, and random reconnection in botnet detection. However, using similar features requires researchers to possess sufficient domain knowledge and select the most effective features for experimentation. With the emergence of graph neural networks, researchers have started exploring graph learning methods to address the botnet detection problem [14,15,16]. Given the complexity of relationships between entities that graphs can model, they are particularly suited for depicting intricate network structures. Their ability to efficiently extract features and generalize makes them powerful tools for analyzing network behavior. However, the challenge arises in distributed training, especially when dealing with the vast number of nodes in botnets and the constrained computing capabilities of IoT devices. To manage large-scale graph data on parallel computing systems effectively, it is crucial to partition and distribute these data across various computing nodes. This strategy aims to ensure optimal load balancing among nodes while also minimizing the communication costs between them, highlighting the importance of an efficient graph partitioning algorithm for distributed computing of large-scale graph data. Among the available algorithms, METIS [17], developed by the Karypis lab, is notable for its robust performance in segmenting large, irregular graphs, partitioning extensive grids, and optimizing the ordering for sparse matrix factorization. Its application spans a wide range of fields that require graph partitioning, underscoring its significance and versatility.
In this work, we propose a botnet community detection method. It primarily utilizes an efficient deep graph convolutional network to identify large-scale IoT botnet communities. In graph neural networks, numerous inter-layer message-passing processes require high communication demands. This limits the performance of common distributed training methods, making it challenging to achieve optimal training results. To address this issue, we draw inspiration from Cluster-GCN [18], proposed by Google, which has demonstrated outstanding performance in protein–protein interaction (PPI) and Reddit datasets. First, we preprocess the challenging task of training large-scale IoT botnets by applying data preprocessing to update the initial embedding representation of each node. Next, we employ the METIS algorithm to perform graph partitioning, obtaining small subgraphs that can be trained on individual machines. To better leverage the information propagated by neighboring nodes without causing gradient explosion, we employed a diagonal enhancement technique to process the embedding representations at each layer to identify botnet attacks.
In summary, the key contributions of this paper are as follows:
  • We introduce a new system that efficiently detects centralized and P2P botnets in large-scale IoT networks using minimal GPU memory resources. It only requires aggregated connection information from network traffic, making it highly practical for real-world deployments.
  • We propose a method that applies a data preprocessing method for large graphs and first implement an efficient graph convolutional neural network, Cluster-GCN, for botnet detection. Cluster-GCN effectively partitions large graphs into small subgraphs that can be trained on individual IoT devices.
  • We implemented a prototype and conducted experiments using the C2, P2P, and Chord datasets. The experimental results demonstrate that our proposed research method achieves an accuracy of 0.99978. Furthermore, at this accuracy level, it significantly reduces the required computational resources.
The paper is organized as follows:
Section 2 summarizes the previous related work. Section 3 describes the background knowledge. Section 4 illustrates our proposed method in detail. Section 5 presents the evaluation results, including the datasets, tables, and metrics, and analyzes the results. Section 6 visualizes and discusses the proposed model detection results. Finally, in Section 7, the conclusion is presented.

2. Related Work

In the past few years, there has been a significant amount of research focused on botnet detection. In this section, we discuss previous studies and research related to the detection of botnets, including methods based on machine learning and graph learning approaches.

2.1. ML-Based Approaches

In the early stages, the detection of botnets primarily relied on machine learning algorithms [19,20] such as random forest [21], SVM [22], k-means [23], XGBoost [24], and others. In 2007, Choi et al. [25] proposed a mechanism for detecting botnets by monitoring Domain Name System (DNS) traffic. This mechanism detects botnet activity formed by simultaneous DNS query requests from distributed botnet programs. However, this approach requires significant processing time when monitoring large-scale networks. Gu et al. proposed BotHunter [26], BotSniffer [27], and BotMiner [28], which analyze traffic features such as abnormal packet sizes and port numbers from the perspectives of multiple infection detection stages, multi-round communication activities, and longer communication response times to identify botnets. Azab et al. [29] utilized the Classification of Network Information Flow Analysis (CONIFA) framework to extract a set of network traffic features to capture patterns in C&C channels and malicious traffic. Current machine learning-based botnet detection methods require a substantial amount of domain knowledge and expert feature extraction, such as packet sizes and inter-arrival times. Since 2010, with the gradual development of deep learning [30], the latest deep learning algorithms have significantly surpassed traditional machine learning algorithms in terms of data prediction and classification accuracy. Deep learning does not require manual feature extraction but automatically filters and extracts high-dimensional features from the data. Recently, transfer learning [31] and ensemble learning [32] have been increasingly employed in network data detection. However, both approaches face challenges regarding their generalization capabilities. Existing detection methods, such as extracting features of botnet attack vectors [33], flow features [34], and utilizing auto-encoders to extract packet features [35], combine with convolutional neural networks (CNN), long short-term memory (LSTM), and other methods for botnet detection. Nevertheless, the processing of high-dimensional data is inherently complex, demanding significant computational resources and storage capacities [36,37]. This presents a particular challenge for IoT devices, which are often constrained by limited memory capacities, impeding their ability to store the requisite volume of network traffic data for analysis. To address the above issues, this article proposes the application of graph partitioning techniques as a solution.

2.2. Graph-Based Approaches

The problem of botnet detection can be addressed through a graph-based approach. Graph neural networks [38] are capable of capturing complex interactions between nodes, adapting to new models and data and exhibiting better generalization performance in detecting botnets. They also possess efficient feature extraction capabilities, relieving the burden of manual feature extraction in traditional methods. Furthermore, graph neural network-based methods can quickly adapt to botnet attacks [39], ensuring the normal operation of legitimate nodes in the network while detecting traces of botnet nodes. They perform well in handling large-scale networks, effectively processing graphs with millions of nodes, thereby addressing complex network environments like the Internet of Things (IoT). Therefore, employing a graph-based method, specifically utilizing graph neural networks, offers advantages such as capturing complex node interactions, better generalization performance, efficient feature extraction, alleviating manual feature extraction efforts, adaptability to network attacks, and effective handling of large-scale networks with millions of nodes.
Graph-based features are better than flow-based features in detecting botnet malware, since they avoid the need to cross-compare flows across the dataset. Chowdhury et al. [40] investigate seven graphed-based features that may be connected to bot activities, and apply a self-organizing map (SOM) to establish the clusters of nodes based on these graph features, which enables fast detection of bot nodes. Nguyen et al. [41] propose PSI-Graph to detect IoT botnets by extracting high-level functional graphs, thereby improving their effectiveness in handling multi-architecture issues while avoiding complex control flow graph analysis. Wang et al. [42] propose an automated model, BotMark, that detects botnets with a hybrid analysis of flow-based and graph-based network traffic behaviors. Lo et al. [43] propose XG-BoT, an explainable deep graph neural network model, for botnet node detection. The proposed model is composed of a botnet detector and an explainer for automatic forensics. It can effectively detect malicious botnet nodes under large-scale networks. Zhao et al. [44] proposed Bot-AHGCN, which establishes a multi-attribute heterogeneous information network (AHIN) to model the interdependencies between botnet entities and learn the interaction behavior patterns among bots. Nguyen et al. [45] present a novel high-level PSI-rooted subgraph-based feature for the detection of IoT botnets, then generate a limited number of features that have precise behavioral descriptions, which require a smaller space and reduce the processing time. In this article, the detection accuracy of botnet nodes will be enhanced, and the application of graph neural networks in botnet detection will be expanded through the optimization of the graph convolutional neural network model.

3. Background

In this section, we first introduce the topology of botnets to illustrate our motivation. Then, we provide an overview of the GCN and METIS algorithms to enhance understanding for the subsequent sections.

3.1. Botnet Architecture

A botnet refers to a network formed by infecting a large number of hosts with one or more propagation methods, enabling one-to-many control between the controller and the infected hosts. Based on the command and control (C&C) structure of botnets, the transmission of commands and critical information to the bots is defined, leading to three types: centralized, decentralized, and hybrid.
Centralized botnets use a client/server (C/S) model where botnet hosts actively send requests to a limited number of C&C servers. The attacker distributes control commands and program resources through these C&C servers, as shown in Figure 2. However, the centralized topology has a fatal flaw, which is a single point of failure. If a C&C server is discovered, the botnet hosts cannot receive instructions and stop working. While this benefits white-hat security professionals maintaining network security, it is detrimental to malicious hackers seeking to cause disruptive security events.
To overcome the single point of failure in centralized botnets and improve their robustness and flexibility, attackers have applied peer-to-peer technology, forming decentralized botnets known as P2P botnets, as shown in Figure 3. In P2P botnets, bot nodes act as both clients and servers, and each node is equal. Although command dissemination in P2P botnets is slower, the communication process does not rely on a specific node, making them difficult to measure, hijack, and shut down. P2P botnets have better scalability and robustness compared to traditional C/S structures but are more challenging to eliminate due to their large scale and defense difficulty.
Figure 4 shows the structure of a hybrid botnet, which combines both centralized and decentralized elements, incorporating the advantages of both. An example is Pinkbot [46], which uses a P2P approach for less time-sensitive instructions and employs a C&C mode for distributing time-critical commands. The experimental dataset used in Section 5 consists of both centralized and decentralized botnets.
Given the widespread use of IoT technology, detection methods for IoT botnets should possess distributed detection capabilities and utilize computational resources effectively. Various devices should be able to parallelize detection within the maximum allowable range rather than relying solely on a single server to handle massive data detection.

3.2. Graph Convolutional Network

The traditional GCN consists of L graph convolutional layers, where each layer constructs embeddings for each node by aggregating the embeddings of its neighboring nodes in the previous layer:
X ( l + 1 ) = σ ( Z ( l + 1 ) )
Z ( l + 1 ) = A X ( l ) W ( l )
where X ( l ) R N × F 1 represents the l-th layer embeddings of all n nodes, X ( 0 ) = X , A is the normalized and regularized adjacency matrix, W ( l ) R F 1 × F ( l + 1 ) is the feature transformation matrix learned for downstream tasks, and  σ ( · ) is typically the ReLU activation function.
Semi-supervised node classification is a widely used application of GCN. In this application, the objective is to learn the weight matrices in Equation (1) by minimizing the loss function:
L = 1 | Y L | i Y L l o s s y i , z i ( L )
where Y L contains the labels of all labeled nodes, y i represents the true label of node i, and  z i ( L ) denotes the final predicted result for node i, which is the i-th row of matrix Z ( l ) . In practice, a cross-entropy loss is commonly used for node classification in multi-class or multi-label problems.

3.3. METIS Algorithm

Graph partitioning [47] is the process of evenly dividing a large graph into a series of subgraphs to facilitate distributed applications. Each subgraph is stored on a separate machine, allowing for parallel execution between subgraphs. If a current subgraph requires information from another subgraph, a communication overhead is incurred. The quality of graph partitioning directly impacts the storage cost on each machine and the communication cost between machines.
METIS [17] is a method for vertex partitioning, which is a type of graph partitioning. It assigns graph vertices to different subgraphs while maintaining the integrity of the connections between vertices in each subgraph. METIS is commonly used to achieve efficient and balanced graph partitioning in distributed systems. There are mature software packages available that can be directly used for this type of graph partitioning. In Cluster-GCN, we use this method for graph segmentation to lay the foundation for distributed botnet detection.

4. Proposed Method

In this section, we describe a new botnet community detection method, which is constructed by Cluster-GCN. Figure 5 illustrates the overall forward propagation process. It involves the following steps:
Step 1: Incorporate the initial embedding of nodes into the input model. Deploy network monitoring probes at specific locations to collect data traffic information from monitoring devices. Abstract the devices and traffic information as nodes and edges, respectively, constructing a graph representation of botnet traffic and performing data preprocessing.
Step 2: Employ graph partitioning algorithms to partition the graph. Use the METIS graph partitioning algorithm while generating a matrix to store the removed edges during the partitioning process. During this partitioning process, a matrix is generated to meticulously record the edges that are removed. This careful partitioning enables the handling of large-scale data by breaking it down into smaller pieces that can be more easily processed and analyzed.
Step 3: Each machine can independently train the segmented subgraphs. Prior to distribution, the server holds all the subgraphs and edge information. Start by randomly selecting a number, q. Combine every q subgraphs into one subgraph and distribute them to IoT devices for training. After completing one round of training, update the node embeddings in the server and select the next random integer.
Step 4: Restore the training results from each device into the large graph and perform botnet detection on the nodes.

4.1. Data Preprocessing

In general, a set of network flows from the datasets can be treated as graph data, as each of the network host IP addresses can be represented as a graph node, and network communication flows between each host can be represented as edges. Since the original dataset forms an unattributed graph where all nodes have the same label of 1, it is challenging to make predictions based solely on node features in the feature learning process. To comprehensively determine whether a node belongs to a botnet, it is necessary to consider the labels of the edges connecting the nodes.
As hackers can instruct all their controlled bot hosts in the botnet to simultaneously initiate continuous access to specific network targets at specific times [48], there is a significant difference in communication volume between benign nodes, malicious nodes, and benign nodes under attack. Hence, the labels of the edges connecting the nodes also exhibit substantial variations.
To address this, we preprocess the data to incorporate the edge labels as a new feature of each node. We calculate the sum of all edge labels connected to a node and divide it by the node’s degree. This normalized value serves as the new feature for the node. It is important to note that we do not want this new feature to be a learnable parameter, so we perform this preprocessing step to obtain the node’s updated feature.

4.2. Feature Learning

Define the communication graph of the botnet as G = ( V , A ) , where V is a set consisting of n nodes v 1 , v 2 , , v n . The adjacency matrix of the graph G is denoted by A R n × n , which is typically symmetric. In the matrix A R n × n , a i j = 1 represents the edge between nodes v i and v j , indicating direct communication between nodes v i and v j , while a value of 0 indicates no direct communication. The node degree matrix is represented by D = d i a g d 1 , d 2 , , d n , where d i = j = 1 n a i j . It is important to note that A and D S represent the fixed graph structure throughout the entire learning process.
We utilize the Cluster-GCN model [18] to learn the topology of the botnet network and the preprocessing technique to modify the embedding representations of nodes and perform end-to-end detection. The working principle of Cluster-GCN is as follows: we first use the METIS algorithm to process the large graph and partition it into a specified number of dense subgraphs. Then, we sample the node blocks that are related to the subgraph and restrict the neighborhood search within that subgraph. This simple and effective strategy significantly improves memory and computational efficiency while achieving comparable testing accuracy to previous algorithms.
To address the issue of low computational performance of IoT devices, we adopted a random multiple clustering approach proposed by Cluster-GCN to merge inter-cluster edges and reduce discrepancies between batches. Initially, we partitioned the graph into c clusters V 1 , V 2 , , V c , where c takes a relatively large value. When constructing batches B for SGD updates, instead of using just one cluster, we randomly selected q clusters, denoted as t 1 , , t q , and included their nodes { V t 1 V t q } in the batch. Additionally, the edges between the selected clusters { A i j | i , j t 1 , , t q } were also reintroduced. This recombination of edges between clusters minimized differences between batches. Experimental results demonstrated that using multiple clusters as a batch improved convergence. The final Cluster-GCN algorithm is presented in Algorithm 1.
Algorithm 1 Cluster-GCN
1:Input: Graph A, feature X, label Y
2:Output: Node representation X ¯
3:Partition graph nodes V into c clusters { V 1 , V 2 , , V m } by METIS, such that | V i |   =   k for i = 1 , 2 , , c
4:for each epoch t = 1 , 2 , , T  do
5:      Randomly choose q clusters, t 1 , t 2 , ⋯, t q from V without replacement;
6:      Form the subgraph G ¯ with nodes V ¯ = [ V t 1 , V t 2 , , V t q ] and links A V ¯ , V ¯ ;
7:      Compute g L A V , V ¯ (loss on the subgraph A V ¯ , V ¯ );
8:      Conduct Adam update using gradient estimator g
9:end for
10:Output  { W l } l = 1 L
In our approach, we utilize the METIS algorithm to partition n nodes into m groups, V = V 1 , V 2 , , V m . Let V i represent the nodes in the i-th group. Based on this, we obtain m subgraphs as follows:
G ˜ = G 1 , G 2 , , G m = V 1 , E 1 , V 2 , E 2 , , V m , E m
Each E i only consists of the links between nodes in V i . Similarly, after reorganizing the nodes, the adjacency matrix is also partitioned into m 2 sub-matrices:
A = A ¯ + Δ = A 11 A 1 m A m 1 A m m
and:
A ¯ = A 11 0 0 A m m
Δ = 0 A 1 m A m 1 0
where A i i represents the adjacency matrix corresponding to the subgraph G i = V i , E i , Δ denotes the interconnections between subgraphs, consisting of all off-diagonal blocks of matrix A, and A i j ( i j ) represents the links between subgraphs G i and G j . Similarly, we can partition the feature matrix X and training labels Y into subsets X 1 , X 2 , , X m and Y 1 , Y 2 , , Y m , respectively, based on the partition V 1 , V 2 , , V m , where X i and Y i are formed by the features and labels of nodes in subgraph V i , respectively.
The purpose of this partitioning is to leverage the limited computational resources of IoT devices by assigning different subgraphs to different distributed devices for training. Only one subgraph needs to be loaded into the GPU memory. As a result, the objective function for training GCN is also decomposed into different clusters. Let A ¯ represent the normalized version of A ¯ , and the final embedding matrix becomes:
Z ( L ) = A ¯ σ A ¯ σ σ A ¯ X W ( 0 ) W ( 1 ) W ( L 1 ) = A ¯ 11 σ A ¯ 11 σ σ A ¯ 11 X W ( 0 ) W ( 1 ) W ( L 1 ) A ¯ m m σ A ¯ m m σ σ A ¯ m m X W ( 0 ) W ( 1 ) W ( L 1 )
In Equation (5), due to the reorganization of the adjacency matrix A into the form A ¯ + Δ , where the original graph is partitioned into m clusters and inter-cluster edges, during the training phase, it is only necessary to compute the cross-entropy loss on the nodes selected within the clusters. The loss function can be decomposed into:
L A ¯ = t | V t | N L A t t ¯
L A ¯ t t = 1 | V t | i V t l o s s y i , z i ( L )
The method is then based on the decomposition form in (8)–(10). At each step, we sample a cluster V t and perform stochastic gradient descent (SGD) to update the weights based on the gradient of the loss function. This process only requires the subgraph A t t , the X t , Y t on the current batch, and the current model parameters W l l = 1 L . The implementation involves simple forward and backward propagation of matrix products, which is easier to implement compared to the neighborhood search procedure used in previous SGD-based training methods. Since each node in V t is only connected to nodes within its own subgraph, there is no need for each node to perform a neighborhood search outside of its own subgraph.
To avoid the potential impact on performance caused by the removal of certain links after graph partitioning and the issue of potential differences between the clustering distribution of METIS and the original dataset, we approximate the overall dataset distribution by using multiple random combinations.
The approach is as follows:
We begin by partitioning the graph into p clusters, denoted V 1 , V 2 , , V p , where p is relatively large. When creating a batch B for an SGD update, instead of considering a single cluster, we randomly select q clusters as a batch, represented as t 1 , t 2 , , t q , and include their nodes V t 1 V t q in the batch. Additionally, we reintroduce the links between the selected clusters to ensure connectivity.
A i j | i , j t 1 , , t q
By incorporating the between-cluster links and considering random combinations of clusters, we reintegrate the between-cluster connections and reduce the variance across batches. This approach helps to maintain the overall connectivity of the graph and ensures that the batches are representative of the original dataset distribution.

4.3. Feature Regeneration

Here we employed diagonal augmentation to enhance the training of deep Cluster-GCN. In the original GCN setting, each node aggregates the representations of its neighbors from the previous layer. However, this strategy may not be suitable in the context of deep GCNs, as it does not take into account the number of layers. Intuitively, nearby neighbors should contribute more than distant nodes. Diagonal augmentation refers to amplifying the diagonal part of the adjacency matrix A used in each GCN layer.
X l + 1 = σ A ˜ + λ d i a g ( A ˜ ) X ( l ) W ( l )
The experimental results of adopting the diagonal enhancement techniques are presented in Section 5.

5. Evaluation

In the Evaluation section, an evaluation of the proposed model is conducted, where the datasets utilized in our experiments are introduced, along with the experimental setup and the chosen parameters. The metrics employed for performance evaluation are detailed, and a comparison is made between the precision, accuracy, F1 score, recall rate, and average time consumption of GATv2, GraphSAGE, GCN, and our method. Moreover, the effects of varying the numbers of clusters and the sizes of layers on the performance of our proposed approach are discussed.

5.1. Dataset

In general, we can construct a network topology graph from a set of network flow data. In this graph, we represent the IP address of each network device as a node, and the network communication flows between network devices are constructed as edges in the graph. In formal terms, we can define the network topology graph as G = V , E , where graph G consists of a node set V and an edge set E. We can represent such a graph in the format of an adjacency matrix, where for a network topology graph with n nodes and network flows, it can be represented as A R n × n . If there exists network flow between network device i and network device j, then a i j = 1 .
We used three publicly available botnet network graph datasets: C2, P2P, and Chord. These botnet network graph datasets were generated using the original network flow data from CTU-13 [49]. The C2 and P2P botnet network traffic [39] was generated from real malicious software traffic samples, while the Chord botnet network traffic was generated from synthetic malicious software traffic. The dataset is formed by embedding a P2P botnet into real traffic. All the graphs in the datasets are a mixture of botnet nodes and botnet network topological patterns with background traffic collected in 2018 from the Center for Applied Internet Data Analysis (CAIDA). In the C2 and P2P datasets, each graph contains approximately 3000 botnet nodes, while in Chord, each graph contains 10,000 botnet nodes. All the graphs are attribute-less, meaning that the node attributes are vectors of all ones. The statistical information for the C2, P2P, and Chord datasets is presented in Table 1, Table 2 and Table 3.
Our experiments were conducted on a Linux server with two 2.1 GHz 16-core Intel(R) Xeon(R) processors and 256 GB memory and a Tesla A800 GPU. The proposed model was developed in Python using several deep learning packages, such as Sckit-learn, PyTorch Geometric, and PyTorch. For performing hyperparameter tuning, a grid search was performed to ensure the optimal settings were used. Our grid search values are given in Table 4.

5.2. Evaluation Metrics

We evaluate the performance of our models using accuracy, precision, recall, F1 score, and memory usage as the performance indicators in this paper. Accuracy measures the overall correctness in classifying both normal and abnormal nodes. Precision assesses the ability to correctly identify botnet nodes, while recall measures the ability to detect all botnet attacks. The F1 score is the harmonic mean of precision and recall, providing an overall measure of the effectiveness of the detection models.
These metrics are calculated using the following formulas:
A c c u r a c y = T P + T N T P + T N + F P + F N
P r e c i s i o n = T P T P + F P
R e c a l l = T P T P + F N
F 1 = 2 P r e c i s i o n × R e c a l l P r e c i s i o n + R e c a l l
In the context of flow classification, TP (True Positive) represents the number of flows correctly classified as positive (e.g., botnet attacks), TN (True Negative) represents the number of flows correctly classified as negative (e.g., normal traffic), FP (False Positive) refers to the number of flows incorrectly classified as positive, and FN (False Negative) represents the number of flows incorrectly classified as negative.

5.3. Effectiveness

We evaluated the performance of our proposed method on three datasets: C2, P2P, and Chord. The evaluation metrics include precision, accuracy, F1 score, and recall. Additionally, we also considered the average runtime as a reference for comparison with the performance of GATv2, GraphSAGE, and GCN.
The performance evaluation results are presented in Table 5. The performance evaluation results indicate that on the C2 dataset, GATv2, GraphSAGE, and our approach all demonstrate high precision, with all exceeding 99%. Among them, our approach achieves the highest precision of 99.66%, surpassing GraphSAGE by 0.1%. However, all three methods achieve an accuracy of over 99.95%. In comparison to precision, the difference in accuracy is approximately 1%. The trend of F1 score is similar to that of precision. While our approach does not reach the highest recall, the difference compared to the optimal solution is only around 0.04%. In terms of ave_time, our approach takes approximately 33% longer than GraphSAGE.
On the other two P2P datasets, the performance of precision, accuracy, and F1 score remains consistent with what was mentioned earlier. In terms of recall, GATv2 and our method each achieve the best results on one dataset. However, GraphSAGE, which performed best on the C2 dataset, only achieves a recall rate of 76.16% on the Chord dataset. Apart from this, the recall rate fluctuates minimally across all four datasets.
It is worth noting that our method achieves the minimum ave_time on the Chord dataset, but on the P2P datasets, GraphSAGE still outperforms it. We speculate that this may be related to the graph partitioning and storage method after METIS partitioning. In comparison, GraphSAGE performs fixed-neighbor sampling for each node in the graph, allowing it to efficiently capture local neighborhood information and reduce the training time. However, this sampling strategy is not conducive to distributed detection of botnets.
Overall, the performance evaluation results indicate that our approach achieves the best precision and F1 score across all datasets, reaching 99.71% and 99.74%, respectively. For the Chord dataset, our approach outperforms other methods in all three aspects, even achieving an average runtime as low as 125.67 s.
In addition, we compared the impact of clustering and non-clustering on the model, as shown in Figure 6. Under different numbers of model layers, the accuracy of clustering is higher than that of non-clustering. The impact of different cluster numbers on our approach was also assessed through 3-fold cross-validation, as shown in Table 6. We set the cluster numbers to 100 and 1000 during the METIS partitioning process and considered batch sizes of 10, 20, 25, and 5, 10, 20, 50, respectively. We separately discussed the influence of cluster numbers on the detection results when using batch sizes of 10 and 20, as well as the impact of different batch sizes on the detection results when the cluster numbers were the same.
In Table 6, when the batch size is 10, the precision is 0.086% higher with a cluster number of 1000 compared to 100. However, as the cluster number increases, for batch sizes of both 10 and 20, there is a certain degree of decrease in accuracy, F1 score, and recall.
When the cluster number is fixed, precision shows minimal fluctuations in both test groups. When the cluster number is 100, accuracy, F1 score, and recall exhibit an increasing trend with the increase in batch size, but the magnitude of improvement is not significant. When the cluster number is 1000, accuracy, F1 score, and recall reach their maximum values at a batch size of 50.
To summarize, it can be observed that as the cluster number increases, the predicted precision slightly improves, but the remaining metrics show more or less decline. When the cluster number is fixed, accuracy, F1 score, and recall all increase with the increase in batch size, showing a positive correlation with it.
In Table 7, we evaluated the performance impact of different numbers of layers on our approach. A total of seven different numbers of layers were tested, including 6, 7, 8, 9, 10, 12, and 16, and even when the number of layers reached 16, our approach was still able to effectively distinguish between malicious and non-malicious nodes.
Similar to Table 6, as the number of layers increases, we can observe in Table 7 that the precision increases from 0.04% to 0.29%, while the accuracy, F1 score, and recall decrease by 0.044%, 0.416%, and 1.176%, respectively. At the same time, the average time consumed per layer increased by 60.39%. Compared to the improvement in precision with an increase in the number of layers, the impact on accuracy, F1 score, recall, and time consumption becomes more prominent.
To enhance the propagation of information from neighboring nodes and avoid gradient explosion, we utilize diagonal enhancement to process the embedding representation of each layer. As shown in Figure 7, the comparison between diagonal enhancement and JumpingKnowledge in different layers shows that when the number of layers is six, the accuracy of the former is higher than that of the latter in the three datasets.
Based on the above findings, when the number of layers of the graph convolution network is six, the proposed model has strong generalization ability. We can determine that the proposed model’s optimal number of model layers in the three datasets is six.
The loss curves of the model on both the training and validation sets are plotted in Figure 8. It can be observed that the losses on both sets showed a steady downward trend as the number of training epochs increased. It is worth noting that a very small difference between the losses on the training and validation sets was observed, indicating that the designed Cluster-GCN model performs well on the dataset without showing significant signs of overfitting.

6. Discussion

6.1. Botnet Topology

In this section, we use GNNExplainer [53], a method that can interpret graph neural network models, to interpret and analyze the detection results of the proposed model. GNNExplainer’s main goal is to maximize the mutual information (MI) between the distribution of feasible subgraphs and the prediction of a graph neural network. Its optimization objective aims to identify a subgraph G S G along with associated features X S = x j | v j G S that are pertinent for explaining a target prediction through the mutual information measure MI, where H is an entropy term. Mathematically:
max G S MI Y , ( G S , X S ) = H ( Y ) H Y G = G S , X = X S
GNNExplainer emphasizes the critical subgraph structures and node-level features that significantly impact detection. By analyzing the detection results using the proposed model, GNNExplainer effectively determines the network flow path of botnet nodes.
Figure 9 shows the interpretable results of P2P botnet graph nodes with normal/robot nodes, where the orange nodes are nodes that GNNExplainer considers more important for the model to predict this subgraph and the blue nodes represent nodes with less help in identifying the botnet.
According to the formula (17) above, GNNExplainer finds the above orange nodes to have an essential influence on the subgraph by maximizing the mutual information objective function between the graph neural network prediction and the distribution of feasible subgraphs. Their positions in the overall graph structure and node characteristics play a more critical role than other nodes in the model’s prediction of the entire subgraph. Intuitively, we find that the degree of these nodes is higher than that of other nodes, and they are usually in the core position of the whole network topology structure diagram. Therefore, nodes in critical positions in the network topology diagram (such as nodes with more connections) are significant for discovering botnets. This is because they can pass information between multiple sparsely connected neighborhoods with a large number of nodes along with GNN messaging.
The information obtained from GNNExplainer clarifies how learned node features and node connections contribute to the comprehension of suspected bot behavior. This explainable method effectively communicates the significance of corresponding nodes and edges in influencing the final detection result by learning and providing node features and edge masks. Specifically, GNNExplainer highlights highly correlated hosts and network flows by identifying nearby nodes that substantially contribute to detection results.
The explanation results from GNNExplainer indicate that, in identifying critical nodes within botnets, special attention should be given to those nodes situated at key positions within the network topology. In real-world networks, nodes of botnets are often distributed across different autonomous systems (AS). It is noteworthy that communication within each autonomous system tends to be relatively frequent, whereas communication between autonomous systems is usually sparse. However, the presence of botnets leads to an increase in communication behaviors between autonomous systems. Hence, the findings from GNNExplainer suggest that identifying key nodes in botnets should focus on those located in sparsely connected neighborhoods with a significant number of nodes across multiple autonomous systems. These nodes may play crucial roles in information transmission, as they are capable of conveying messages between different autonomous systems, thereby playing a pivotal role in the network. Therefore, through the explanations provided by GNNExplainer, we can more accurately identify and understand the topological structure of botnets, offering vital references for network security analysis and maintenance.

6.2. Threats to Validity

Internal Validity: Our experiments employed controlled variables and cross-validation to ensure the validity of the experimental results. However, the graph datasets we used may have introduced some unexpected topological noise, affecting the effectiveness of model training. Further efforts are needed to gradually examine the quality attributes of the data. Although the experimental results indicate that our model is effective, more work is needed to understand what types of nodes the model struggles to distinguish.
External Validity: The graph datasets we used are attribute-free graphs, so our model is based on specific botnet topologies for botnet detection. Therefore, the trained model can be generalized to botnet detection in real-world scenarios with similar topological structures. However, the model may fail to detect specific botnet topologies that are not present in the training dataset.

7. Conclusions

This work introduces a new approach to enhance botnet detection in distributed IoT environments. By utilizing clustered graph convolutional networks, our method effectively identifies botnet communities within large-scale IoT networks. This is achieved through innovative data preprocessing and graph partitioning technology, which facilitates distributed training. Our experimental results demonstrate that the proposed method not only significantly improves calculation accuracy and computing resource utilization but also showcases its feasibility for practical application. This underscores the method’s potential in safeguarding IoT deployments against cyber threats, thereby contributing novel insights to the realm of distributed IoT botnet detection and advancing the field of IoT security. The implementation of the proposed model lays a solid foundation for future research in this area and highlights its importance in enhancing the security of IoT networks and the detection of botnets. Looking ahead, we plan to deploy the model across more real-world scenarios. This expansion is crucial for bolstering the security of IoT networks and for the broader identification and understanding of botnets. However, it is important to note that our analysis, at this stage, is limited to three specific botnet datasets: C2, Chord, and P2P. Currently, the model has not been generalized to encompass a wider variety of botnet datasets. Additionally, the botnets in our dataset predominantly fall into the C2 or P2P categories, whereas real-world scenarios may involve hybrid botnets that combine different operational tactics. Given these considerations, further work is essential to validate the model’s performance in more diverse and complex real-world scenarios. This will involve not only expanding the variety of botnet datasets analyzed but also refining the model to effectively detect and mitigate hybrid botnet threats. Such advancements are of great significance for improving the security of IoT networks and for the ongoing development of robust, scalable solutions capable of combating the evolving landscape of cyber threats.

Author Contributions

Conceptualization, K.Q., L.Y. and X.L.; methodology, K.Q., X.L. and L.Y.; software, K.Q. and H.Y.; validation, H.Y., R.L. and K.Q.; formal analysis, H.Y. and K.Q.; investigation, W.C. and R.L.; resources, L.Y. and X.L.; data curation, H.Y.; writing—original draft preparation, K.Q.; writing—review and editing, W.C. and X.L.; visualization, H.Y.; supervision, L.Y.; project administration, X.L.; funding acquisition, L.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This work is in part supported by the National Key R&D Program of China (No. 2022YFB3104100), the National Science Foundation of China (No. 62102109), and the Major Key Project of PCL (No. PCL2021A09, PCL2021A02, PCL2022A03).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Publicly available datasets were analyzed in this study. Three datasets were used in this paper: P2P, C2, and Chord. For these datasets, please visit https://zenodo.org/records/3689089 (accessed on 30 December 2023).

Conflicts of Interest

Author Kexiang Qian was employed by the company State Grid Smart Grid Research Institute Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Shahzad, A.; Kim, Y.-G.; Elgamoudi, A. Secure IoT Platform for Industrial Control Systems. In Proceedings of the 2017 International Conference on Platform Technology and Service (PlatCon), Busan, Republic of Korea, 20–22 February 2017; pp. 1–6. [Google Scholar]
  2. Truong, H.T.; Ta, B.P.; Le, Q.A.; Nguyen, D.M.; Le, C.T.; Nguyen, H.X.; Do, H.T.; Nguyen, H.T.; Tran, K.P. Light-weight federated learning-based anomaly detection for time-series data in industrial control systems. Comput. Ind. 2022, 140, 103692. [Google Scholar] [CrossRef]
  3. Dhanaraju, M.; Chenniappan, P.; Ramalingam, K.; Pazhanivelan, S.; Kaliaperumal, R. Smart farming: Internet of things (IoT)-based sustainable agriculture. Agriculture 2022, 12, 1745. [Google Scholar] [CrossRef]
  4. Tran-Dang, H.; Krommenacker, N.; Charpentier, P.; Kim, D.-S. The internet of things for logistics: Perspectives, application review, and challenges. IETE Tech. Rev. 2022, 39, 93–121. [Google Scholar] [CrossRef]
  5. Hammad, M.; Abd El-Latif, A.A.; Hussain, A.; Abd El-Samie, F.E.; Gupta, B.B.; Ugail, H.; Sedik, A. Deep learning models for arrhythmia detection in IoT healthcare applications. Comput. Electr. Eng. 2022, 100, 108011. [Google Scholar] [CrossRef]
  6. Dogra, A.K.; Kaur, J. Moving towards smart transportation with machine learning and internet of things (IoT): A review. J. Smart Environ. Green Comput. 2022, 2, 3–18. [Google Scholar] [CrossRef]
  7. Geetha, B.; Kumar, P.S.; Bama, B.S.; Neelakandan, S.; Dutta, C.; Babu, D.V. Green energy aware and cluster based communication for future load prediction in IoT. Sustain. Energy Technol. Assess. 2022, 52, 102244. [Google Scholar] [CrossRef]
  8. Saha, A.; Roy, M.; Chowdhury, C. IoT-based human activity recognition for smart living. In IoT Enabled Computer-Aided Systems for Smart Buildings; Springer: Cham, Switzerland, 2023; pp. 91–119. [Google Scholar]
  9. Burhan, M.; Alam, H.; Arsalan, A.; Rehman, R.A.; Anwar, M.; Faheem, M.; Ashraf, M.W. A Comprehensive Survey on the Cooperation of Fog Computing Paradigm-Based IoT Applications: Layered Architecture, Real-Time Security Issues, and Solutions. IEEE Access 2023, 11, 73303–73329. [Google Scholar] [CrossRef]
  10. NOKIA. Threat Intelligence Report 2023. Available online: https://www.nokia.com/networks/security-portfolio/threat-intelligence-report/ (accessed on 30 December 2023).
  11. Antonakakis, M.; April, T.; Bailey, M.; Bernhard, M.; Bursztein, E.; Cochran, J.; Durumeric, Z.; Halderman, J.A.; Invernizzi, L.; Kallitsis, M. Understanding the Mirai Botnet. In Proceedings of the 26th USENIX Security Symposium (USENIX Security 17), Vancouver, BC, Canada, 16–18 August 2017; pp. 1093–1110. [Google Scholar]
  12. Lange, T.; Kettani, H. On Security Threats of Botnets to Cyber Systems. In Proceedings of the 2019 6th International Conference on Signal Processing and Integrated Networks (SPIN), Noida, India, 7–8 March 2019; pp. 176–183. [Google Scholar]
  13. Beigi, E.B.; Jazi, H.H.; Stakhanova, N.; Ghorbani, A.A. Towards Effective Feature Selection in Machine Learning-Based Botnet Detection Approaches. In Proceedings of the 2014 IEEE Conference on Communications and Network Security, San Francisco, CA, USA, 29–31 October 2014; pp. 247–255. [Google Scholar]
  14. Zhang, B.; Li, J.; Chen, C.; Lee, K.; Lee, I. A Practical Botnet Traffic Detection System Using GNN. In Proceedings of the 13th International Symposium on Cyberspace Safety and Security (CSS 2021), Virtual Event, 9–11 November 2021; pp. 66–78. [Google Scholar]
  15. Zhu, X.; Zhang, Y.; Zhang, Z.; Guo, D.; Li, Q.; Li, Z. Interpretability Evaluation of Botnet Detection Model Based on Graph Neural Network. In Proceedings of the IEEE INFOCOM 2022—IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS), New York, NY, USA, 2–5 May 2022; pp. 1–6. [Google Scholar]
  16. Carpenter, J.; Layne, J.; Serra, E.; Cuzzocrea, A. Detecting Botnet Nodes via Structural Node Representation Learning. In Proceedings of the 2021 IEEE International Conference on Big Data (Big Data), Orlando, FL, USA, 15–18 December 2021; pp. 5357–5364. [Google Scholar]
  17. Karypis, G.; Kumar, V. A Fast and High Quality Multilevel Scheme for Partitioning Irregular Graphs. SIAM J. Sci. Comput. 1998, 20, 359–392. [Google Scholar] [CrossRef]
  18. Chiang, W.-L.; Liu, X.; Si, S.; Li, Y.; Bengio, S.; Hsieh, C.-J. Cluster-GCN: An Efficient Algorithm for Training Deep and Large Graph Convolutional Networks. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Anchorage, AK, USA, 4–8 August 2019; pp. 257–266. [Google Scholar]
  19. Shinan, K.; Alsubhi, K.; Alzahrani, A.; Ashraf, M.U. Machine learning-based botnet detection in software-defined network: A systematic review. Symmetry 2021, 13, 866. [Google Scholar] [CrossRef]
  20. Mirmozaffari, M.; Yazdani, M.; Boskabadi, A.; Ahady Dolatsara, H.; Kabirifar, K.; Amiri Golilarz, N. A novel machine learning approach combined with optimization models for eco-efficiency evaluation. Appl. Sci. 2020, 10, 5210. [Google Scholar] [CrossRef]
  21. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
  22. Cortes, C.; Vapnik, V. Support-vector networks. Mach. Learn. 1996, 20, 273–297. [Google Scholar] [CrossRef]
  23. Hartigan, J.A.; Wong, M.A. Algorithm AS 136: A K-means Clustering Algorithm. J. R. Stat. Soc. Ser. C 1979, 28, 100–108. [Google Scholar] [CrossRef]
  24. Le, T.T.; Oktian, Y.E.; Kim, H. XGBoost for imbalanced multiclass classification-based industrial internet of things intrusion detection systems. Sustainability 2022, 14, 8707. [Google Scholar] [CrossRef]
  25. Choi, H.; Lee, H.; Lee, H.; Kim, H. Botnet Detection by Monitoring Group Activities in DNS Traffic. In Proceedings of the 7th IEEE International Conference on Computer and Information Technology (CIT 2007), Aizu-Wakamatsu, Japan, 16–19 October 2007; pp. 715–720. [Google Scholar]
  26. Gu, G.; Porras, P.A.; Yegneswaran, V.; Fong, M.W.; Lee, W. Bothunter: Detecting Malware Infection Through IDS-Driven Dialog Correlation. In Proceedings of the USENIX Security Symposium, Boston, MA, USA, 6–10 August 2007; Volume 7, pp. 1–16. [Google Scholar]
  27. Gu, G.; Zhang, J.; Lee, W. BotSniffer: Detecting Botnet Command and Control Channels in Network Traffic. In Proceedings of the 15th Annual Network and Distributed System Security Symposium, San Diego, CA, USA, 10–13 February 2008. [Google Scholar]
  28. Gu, G.; Perdisci, R.; Zhang, J.; Lee, W. Botminer: Clustering Analysis of Network Traffic for Protocol- and Structure-Independent Botnet Detection. In Proceedings of the USENIX Security Symposium, San Jose, CA, USA, 28 July–1 August 2008. [Google Scholar]
  29. Azab, A.; Alazab, M.; Aiash, M. Machine Learning Based Botnet Identification Traffic. In Proceedings of the 2016 IEEE Trustcom BigDataSE ISPA, Tianjin, China, 23–26 August 2016; pp. 1788–1794. [Google Scholar]
  30. LeCun, Y.; Bengio, Y.; Hinton, G. Deep Learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef]
  31. Bibi, M.; Hussain Qaisar, Z.; Aslam, N.; Faheem, M.; Akhtar, P. TL-PBot: Twitter bot profile detection using transfer learning based on DNN model. Eng. Rep. 2024, e12838. [Google Scholar] [CrossRef]
  32. Luqman, M.; Faheem, M.; Ramay, W.Y.; Saeed, M.K.; Ahmad, M.B. Utilizing Ensemble Learning for Detecting Multi-Modal Fake News. IEEE Access 2024, 12, 15037–15049. [Google Scholar] [CrossRef]
  33. McDermott, C.D.; Majdani, F.; Petrovski, A.V. Botnet detection in the internet of things using deep learning approaches. In Proceedings of the 2018 International Joint Conference on Neural Networks (IJCNN), Rio de Janeiro, Brazil, 8–13 July 2018; pp. 1–8. [Google Scholar]
  34. Popoola, S.I.; Adebisi, B.; Hammoudeh, M.; Gui, G.; Gacanin, H. Hybrid Deep Learning for Botnet Attack Detection in the Internet-of-Things Networks. IEEE Internet Things J. 2020, 8, 4944–4956. [Google Scholar] [CrossRef]
  35. Homayoun, S.; Ahmadzadeh, M.; Hashemi, S.; Dehghantanha, A.; Khayami, R. Botshark: A Deep Learning Approach for Botnet Traffic Detection. In Cyber Threat Intelligence; Springer: Cham, Switzerland, 2018; pp. 137–153. [Google Scholar]
  36. Luo, F.; Du, B.; Zhang, L.; Zhang, L.; Tao, D. Feature Learning Using Spatial-Spectral Hypergraph Discriminant Analysis for Hyperspectral Image. IEEE Trans. Cybern. 2018, 49, 2406–2419. [Google Scholar] [CrossRef]
  37. Peng, J.; Sun, W.; Du, Q. Self-paced Joint Sparse Representation for the Classification of Hyperspectral Images. IEEE Trans. Geosci. Remote Sens. 2018, 57, 1183–1194. [Google Scholar] [CrossRef]
  38. Wu, Z.; Pan, S.; Chen, F.; Long, G.; Zhang, C.; Philip, S.Y. A Comprehensive Survey on Graph Neural Networks. IEEE Trans. Neural Netw. Learn. Syst. 2020, 32, 4–24. [Google Scholar] [CrossRef]
  39. Zhou, J.; Xu, Z.; Rush, A.M.; Yu, M. Automating botnet detection with graph neural networks. arXiv 2020, arXiv:2006.06344. [Google Scholar]
  40. Chowdhury, S.; Khanzadeh, M.; Akula, R.; Zhang, F.; Zhang, S.; Medal, H.; Marufuzzaman, M.; Bian, L. Botnet Detection Using Graph-Based Feature Clustering. J. Big Data 2017, 4, 14. [Google Scholar] [CrossRef]
  41. Nguyen, H.-T.; Ngo, Q.-D.; Le, V.-H. A Novel Graph-Based Approach for IoT Botnet Detection. Int. J. Inf. Secur. 2020, 19, 567–577. [Google Scholar] [CrossRef]
  42. Wang, W.; Shang, Y.; He, Y.; Li, Y.; Liu, J. Botmark: Automated Botnet Detection with Hybrid Analysis of Flow-Based and Graph-Based Traffic Behaviors. Inf. Sci. 2020, 511, 284–296. [Google Scholar] [CrossRef]
  43. Lo, W.W.; Kulatilleke, G.; Sarhan, M.; Layeghy, S.; Portmann, M. XG-Bot: An Explainable Deep Graph Neural Network for Botnet Detection and Forensics. Internet Things 2023, 22, 100747. [Google Scholar] [CrossRef]
  44. Zhao, J.; Liu, X.; Yan, Q.; Li, B.; Shao, M.; Peng, H. Multi-Attributed Heterogeneous Graph Convolutional Network for Bot Detection. Inf. Sci. 2020, 537, 380–393. [Google Scholar] [CrossRef]
  45. Nguyen, H.-T.; Ngo, Q.-D.; Nguyen, D.-H.; Le, V.-H. Psi-Rooted Subgraph: A Novel Feature for IoT Botnet Detection Using Classifier Algorithms. ICT Express 2020, 6, 128–138. [Google Scholar] [CrossRef]
  46. 360Netlab. Pink, a Botnet That Competed with the Vendor to Control the Massive Infected Devices. 2021. Available online: https://blog.netlab.360.com/pink-en/(accessed on 30 December 2023).
  47. Bichot, C.-E.; Siarry, P. Graph Partitioning; John Wiley & Sons: Hoboken, NJ, USA, 2013. [Google Scholar]
  48. Xunwei, H. What Is a Botnet? 2023. Available online: https://info.support.huawei.com/info-finder/encyclopedia/en/Botnet.html (accessed on 30 December 2023).
  49. Garcia, S.; Grill, M.; Stiborek, J.; Zunino, A. An Empirical Comparison of Botnet Detection Methods. Comput. Secur. 2014, 45, 100–123. [Google Scholar] [CrossRef]
  50. Brody, S.; Alon, U.; Yahav, E. How attentive are graph attention networks? arXiv 2021, arXiv:2105.14491. [Google Scholar]
  51. Hamilton, W.; Ying, Z.; Leskovec, J. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems; Neural Information Processing Systems Foundation, Inc.: La Jolla, CA, USA, 2017; Volume 30. [Google Scholar]
  52. Kipf, T.N.; Welling, M. Semi-supervised classification with graph convolutional networks. arXiv 2016, arXiv:1609.02907. [Google Scholar]
  53. Ying, Z.; Bourgeois, D.; You, J.; Zitnik, M.; Leskovec, J. GNNExplainer: Generating explanations for graph neural networks. In Advances in Neural Information Processing Systems; Neural Information Processing Systems Foundation, Inc.: La Jolla, CA, USA, 2019; Volume 32. [Google Scholar]
Figure 1. Framework of botnet attack activity.
Figure 1. Framework of botnet attack activity.
Applsci 14 01615 g001
Figure 2. Centralized botnet.
Figure 2. Centralized botnet.
Applsci 14 01615 g002
Figure 3. Decentralized botnet.
Figure 3. Decentralized botnet.
Applsci 14 01615 g003
Figure 4. Hybrid botnet.
Figure 4. Hybrid botnet.
Applsci 14 01615 g004
Figure 5. Overview of our method.
Figure 5. Overview of our method.
Applsci 14 01615 g005
Figure 6. Comparison of cluster and non-cluster methods on the C2 dataset.
Figure 6. Comparison of cluster and non-cluster methods on the C2 dataset.
Applsci 14 01615 g006
Figure 7. Comparison of accuracy of different feature enhancement methods with different numbers of model layers in three datasets.
Figure 7. Comparison of accuracy of different feature enhancement methods with different numbers of model layers in three datasets.
Applsci 14 01615 g007
Figure 8. The loss curve of the model on the training set and the validation set of the P2P dataset.
Figure 8. The loss curve of the model on the training set and the validation set of the P2P dataset.
Applsci 14 01615 g008
Figure 9. Botnet topology, where orange nodes represent the critical nodes.
Figure 9. Botnet topology, where orange nodes represent the critical nodes.
Applsci 14 01615 g009
Table 1. Botnet dataset statistics for C2.
Table 1. Botnet dataset statistics for C2.
Data SplitGraphsAvg NodesAvg EdgesAvg Botnet Nodes
Train768143,895813,2373211
Val96143,763812,9553234
Test96144,051814,0033175
Table 2. Botnet dataset statistics for P2P.
Table 2. Botnet dataset statistics for P2P.
Data SplitGraphsAvg NodesAvg EdgesAvg Botnet Nodes
Train768143,895162,32173090
Val96143,763162,26203093
Test96144,0511,624,9483095
Table 3. Botnet dataset statistics for Chord.
Table 3. Botnet dataset statistics for Chord.
Data SplitGraphsAvg NodesAvg EdgesAvg Botnet Nodes
Train768143,895150,274810,000
Val96143,763150,228410,000
Test96144,051150,431010,000
Table 4. Hyperparameter values used in our approach.
Table 4. Hyperparameter values used in our approach.
HyperparameterValues
Layers[3, 4, 5, 6, 7, 8, 9, 10, 12, 16]
Hidden Channels128
Clusters[100, 1000]
Batch Size[5, 10, 20, 25, 50]
Learning Rate 1 × 10 3
Weight Decay 5 × 10 4
Activation FunctionReLU
OptimizerAdam
Table 5. Comparisons of evaluations on different datasets.
Table 5. Comparisons of evaluations on different datasets.
MethodDatasetPrecisionAccuracyF1 ScoreRecallAvg_Time (s)
GATv2 [50]C20.99040.999500.99420.9982310.50
P2P0.99200.999650.99590.9998310.25
Chord0.95760.992390.97150.9864287.40
GraphSAGE [51]C20.99560.999750.99710.9987133.00
P2P0.99630.999710.99660.9970147.33
Chord0.98280.966910.83480.7616152.00
GCN [52]C20.97640.998750.98570.9956152.00
P2P0.98270.999060.98900.9955150.75
Chord0.98780.997890.99190.9961152.38
Our ApproachC20.99660.999780.99740.9983177.42
P2P0.99710.999290.99730.9983176.58
Chord0.99700.999770.99740.9978125.67
Table 6. Effect of different cluster numbers on our approach.
Table 6. Effect of different cluster numbers on our approach.
Number of ClustersBatch SizePrecisionAccuracyF1 ScoreRecall
100100.996830.99970.996710.99659
200.996940.99970.996730.99664
250.997680.999810.997940.99821
100050.997770.999160.990390.98326
100.997690.999490.994110.99063
200.997780.999590.995480.99322
500.997260.999650.996070.99491
Table 7. Effect of different layer numbers on our approach.
Table 7. Effect of different layer numbers on our approach.
Number of LayersPrecisionAccuracyF1 ScoreRecallAvg_Time(s)
60.997290.999800.997600.99792157.43
70.996000.999760.997170.99836166.65
80.998290.999720.996800.99532175.64
90.998190.999610.995500.99284183.40
100.998500.999540.994600.99077194.00
120.998460.999630.995740.99305216.40
160.998900.999360.992440.98616252.50
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Qian, K.; Yang, H.; Li, R.; Chen, W.; Luo, X.; Yin, L. Distributed Detection of Large-Scale Internet of Things Botnets Based on Graph Partitioning. Appl. Sci. 2024, 14, 1615. https://doi.org/10.3390/app14041615

AMA Style

Qian K, Yang H, Li R, Chen W, Luo X, Yin L. Distributed Detection of Large-Scale Internet of Things Botnets Based on Graph Partitioning. Applied Sciences. 2024; 14(4):1615. https://doi.org/10.3390/app14041615

Chicago/Turabian Style

Qian, Kexiang, Hongyu Yang, Ruyu Li, Weizhe Chen, Xi Luo, and Lihua Yin. 2024. "Distributed Detection of Large-Scale Internet of Things Botnets Based on Graph Partitioning" Applied Sciences 14, no. 4: 1615. https://doi.org/10.3390/app14041615

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop