@article {10.3844/jcssp.2026.766.777, article_type = {journal}, title = {LSTM-Based AI Model for Sinkhole Attack Detection With Legal Basis in an Ecuadorian Public Institution}, author = {Parra, Estefanía Alejandra Mora and Portero, Rubén Nogales and T., Moisés Toapanta and Martínez, Estefanía Monge and Castro, Santiago Vayas and Buenaño, Jeanette Elizabeth Jordán and Naranjo, Juan Escobar and Armas, Diego Gustavo Andrade and Durango, Rodrigo Del Pozo}, volume = {22}, number = {3}, year = {2026}, month = {Mar}, pages = {766-777}, doi = {10.3844/jcssp.2026.766.777}, url = {https://thescipub.com/abstract/jcssp.2026.766.777}, 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 = {Journal of Computer Science}, publisher = {Science Publications} }