A Lightweight NAS-Optimized Temporal Convolutional Network (TCN) for MQTT Brute-Force Detection in Resource-Constrained IoT Networks

mahmood mohammed mahmood

Abstract


It is worth pointing out that there is little inbuilt protection against brute force attacks on the authentication step in the MQTT protocol, which is widely used in IoT systems. According to published reports, accuracy is high; however, we are not aware of any reporting model size or latency and ones that test on independently collected data. We created a lightweight temporal convolutional network (TinyTCN) for window-based bidirectional flow record classification for a single host and reduced its size through architecture search with Optuna. For MQTT-IoT-IDS2020, we windowed the data at the host level (and for a single attacker, the file order), and rectified incorrectly classified non-MQTT traffic that MQTT-IoT-IDS2020 benchmarked as attacks. The number of parameters in the model was reduced from 13,729 to 1,129 by search. It requires 11.66 KB with 8-bit weight quantization, and processes 8 windows in 0.0123 ms, which is no different than the test performance (F1 = 1.00, AUC-ROC = 1.00 on test set; 5-fold F1 = 0.9995 ± 0.0012). Ablation demonstrated the importance of using multi-component features involving both connection volume and a single timing feature for decision making. A unidirectional (Uni-flow) variant further reduced the size of the model to 817 parameters, and its performance was good on all the folds of the cross-validation set, but one broker was misclassified in one fold.This model performed poorly when applied to MQTTset without retraining. The cross-dataset evaluation on MQTTset demonstrated that direct generalization is challenging, and that the detection performance is affected by the characteristics of network traffic.

Keywords


brute-force attack detection; cross-dataset generalization; data leakage; edge deployment; Internet of Things; MQTT; Neural Architecture Search; Temporal Convolutional Network

Full Text:

PDF

References


S. A. Wahab, S. Sultana, N. Tariq, M. Mujahid, J. A. Khan, and A. Mylonas, “A Multi-Class Intrusion Detection System for DDoS Attacks in IoT Networks using Deep Learning and Transformers,” Sensors, Vol. 25, No. 15, p. 4845, Aug. 2025, DOI: 10.3390/s25154845.

B. M. Mohammad El-Basioni, “A Conceptual Modeling Approach of MQTT for IoT-based Systems,” J. Electr. Syst. Inf. Technol., Vol. 11, No. 1, p. 62, Dec. 2024, DOI: 10.1186/s43067-024-00181-x.

V. Seoane, C. Garcia-Rubio, F. Almenares, and C. Campo, “Performance Evaluation of CoAP and MQTT with Security Support for IoT Environments,” Comput. Netw., Vol. 197, p. 108338, Oct. 2021, DOI: 10.1016/j.comnet.2021.108338.

A. J. Hintaw, S. Manickam, S. Karuppayah, M. A. Aladaileh, M. F. Aboalmaaly, and S. U. A. Laghari, “A Robust Security Scheme based on Enhanced Symmetric Algorithm for MQTT in the Internet of Things,” IEEE Access, Vol. 11, pp. 43019–43040, 2023, DOI: 10.1109/ACCESS.2023.3267718.

N. S. Alotaibi, H. I. Sayed Ahmed, S. O. M. Kamel, and G. F. ElKabbany, “Secure Enhancement for MQTT Protocol using Distributed Machine Learning Framework,” Sensors, Vol. 24, No. 5, p. 1638, Mar. 2024, DOI: 10.3390/s24051638.

Imran, M. F. A. Zuhairi, S. M. Ali, Z. Shahid, M. M. Alam, and M. M. Su’ud, “Improving Reliability for Detecting Anomalies in the MQTT Network by Applying Correlation Analysis for Feature Selection using Machine Learning Techniques,” Appl. SCI., Vol. 13, No. 11, p. 6753, Jun. 2023, DOI: 10.3390/app13116753.

A. Alzahrani and T. H. H. Aldhyani, “Artificial Intelligence Algorithms for Detecting and Classifying MQTT Protocol Internet of Things Attacks,” Electronics, Vol. 11, No. 22, p. 3837, Nov. 2022, DOI: 10.3390/electronics11223837.

G. M. I. Akbar, M. A. Hariyadi, and A. Hanani, “Detection of Bruteforce Attacks on the MQTT Protocol using Random Forest Algorithm,” Internet Things Artif. Intell. J., Vol. 3, No. 3, pp. 250–272, Aug. 2023, DOI: 10.31763/iota.v3i3.630.

L. Xin, L. Ziang, Z. Yingli, Z. Wenqiang, L. Dong, and Z. Qingguo, “TCN Enhanced Novel Malicious Traffic Detection for IoT Devices,” Connect. SCI., Vol. 34, No. 1, pp. 1322–1341, Dec. 2022, DOI: 10.1080/09540091.2022.2067124.

M. Akhi, C. Eising, and L. L. Dhirani, “Securing IoT using Lightweight TCN for Edge Deployment on Raspberry Pi 4,” IEEE Open J. Commun. Soc., Vol. 7, pp. 442–460, 2026, DOI: 10.1109/OJCOMS.2025.3649498.

S. Bai, J. Z. Kolter, and V. Koltun, “An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling,” Apr. 19, 2018, arXiv: arXiv:1803.01271. doi: 10.48550/arXiv.1803.01271.

S. Boner, C. Vogt, and M. Magno, “Tiny TCN Model for Gesture Recognition with Multi-point Low Power ToF-Sensors,” in 2022 IEEE 4th International Conference on Artificial Intelligence Circuits and Systems (AICAS), Incheon, Korea, Republic of: IEEE, Jun. 2022, pp. 356–359. DOI: 10.1109/AICAS54282.2022.9869848.

Z. Lv et al., “Efficient Deployment of Peanut Leaf Disease Detection Models on Edge AI Devices,” Agriculture, Vol. 15, No. 3, p. 332, Feb. 2025, DOI: 10.3390/agriculture15030332.

J. Wei, M. Fan, X. Zhang, W. Jiao, H. Wang, and T. Liu, “Stealthy Backdoor Attack to Real-world Models in Android Apps,” Jan. 02, 2025, arXiv: arXiv:2501.01263. DOI: 10.48550/arXiv.2501.01263.

C. White et al., “Neural Architecture Search: Insights from 1000 Papers,” Jan. 25, 2023, arXiv: arXiv:2301.08727. DOI: 10.48550/arXiv.2301.08727.

K. T. Chitty-Venkata, M. Emani, V. Vishwanath, and A. K. Somani, “Neural Architecture Search for Transformers: A Survey,” IEEE Access, Vol. 10, pp. 108374–108412, 2022, DOI: 10.1109/ACCESS.2022.3212767.

K. T. Chitty-Venkata, M. Emani, V. Vishwanath, and A. K. Somani, “Neural Architecture Search Benchmarks: Insights and Survey,” IEEE Access, Vol. 11, pp. 25217–25236, 2023, DOI: 10.1109/ACCESS.2023.3253818.

M. Risso et al., “Lightweight Neural Architecture Search for Temporal Convolutional Networks at the Edge,” IEEE Trans. Comput., pp. 1–1, 2022, DOI: 10.1109/TC.2022.3177955.

A. A. Hanif and M. Ilyas, “Enhance the Detection of DoS and Brute Force Attacks within the MQTT Environment Through Feature Engineering and Employing an Ensemble Technique,” Int. J. Artif. Intell. Appl., Vol. 15, No. 4, pp. 01–19, Jul. 2024, DOI: 10.5121/ijaia.2024.15401.

A. F. Otoom, W. Eleisah, and E. E. Abdallah, “Deep Learning for Accurate Detection of Brute Force Attacks on IoT Networks,” Procedia Comput. SCI., Vol. 220, pp. 291–298, 2023, DOI: 10.1016/j.procs.2023.03.038.

S. Ullah et al., “TNN-IDS: Transformer Neural Network-based Intrusion Detection System for MQTT-Enabled IoT Networks,” Comput. Netw., Vol. 237, p. 110072, Dec. 2023, DOI: 10.1016/j.comnet.2023.110072.

A. Omotosho, Y. Qendah, and C. Hammer, “IDS-MA: Intrusion Detection System for IoT MQTT Attacks using Centralized and Federated Learning,” in 2023 IEEE 47th Annual Computers, Software, and Applications Conference (COMPSAC), Torino, Italy: IEEE, Jun. 2023, pp. 678–688. DOI: 10.1109/COMPSAC57700.2023.00093.

S. Chesney and K. Roy, “AI Empowered Intrusion Detection for MQTT Networks,” in 2022 International Conference on Artificial Intelligence, Big Data, Computing and Data Communication Systems (icABCD), Durban, South Africa: IEEE, Aug. 2022, pp. 1–6. DOI: 10.1109/icABCD54961.2022.9856124.

F. Mosaiyebzadeh, L. G. Araujo Rodriguez, D. Macedo Batista, and R. Hirata, “A Network Intrusion Detection System using Deep Learning against MQTT Attacks in IoT,” in 2021 IEEE Latin-American Conference on Communications (LATINCOM), Santo Domingo, Dominican Republic: IEEE, Nov. 2021, pp. 1–6. DOI: 10.1109/LATINCOM53176.2021.9647850.

H. Hindy, E. Bayne, M. Bures, R. Atkinson, C. Tachtatzis, and X. Bellekens, “Machine Learning based IoT Intrusion Detection System: An MQTT Case Study (MQTT-IoT-IDS2020 Dataset),” in Selected Papers from the 12th International Networking Conference, Vol. 180, B. Ghita and S. Shiaeles, Eds., in Lecture Notes in Networks and Systems, Vol. 180. , Cham: Springer International Publishing, 2021, pp. 73–84. DOI: 10.1007/978-3-030-64758-2_6.

I. Vaccari, G. Chiola, M. Aiello, M. Mongelli, and E. Cambiaso, “MQTTset, a New Dataset for Machine Learning Techniques on MQTT,” Sensors, Vol. 20, No. 22, p. 6578, Nov. 2020, DOI: 10.3390/s20226578.




DOI: https://doi.org/10.32520/stmsi.v15i11.7032

Article Metrics

Abstract view : 0 times
PDF - 0 times

Refbacks

  • There are currently no refbacks.


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.