CredGuard: Credential-Based Intrusion Detection System Using Explainable AI (XAI) for IoT Environments
Artificial intelligence (AI) is increasingly used to detect credential-based cyberattacks, yet many intrusion detection approaches provide limited insight into their predictions. This challenge is particularly relevant to Internet of Things (IoT) environments, where compromised credentials can enable unauthorized access to connected devices. This paper presents CredGuard, an explainable credential-based intrusion detection framework for identifying malicious authentication attempts in IoT environments. We construct CredGuard-IoT by integrating five heterogeneous sources comprising SSH honeypot logs, Cowrie honeypot records, risk-based authentication logs, SSH brute-force data, and web authentication intrusion records. The resulting dataset contains 1,003,030 authentication records represented by 23 engineered temporal, behavioral, credential-related, network, and geographical features. We evaluate six machine learning and deep learning classifiers: Random Forest (RF), XGBoost, Support Vector Machine, Convolutional Neural Network, Recurrent Neural Network, and Deep Neural Network. A rule-based baseline based on authentication failure rate provides an additional comparison with the learned classifiers under the evaluated configuration. RF achieves the highest accuracy (82%), precision (79.79%), recall (78.44%), and F1-score (79.11%), with a training time of 868 s. XGBoost achieves 81.31% accuracy with a shorter training time (287 s); the models attain nearly identical ROC-AUC scores (0.8937 for RF and 0.8938 for XGBoost). To interpret RF predictions, SHapley Additive exPlanations (SHAP) and Local Interpretable Model-agnostic Explanations (LIME) provide complementary global and local explanations. RF feature importance highlights failure rate, mean inter-arrival time, and failed attempts, while SHAP emphasizes username frequency, failure rate, and location frequency. These findings demonstrate the potential of interpretable, authentication-focused detection for supporting IoT security analysis.
Authors
- Shaima Alharbi
- Fatemah Alharbi (ORCID: https://orcid.org/0000-0003-3594-6122)
- Renad Alamri
- Alaa Alraddadi
- Aishah Alranini
- Kadi Alotaibi
- Rahaf Alkhulaifi
Institutions
- Taibah University (SA)
Publication Details
- Journal
- Applied Sciences
- Published
- 2026-12-03
- DOI
- https://doi.org/10.3390/app162312016
- Primary Topic
- Network Security and Intrusion Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.00