Black Hole Attack Detection Using K-Nearest Neighbor Algorithm and Reputation Calculation in Mobile Ad Hoc Networks
The characteristics of the mobile ad hoc network (MANET), such as no need for infrastructure, high speed in setting up the network, and no need for centralized management, have led to the increased popularity and application of this network in various fields. Security is one of the essential aspects of MANETs. Intrusion detection systems (IDSs) are one of the solutions used to ensure security in this network. Clustering-based IDSs are very popular in this network due to their features, such as proper scalability. This paper proposes a new algorithm in MANETs to detect black hole attack using the K-nearest neighbor (KNN) algorithm for clustering and fuzzy inference for selecting the cluster head. With the use of beta distribution and Josang mental logic, the trust of each node will be calculated. According to the reputation and remaining energy, fuzzy inference will select the cluster head. Finally, the trust server checks the destination node. If allowed, it notifies the cluster head; otherwise, it detects the node as a malicious node in the black hole attack in each cluster. The simulation results show that the proposed method has improved the packet loss rate, throughput, packet delivery ratio, total network delay, and normalized routing load parameters compared with recent black hole detection methods.