IoT Cyberattack Detection via Fog Computing and Multilayer Perceptron Neural Networks
Branly Alberto Martínez González, Malena Pérez Sevilla, Jaime Andres Rincon, Daniel Urda · 2025
This paper presents a novel methodology designed for detecting cyberattacks in Internet of Things (IoT) fog computing scenarios through the application of a Multilayer Perceptron (MLP) neural network trained and validated on custom-generated datasets. Network traffic was captured under strictly controlled conditions using resource-constrained edge devices, such as the Raspberry Pi 4 and Jetson Nano, ensuring realistic and representative IoT interactions. Traffic scenarios include typical benign activities such as automated web browsing and standard DNS lookups, as well as targeted Denial-of-Service (DoS) attacks designed to saturate device resources and disrupt normal operations. The captured data underwent structured processing and feature extraction using Zeek, an open-source network traffic analyzer aligned precisely with the established NF-ToN-IoT dataset feature set. The MLP model trained showed exceptional performance, achieving near-perfect metrics for Accuracy, Precision, Recall, and F1-score. To validate the robustness and generalization capabilities further, external evaluations were performed using datasets consisting exclusively of unseen malicious and benign network flows. These external validations confirmed the model's ability to accurately identify previously unencountered attack patterns and reliably distinguish benign interactions, under-scoring its effectiveness and practical viability for enhancing cybersecurity in IoT fog computing deployment.