[Paper Review] Machine Learning Based IoT Intrusion Detection System: An MQTT Case Study.
This paper proposes a machine learning-based intrusion detection system (IDS) for MQTT-enabled IoT networks using a newly generated, open-access dataset. It evaluates six ML models on packet-, uni-directional flow-, and bidirectional flow-based features, demonstrating that flow-based features significantly improve detection of MQTT-specific attacks, while packet-level features suffice for traditional network attacks.
The Internet of Things (IoT) is one of the main research fields in the Cybersecurity domain. This is due to (a) the increased dependency on automated device, and (b) the inadequacy of general purpose Intrusion Detection Systems (IDS) to be deployed for special purpose networks usage. Numerous lightweight protocols are being proposed for IoT devices communication usage. One of the recent IoT machine-to-machine communication protocols is Message Queuing Telemetry Transport (MQTT) protocol. However, as per the authors best knowledge, there are no available IDS datasets that include MQTT benign or attack instances and thus, no IDS experimental results available. In this paper, we evaluate the effectiveness of six Machine Learning (ML) techniques to detect MQTT-based attacks. Three abstraction levels of features are assessed, namely, packet-based, uni-directional flow, and bidirectional flow features. An MQTT simulated dataset is generated and used for the training and evaluation processes. The dataset is released with an open access licence to help the research community further analyse the challenges. The experimental results demonstrated the adequacy of the proposed ML models to suit MQTT-based networks IDS requirements. Moreover, the results emphasise on the importance of using flow-based features to discriminate MQTT-based attacks from benign traffic, while packet-based features are sufficient for traditional networking attacks
Motivation & Objective
- Address the lack of publicly available IDS datasets containing MQTT benign and attack traffic.
- Evaluate the effectiveness of machine learning techniques in detecting MQTT-specific intrusions in IoT environments.
- Assess the impact of different feature abstraction levels—packet-based, uni-directional flow, and bidirectional flow—on intrusion detection performance.
- Provide a reproducible, open-access dataset to support future research in MQTT-based network security.
- Demonstrate that flow-based features are essential for distinguishing MQTT-based attacks from normal traffic.
Proposed method
- Simulated an MQTT-based IoT network environment to generate realistic benign and attack traffic.
- Collected and engineered three abstraction levels of features: packet-level, uni-directional flow, and bidirectional flow features.
- Trained and evaluated six machine learning models (e.g., Random Forest, SVM, XGBoost) on the generated dataset.
- Used standard evaluation metrics (e.g., accuracy, F1-score) to compare model performance across feature types.
- Applied feature importance analysis to assess the contribution of different feature sets to detection performance.
- Released the complete dataset under an open-access license to enable community reuse and further benchmarking.
Experimental results
Research questions
- RQ1How effective are various machine learning models in detecting MQTT-based cyberattacks when trained on simulated IoT traffic?
- RQ2Which feature abstraction level—packet-based, uni-directional flow, or bidirectional flow—yields the highest detection accuracy for MQTT-specific attacks?
- RQ3Can packet-level features effectively detect traditional network-based attacks in MQTT traffic, or is flow-level analysis necessary?
- RQ4To what extent do flow-based features improve the discrimination between benign and malicious MQTT traffic?
- RQ5How does the proposed open-access dataset support reproducibility and advancement in IoT intrusion detection research?
Key findings
- The proposed machine learning models achieved high detection accuracy on the generated MQTT dataset, confirming their suitability for IoT-based IDS applications.
- Bidirectional flow-based features significantly outperformed packet-based features in detecting MQTT-specific attacks, indicating their importance for protocol-aware intrusion detection.
- Packet-based features were sufficient for detecting traditional network-based attacks, suggesting a trade-off between feature complexity and detection scope.
- The dataset was successfully generated and released with an open-access license, enabling future research and benchmarking in MQTT security.
- Feature importance analysis confirmed that flow-level characteristics—such as message frequency and payload patterns—were critical for identifying malicious MQTT behavior.
- XGBoost and Random Forest models showed strong performance across all feature types, with bidirectional flow features yielding the highest F1-scores for attack detection.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.