
The rapid proliferation of Internet of Things (IoT) devices has improved connectivity but introduced new cybersecurity risks, particularly from botnets. Detecting and identifying malicious botnet activities is crucial for early attack mitigation, understanding attack patterns, and deploying effective countermeasures. However, state-of-the-art IoT botnet detection models often struggle to handle imbalanced data, capture temporal patterns, and provide interpretable, explainable insights. This work proposes an IoT botnet detection and profiling model that leverages Explainable Artificial Intelligence (XAI) methods, including eXtreme Gradient Boosting (XGBoost) for feature selection, a Long Short-Term Memory (LSTM) neural network model for botnet detection and classification, and Shapley Additive Explanations (SHAP) for interpretability. This model integrates a feature selection approach that combines correlation analysis with the XGBoost algorithm to improve efficiency. The LSTM model is optimized and fine-tuned using Bayesian optimization to achieve accurate botnet detection and classification. The SHAP method provides interpretable insights into individual and collective botnet behaviors for profiling. Finally, the performance of the proposed model was evaluated with the augmented BCCC-Aposemat-IoT-Bot-2024 dataset and compared with state-of-the-art models. The results demonstrate that our proposed model achieves competitive performance while offering key advantages, including effective handling of sequential and imbalanced data, improved computational efficiency, and enhanced explainability.
