Research Article Open Access

LSTM-Based AI Model for Sinkhole Attack Detection With Legal Basis in an Ecuadorian Public Institution

Estefanía Alejandra Mora Parra1, Rubén Nogales Portero1, Moisés Toapanta T.2, Estefanía Monge Martínez2, Santiago Vayas Castro2, Jeanette Elizabeth Jordán Buenaño2, Juan Escobar Naranjo1, Diego Gustavo Andrade Armas3 and Rodrigo Del Pozo Durango4
  • 1 Carrera Ingeniería en Sistemas, Electrónica e Industrial, Universidad Técnica de Ambato, Av. Chasquis, Ambato, Ecuador
  • 2 Carrera de Derecho, Universidad Técnica de Ambato, Av. Chasquis, Ambato, Ecuador
  • 3 Subsistema de Posgrados, U Centro de Estudios de Seguridad (CESEG), Universidad de Santiago de Compostela (USC), Av. Doctor Ángel Echeverri s/n, Compostela, Spain
  • 4 Carrera de Software y Tecnologías de la Información, Universidad Estatal de Bolívar, Av. Ernesto Che Guevara s/n y Av. Gabriel Secaira, Guaranda, Ecuador

Abstract

Wireless Sensor Networks (WSN) are an essential component of the Internet of Things (IoT). However, their decentralized nature, data transmission over unencrypted channels, and the physical exposure of nodes make them especially vulnerable to attacks, among which the sinkhole attack stands out. This research aims to develop a machine learning–based model to detect sinkhole‐type attacks in wireless sensor networks, with the purpose of strengthening the security and resilience of a public institution. The deductive method was used to analyze the legal framework and technical background, and the experimental method was used for the design and evaluation of the detection model. The results obtained include an LSTM model trained on data from a network simulation conducted in Contiki with the Cooja simulator. The model achieved 98 accuracy, 96 precision, 97 recall, and a 96% F1‐score. It was concluded that this neural network based model offers a promising solution to enhance WSN security in IoT environments.

Journal of Computer Science
Volume 22 No. 3, 2026, 766-777

DOI: https://doi.org/10.3844/jcssp.2026.766.777

Submitted On: 30 July 2025 Published On: 4 March 2026

How to Cite: Parra, E. A. M., Portero, R. N., T., M. T., Martínez, E. M., Castro, S. V., Buenaño, J. E. J., Naranjo, J. E., Armas, D. G. A. & Durango, R. D. P. (2026). LSTM-Based AI Model for Sinkhole Attack Detection With Legal Basis in an Ecuadorian Public Institution. Journal of Computer Science, 22(3), 766-777. https://doi.org/10.3844/jcssp.2026.766.777

  • 52 Views
  • 11 Downloads
  • 0 Citations

Download

Keywords

  • Sinkhole Attack
  • Legal Basis
  • Machine Learning
  • WSN
  • Public Institution