Black Hole Attack Detection in Wireless Sensor Networks Using Hybrid Optimization Algorithm


  • Dlsoz Abdalkarim Rashid Department of Computer Science, College of Science, University of Sulaimani, Sulaimani, Iraq
  • Marwan B. Mohammed Department of Computer Science, College of Science, University of Al-Nahran, Baghdad, Iraq



Whale Optimization Algorithm, Sine and Cosine Algorithm, Black Hole Attack, Wireless Sensor Networks, Meta-Heuristic


One of the types of denial of service attacks that target wireless sensor networks (WSNs) are black hole (BH) attacks, which are widely targeted at this form of network today. In this attack, data are blocked in the network, malware is installed on a group of nodes in the network, and ultimately, the data packet is blocked before reaching its destination. In other words, data cannot be transmitted in the vicinity of BH nodes. Because of the nature of WSNs that are readily available, these networks cannot be optimized without compromising energy consumption, and this problem becomes a non-deterministic polynomial-time hard problem. Despite some models that have been presented to resolve this issue, most of them have not had sufficient performance in dealing with BH attacks. Thus, we have presented a new and powerful model based on the hybrid meta-heuristic algorithm depending on the sine and cosine algorithm (SCA) and the whale optimization algorithm (WOA). This algorithm has been combined in such a way that the increase in computational load has been prevented, in addition, two algorithms are included in one algorithm in this case, using the positive features of these two algorithms, it escapes from the local optimal trap in the solution of the algorithm and also benefits from a very good convergence. Because the new production solutions have a good diversity and the intensification component also has a good performance the main goal of this article is to present a new type of robust optimization algorithm for BH detection in WSN. This model has been tested and evaluated using a network and compared with three other meta-heuristic algorithms to make a fair comparison. The results obtained from the proposed model indicate a high-quality performance of this model in detecting BH attacks. The proposed model can detect more than 85% of the BH nodes and the total warning rate in the proposed model is equal to 0.866.


S. Ali, M. A. Khan, J. Ahmad, A. W. Malik and A. U. Rehman. “Detection and Prevention of Black Hole Attacks in IOT and WSN. In: 2018 Third International Conference on Fog and Mobile Edge Computing (FMEC)”. IEEE, United States, 2018.

M. V. Pawar and J. Anuradha. “Detection and prevention of black-hole and wormhole attacks in wireless sensor network using optimized LSTM”. International Journal of Pervasive Computing and Communications, vol. 19, no. 1, pp. 124-153, 2023.

M. Shinde and D. Mehetre. “Black Hole and Selective Forwarding Attack Detection and Prevention in WSN. In: 2017 International Conference on Computing, Communication, Control and Automation (ICCUBEA)”. IEEE, United States, 2017.

D. C. Mehetre, S. E. Roslin and S. J. Wagh. “Detection and prevention of black hole and selective forwarding attack in clustered WSN with active trust”. Cluster Computing, vol. 22, pp. 1313-1328, 2019.

J. Kolangiappan. “A novel framework for the prevention of black-hole in wireless sensors using hybrid convolution network”. Scientific and Technical Journal of Information Technologies Mechanics and Optics, vol. 22, no, 2, pp. 317-323, 2022.

M. H. Shirvani and A. Akbarifar. “Anomaly-based detection of blackhole attacks in WSN and MANET utilizing quantum-metaheuristic algorithms”. Journal of Communication Engineering, vol. 9, no. 1, pp. 77-92, 2020.

B. K. Mishra, M. C. Nikam and P. Lakkadwala. “Security Against Black Hole Attack in Wireless Sensor Network-a Review. In: 2014 Fourth International Conference on Communication Systems and Network Technologies”. IEEE, United States, 2014.

M. Tripathi, M. S. Gaur and V. Laxmi. “Comparing the impact of black hole and gray hole attack on LEACH in WSN”. Procedia Computer Science, vol. 19, pp. 1101-1107, 2013.

M. Wazid, A. Katal, R. S. Sachan, R. H. Goudar and D. P. Singh. “Detection and Prevention Mechanism for Blackhole Attack in Wireless Sensor Network. In: 2013 International Conference on Communication and Signal Processing”. IEEE, United States, 2013.

I. Kaushik and N. Sharma. “Black hole attack and its security measure in wireless sensors networks. In: Handbook of Wireless Sensor Networks: Issues and Challenges in Current Scenario’s”. Springer, Germany, pp. 401-416, 2020.

A. Khare, R. Gupta and P. K. Shukla. Improving the Protection of Wireless Sensor Network Using a Black Hole Optimization Algorithm (BHOA) on Best Feasible Node Capture Attack. In: IoT and Analytics for Sensor Networks: Proceedings of ICWSNUCA 2021”. Springer, New York City, 2022

R. Saputra, J. Andika and M. “Alaydrus. Detection of Blackhole Attack in Wireless Sensor Network Using Enhanced Check Agent. In: 2020 Fifth International Conference on Informatics and Computing (ICIC)”. IEEE, United States, 2020.

D. M. Khan, T. Aslam, N. Akhtar, S. Qadri, N. A. Khan, I. M. Rabbani and M. Aslam. “Black hole attack prevention in mobile ad-hoc network (manet) using ant colony optimization technique”. Information Technology and Control, vol. 49, no, 3, pp. 308-319, 2020.

T. A. S. Srinivas and S. S. Manivannan. “Black hole and selective forwarding attack detection and prevention in IoT in health care sector: Hybrid meta-heuristic-based shortest path routing”. Journal of Ambient Intelligence and Smart Environments, vol. 13, no. 2, pp. 133-156, 2021.

M. V. Pawar and A. Jagadeesan. “Detection of blackhole and wormhole attacks in WSN enabled by optimal feature selection using self-adaptive multi-verse optimiser with deep learning”. International Journal of Communication Networks and Distributed Systems, vol. 26, no. 4, pp. 409-445, 2021.

P. Rani, S. Verma and G. N. Nguyen. “Mitigation of black hole and gray hole attack using swarm inspired algorithm with artificial neural network”. IEEE Access, vol. 8, pp. 121755-121764, 2020.

J. R. Pullagura and V. R. Dhulipalla. “Black‐hole attack and counter measure in ad hoc networks using traditional routing optimization”. Concurrency and Computation: Practice and Experience, vol. 35, no. 9, p. e7643, 2023.

J. L. Webber, A. Arafa, A. Mehbodniya, S. Karupusamy, B. Shah, A. K. Dahiya and B. Kanani. “An efficient intrusion detection framework for mitigating blackhole and sinkhole attacks in healthcare wireless sensor networks”. Computers and Electrical Engineering, vol. 111, p. 108964, 2023.

K. Cheena, T. Amgoth and G. Shankar. “Deep Learning- Based Black Hole Detection Model for WSN in Smart Grid. In: Computational Intelligence: Select Proceedings of InCITe 2022”. Springer, Germany, pp. 19-30, 2023.

S. Mirjalili. “SCA: A sine cosine algorithm for solving optimization problems”. Knowledge-Based Systems, vol. 96, pp. 120-133, 2016.

S. Mirjalili and A. Lewis. “The whale optimization algorithm”. Advances in Engineering Software, vol. 95, pp. 51-67, 2016.

S. Mirjalili, S. M. Mirjalili and A. Lewis. “Grey wolf optimizer”. Advances in Engineering Software, vol. 69, pp. 46-61, 2014.

B. Abdollahzadeh, F. S. Gharehchopogh and S. Mirjalili. “Artificial gorilla troops optimizer: A new nature‐inspired metaheuristic algorithm for global optimization problems”. International Journal of Intelligent Systems, vol. 36, no. 10, pp. 5887-5958, 2021.

J. Kennedy and R. Eberhart. “Particle Swarm Optimization. In: Proceedings of ICNN’95-International Conference on Neural Networks”. IEEE, United States, 1995.

M. Balachandran, S. Devanathan, R. Muraleekrishnan and S. S. Bhagawan. “Optimizing properties of nanoclay-nitrile rubber (NBR) composites using face centered central composite design”. Materials and Design, vol. 35, pp. 854-862, 2012.



How to Cite

Rashid, D. A., & Mohammed, M. B. (2024). Black Hole Attack Detection in Wireless Sensor Networks Using Hybrid Optimization Algorithm. UHD Journal of Science and Technology, 8(1), 142–150.