Exploiting Autoencoder-Based Anomaly Detection to Enhance Cybersecurity in Power Grids
Abstract
:1. Introduction
- Firstly, a hybrid deep learning approach is proposed for detecting the cyberattacks in smart grids. Specifically, we introduce the Autoencoder (AE)-Gated Recurrent Unit (GRU) approach, integrating two stacked GRU layers into the AE model’s encoder and decoder. By incorporating GRU units into both the encoder and decoder sides, the model learns compact representations of sequential smart grid data while ensuring minimal loss in data reconstruction. For cyberattack detection, the AE-GRU approach is combined with semi-supervised anomaly detection methods, including Isolation Forest (IF), Local Outlier Factor (LOF), OCSVM, and Elliptical Envelope (EE). Initially, the AE-GRU approach extracts pertinent features from the data, seamlessly integrated with semi-supervised techniques (IF, OCSVM, EE, and LOF) to detect anomalies effectively. Specifically, AE-GRU handles data reduction and feature extraction, followed by applying anomaly detection algorithms to identify potential cyberattacks.
- The effectiveness of these approaches was evaluated based on the IEC 60870-5-104 (IEC 104) control communication protocol, commonly used in SCADA networks to manage critical infrastructures such as power stations. The IEC 104 protocol is widely used in smart grid environments for the exchange of control and monitoring information between various devices and systems. This protocol facilitates the communication between different components of the power grid, including sensors, actuators, controllers, and SCADA systems. The proposed framework’s effectiveness was assessed using the widely adopted IEC 60870-5-104 traffic dataset, which includes various types of malicious attacks such as DOS, Switch, Injection, ConnLoss, and Rogue Dev. We employed four statistical indices—accuracy, precision, F1-score, and the Area Under the Curve (AUC)—to compare the discrimination accuracy of the considered methods. The experimental results demonstrate that the proposed approach outperforms standalone algorithms, with the AE-GRU-based LOF method achieving the highest detection rate. This underscores the potential for the proposed approach to enhance the cybersecurity in smart grids by accurately detecting and mitigating cyber threats.
2. Related Works
3. AE-GRU Anomaly Detection Framework
3.1. Auto-Encoders
3.2. GRUs (Gated Reccurent Units)
3.3. Hybrid AE-GRU
3.4. Semi-Supervised Algorithms
- A One-Class SVM is a machine learning algorithm used for anomaly detection, particularly in cases where only normal data are available for training. It works by constructing a hyperplane in a high-dimensional space that encapsulates the normal data points. This hyperplane should ideally separate the normal data from the rest of the feature space which contains anomalies [37,38]. During training, the algorithm learns to maximize the margin around the normal data points while minimizing the possibility of including anomalies within this margin. During inference, data points lying outside this margin are classified as anomalies [39].
- Isolation Forest (iF) is an ensemble learning method designed for outlier detection. It constructs a set of isolation trees, each of which partitions the feature space by randomly selecting a feature and a split value. Anomalies are expected to be isolated in fewer partitions compared to the normal data points [40]. Therefore, they require fewer splits to be separated from the majority of the data. The algorithm measures the average path length for each data point in the trees. The shorter average path lengths indicate anomalies, while the longer path lengths suggest normal data [41].
- An Elliptic Envelope (EE) is a statistical method used for multivariate outlier detection assuming that the normal data points are located within a tightly bound elliptical region. The algorithm fits an ellipse to the data using robust covariance estimation techniques [42]. Data points lying outside the ellipse are considered outliers, as they deviate significantly from the expected distribution of normal data. The EE method is particularly useful when the normal data follow a Gaussian distribution and when the dimensionality of the data is relatively low [41].
- The LOF method comprises a density-based anomaly detection algorithm that measures the local density deviation of a data point with respect to its neighbors. It operates under the assumption that anomalies have lower densities compared to their neighbors, resulting in higher LOF scores [43]. The LOF score of a data point is computed based on the ratio of the local density of the point to the average local density of its neighbors. Data points with significantly higher LOF scores compared to their neighbors are considered outliers.
3.5. The Proposed AE-GRU-Driven Anomaly Detection Framework
3.6. An Overview of the IEC-60780-5-104 Protocol
4. Threat Scenarios and Results
4.1. BUT-IEC104-I Dataset
4.2. Detection Results
- DOS attack: In this scenario, a DOS attack is directed at an IEC 104 control station, aiming to overload it and disrupt its functionality, thereby potentially causing grid failure. The attacker gains unauthorized access by utilizing a spoofed IP address and floods the victim with a significant volume of 1049 messages over a 30 min period. This onslaught overwhelms the control station’s resources, rendering it unable to respond effectively to legitimate requests and ultimately leading to system instability or failure.
- Switching attack: In a switching attack, malware is utilized to manipulate the targeted devices, turning them alternately on and off. This type of attack disrupts the normal operation of the devices and can potentially lead to system instability or malfunction. In this scenario, the switching attack persisted for 10 min, during which 72 packets were transmitted to the victim station. The attacker’s objective is to disrupt the station’s functionality by manipulating its operational status, which can have significant repercussions on the overall grid operation and stability. Figure 6 displays a heatmap comparing the detection performance metrics of the AE-GRU-based and standalone anomaly detection methods during the switching attack scenario. In the switching attack scenario, both the AE-GRU-based and standalone anomaly detection methods were evaluated. The AE-GRU-based methods, like the iForest and LOF methods, showed good accuracy and precision, with the iForest method achieving 0.8903 accuracy and 0.9856 precision, and the LOF method achieving 0.8945 accuracy and good precision (Figure 6a). However, the 1SVM model performed poorly with only 0.1181 accuracy and 0.0833 recall. The EE model had moderate accuracy at 0.8692 and precision at 0.9852. The standalone methods, especially the LOF and EE methods, demonstrated a strong performance, with accuracies of 0.9576 and perfect precision scores (Figure 6b). The 1SVM model also had high accuracy and precision, with scores of 0.9556 and 0.9575, respectively. Overall, while the AE-GRU-based methods like the iForest and LOF methods performed well, the standalone methods, particularly the LOF and EE methods, consistently showed a strong performance, suggesting their effectiveness in detecting the anomalies in the switching attack scenario.
- Injection command attacks: In injection command attacks, the attacker interferes with a connected device by modifying its configurations or introducing fraudulent commands, leading to abnormal behavior. This manipulation results in the generation of various anomalies within the system. The attack occurred in two distinct instances: the first lasted for 5 min and involved 83 packets, while the second persisted for 15 min and comprised 221 packets. The attacker aims to compromise the integrity and functionality of the targeted device, potentially causing disruptions or damage to the overall system. Such attacks pose significant risks to the security and reliability of the network, highlighting the importance of robust cybersecurity measures in safeguarding critical infrastructure like smart grids. Figure 7 illustrates the heatmap comparing the detection performance metrics of the AE-GRU-based and standalone anomaly detection methods during the injection attack scenario based on the testing data. In the injection attack scenario, both the AE-GRU-based and standalone anomaly detection methods achieved high accuracy, precision, and recall. The AE-GRU-based methods had accuracy values from 0.9619 to 0.9771, while the standalone methods ranged from 0.457 to 0.9275. All the methods had precision scores of 1, indicating near-perfect identification of attack instances. The AE-GRU-based methods showed recall values from 0.9616 to 1, while the standalone methods ranged from 0.4927 to 1. Overall, the AE-GRU-based methods consistently outperformed the standalone methods, demonstrating their superior detection capabilities for injection attacks.
- Connection loss attacks: In this category, the attacker attempts to interfere with specific devices, disrupting their interconnected communications. Two scenarios were simulated to replicate this interference. In the first scenario, a 10 min disconnection led to the loss of 146 packets. In the second scenario, the disconnection persisted for an hour, losing several packets. These attacks aim to disrupt the normal functioning of the targeted devices, potentially causing delays, malfunctions, or data loss. Such interference poses significant threats to the reliability and integrity of the communication network, underscoring the importance of robust cybersecurity measures in mitigating such risks.
- Rogue device attack: In this attack, the attacker gains unauthorized access to the communication network, allowing them to transmit arbitrary messages to authorized devices. These messages compel the devices to perform unauthorized activities, leading to irregular events and potentially harmful outcomes. In a 30 min attack, the attacker transmitted 417 abnormal messages, exploiting the network security protocol vulnerabilities. Such attacks can disrupt the network’s normal operations, compromise its integrity, and pose significant risks to the overall cybersecurity posture of the system. It underscores the importance of robust security measures to prevent unauthorized access and mitigate the impact of such attacks on the network’s functionality and reliability.
5. Discussion and Conclusion
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Tan, S.; De, D.; Song, W.Z.; Yang, J.; Das, S.K. Survey of security advances in smart grid: A data driven approach. IEEE Commun. Surv. Tutor. 2016, 19, 397–422. [Google Scholar] [CrossRef]
- Khoei, T.T.; Slimane, H.O.; Kaabouch, N. A comprehensive survey on the cyber-security of smart grids: Cyber-attacks, detection, countermeasure techniques, and future directions. arXiv 2022, arXiv:2207.07738. [Google Scholar]
- Goudarzi, A.; Ghayoor, F.; Waseem, M.; Fahad, S.; Traore, I. A survey on IoT-enabled smart grids: Emerging, applications, challenges, and outlook. Energies 2022, 15, 6984. [Google Scholar] [CrossRef]
- Tang, D.; Fang, Y.P.; Zio, E. Vulnerability analysis of demand-response with renewable energy integration in smart grids to cyber attacks and online detection methods. Reliab. Eng. Syst. Saf. 2023, 235, 109212. [Google Scholar] [CrossRef]
- Ding, J.; Qammar, A.; Zhang, Z.; Karim, A.; Ning, H. Cyber threats to smart grids: Review, taxonomy, potential solutions, and future directions. Energies 2022, 15, 6799. [Google Scholar] [CrossRef]
- Kim, Y.; Hakak, S.; Ghorbani, A. Smart grid security: Attacks and defence techniques. IET Smart Grid 2023, 6, 103–123. [Google Scholar] [CrossRef]
- Faquir, D.; Chouliaras, N.; Sofia, V.; Olga, K.; Maglaras, L. Cybersecurity in smart grids, challenges and solutions. AIMS Electron. Electr. Eng. 2021, 5, 24–37. [Google Scholar]
- Sahani, N.; Zhu, R.; Cho, J.H.; Liu, C.C. Machine learning-based intrusion detection for smart grid computing: A survey. ACM Trans. Cyber-Phys. Syst. 2023, 7, 1–31. [Google Scholar] [CrossRef]
- An, D.; Yang, Q.; Liu, W.; Zhang, Y. Defending against data integrity attacks in smart grid: A deep reinforcement learning-based approach. IEEE Access 2019, 7, 110835–110845. [Google Scholar] [CrossRef]
- Sakhnini, J.; Karimipour, H.; Dehghantanha, A. Smart grid cyber attacks detection using supervised learning and heuristic feature selection. In Proceedings of the 2019 IEEE 7th International Conference on Smart Energy Grid Engineering (SEGE), Oshawa, ON, Canada, 12–14 August 2019; pp. 108–112. [Google Scholar]
- Hink, R.C.B.; Beaver, J.M.; Buckner, M.A.; Morris, T.; Adhikari, U.; Pan, S. Machine learning for power system disturbance and cyber-attack discrimination. In Proceedings of the 2014 7th International Symposium on Resilient Control Systems (ISRCS) 2014, Denver, CO, USA, 19–21 August 2014; pp. 1–8. [Google Scholar]
- Esmalifalak, M.; Liu, L.; Nguyen, N.; Zheng, R.; Han, Z. Detecting stealthy false data injection using machine learning in smart grid. IEEE Syst. J. 2014, 11, 1644–1652. [Google Scholar] [CrossRef]
- Ahmed, S.; Lee, Y.; Hyun, S.H.; Koo, I. Unsupervised machine learning-based detection of covert data integrity assault in smart grid networks utilizing isolation forest. IEEE Trans. Inf. Forensics Secur. 2019, 14, 2765–2777. [Google Scholar] [CrossRef]
- Acosta, M.R.C.; Ahmed, S.; Garcia, C.E.; Koo, I. Extremely randomized trees-based scheme for stealthy cyber-attack detection in smart grid networks. IEEE Access 2020, 8, 19921–19933. [Google Scholar] [CrossRef]
- Al-Qudah, M.; Ashi, Z.; Alnabhan, M.; Abu Al-Haija, Q. Effective one-class classifier model for memory dump malware detection. J. Sens. Actuator Netw. 2023, 12, 5. [Google Scholar] [CrossRef]
- Menon, D.M.; Radhika, N. Anomaly detection in smart grid traffic data for home area network. In Proceedings of the 2016 International Conference on Circuit, Power and Computing Technologies (ICCPCT), Nagercoil, India, 18–19 March 2016; pp. 1–4. [Google Scholar]
- Al-Abassi, A.; Karimipour, H.; Dehghantanha, A.; Parizi, R.M. An ensemble deep learning-based cyber-attack detection in industrial control system. IEEE Access 2020, 8, 83965–83973. [Google Scholar] [CrossRef]
- Kundu, A.; Sahu, A.; Serpedin, E.; Davis, K. A3D: Attention-based auto-encoder anomaly detector for false data injection attacks. Electr. Power Syst. Res. 2020, 189, 106795. [Google Scholar] [CrossRef]
- Tuor, A.; Kaplan, S.; Hutchinson, B.; Nichols, N.; Robinson, S. Deep learning for unsupervised insider threat detection in structured cybersecurity data streams. In Proceedings of the Workshops at the Thirty-First AAAI Conference on Artificial Intelligence, San Francisco, CA, USA, 4–9 February 2017. [Google Scholar]
- Haghshenas, S.H.; Hasnat, M.A.; Naeini, M. A temporal graph neural network for cyber attack detection and localization in smart grids. In Proceedings of the 2023 IEEE Power & Energy Society Innovative Smart Grid Technologies Conference (ISGT), Washington, DC, USA, 16–19 January 2023; pp. 1–5. [Google Scholar]
- Khanna, K.; Panigrahi, B.K.; Joshi, A. AI-based approach to identify compromised meters in data integrity attacks on smart grid. IET Gener. Transm. Distrib. 2018, 12, 1052–1066. [Google Scholar] [CrossRef]
- Karimipour, H.; Dehghantanha, A.; Parizi, R.M.; Choo, K.K.R.; Leung, H. A deep and scalable unsupervised machine learning system for cyber-attack detection in large-scale smart grids. IEEE Access 2019, 7, 80778–80788. [Google Scholar] [CrossRef]
- Qiu, W.; Tang, Q.; Wang, Y.; Zhan, L.; Liu, Y.; Yao, W. Multi-view convolutional neural network for data spoofing cyber-attack detection in distribution synchrophasors. IEEE Trans. Smart Grid 2020, 11, 3457–3468. [Google Scholar] [CrossRef]
- Mohammadpourfard, M.; Genc, I.; Lakshminarayana, S.; Konstantinou, C. Attack detection and localization in smart grid with image-based deep learning. In Proceedings of the 2021 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), Aachen, Germany, 25–28 October 2021; pp. 121–126. [Google Scholar]
- Ali, S.; Li, Y. Learning multilevel auto-encoders for DDoS attack detection in smart grid network. IEEE Access 2019, 7, 108647–108659. [Google Scholar] [CrossRef]
- Dou, C.; Wu, D.; Yue, D.; Jin, B.; Xu, S. A hybrid method for false data injection attack detection in smart grid based on variational mode decomposition and OS-ELM. CSEE J. Power Energy Syst. 2020, 8, 1697–1707. [Google Scholar]
- Lu, G.; Tian, X. An efficient communication intrusion detection scheme in AMI combining feature dimensionality reduction and improved LSTM. Secur. Commun. Netw. 2021, 2021, 6631075. [Google Scholar] [CrossRef]
- Qi, R.; Rasband, C.; Zheng, J.; Longoria, R. Detecting cyber attacks in smart grids using semi-supervised anomaly detection and deep representation learning. Information 2021, 12, 328. [Google Scholar] [CrossRef]
- Ferrag, M.A.; Maglaras, L. DeepCoin: A novel deep learning and blockchain-based energy exchange framework for smart grids. IEEE Trans. Eng. Manag. 2019, 67, 1285–1297. [Google Scholar] [CrossRef]
- Liu, W.; Wang, Z.; Liu, X.; Zeng, N.; Liu, Y.; Alsaadi, F.E. A survey of deep neural network architectures and their applications. Neurocomputing 2017, 234, 11–26. [Google Scholar] [CrossRef]
- Zhang, G.; Liu, Y.; Jin, X. A survey of autoencoder-based recommender systems. Front. Comput. Sci. 2020, 14, 430–450. [Google Scholar] [CrossRef]
- Michelucci, U. An introduction to autoencoders. arXiv 2022, arXiv:2201.03898. [Google Scholar]
- Dey, R.; Salem, F.M. Gate-variants of gated recurrent unit (GRU) neural networks. In Proceedings of the 2017 IEEE 60th International Midwest Symposium on Circuits and Systems (MWSCAS), Boston, MA, USA, 6–9 August 2017; pp. 1597–1600. [Google Scholar]
- Cho, K.; Van Merriënboer, B.; Bahdanau, D.; Bengio, Y. On the properties of neural machine translation: Encoder-decoder approaches. arXiv 2014, arXiv:1409.1259. [Google Scholar]
- Kanai, S.; Fujiwara, Y.; Iwamura, S. Preventing gradient explosions in gated recurrent units. Adv. Neural Inf. Process. Syst. 2017, 30, 1–10. [Google Scholar]
- Ravanelli, M.; Brakel, P.; Omologo, M.; Bengio, Y. Improving speech recognition by revising gated recurrent units. arXiv 2017, arXiv:1710.00641. [Google Scholar]
- Harrou, F.; Taghezouit, B.; Bouyeddou, B.; Sun, Y. Cybersecurity of photovoltaic systems: Challenges, threats, and mitigation strategies: A short survey. Front. Energy Res. 2023, 11, 1274451. [Google Scholar] [CrossRef]
- Rabaoui, A.; Davy, M.; Rossignol, S.; Lachiri, Z.; Ellouze, N. Improved one-class SVM classifier for sounds classification. In Proceedings of the 2007 IEEE Conference on Advanced Video and Signal Based Surveillance, London, UK, 5–7 September 2007; pp. 117–122. [Google Scholar]
- Kawi, O.; Clawson, K.; Dunn, P.; Knight, D.; Hodgson, J.; Peng, Y. Medical formulation recognition (MFR) using deep feature learning and one class SVM. In Proceedings of the 2020 International Joint Conference on Neural Networks (IJCNN), Glasgow, UK, 19–24 July 2020; pp. 1–7. [Google Scholar]
- Liu, F.T.; Ting, K.M.; Zhou, Z.H. Isolation forest. In Proceedings of the 2008 Eighth IEEE International Conference on Data Mining, Pisa, Italy, 15–19 December 2008; pp. 413–422. [Google Scholar]
- McKinnon, C.; Carroll, J.; McDonald, A.; Koukoura, S.; Infield, D.; Soraghan, C. Comparison of new anomaly detection technique for wind turbine condition monitoring using gearbox SCADA data. Energies 2020, 13, 5152. [Google Scholar] [CrossRef]
- Hubert, M.; Debruyne, M.; Rousseeuw, P.J. Minimum covariance determinant and extensions. Wiley Interdiscip. Rev. Comput. Stat. 2018, 10, e1421. [Google Scholar] [CrossRef]
- Alghushairy, O.; Alsini, R.; Soule, T.; Ma, X. A review of local outlier factor algorithms for outlier detection in big data streams. Big Data Cogn. Comput. 2020, 5, 1. [Google Scholar] [CrossRef]
- Lin, C.Y.; Nadjm-Tehrani, S. Understanding IEC-60870-5-104 traffic patterns in SCADA networks. In Proceedings of the 4th ACM Workshop on Cyber-Physical System Security, Incheon, Republic of Korea, 4 June 2018; pp. 51–60. [Google Scholar]
- Cherifi, T.; Hamami, L. A practical implementation of unconditional security for the IEC 60780-5-101 SCADA protocol. Int. J. Crit. Infrastruct. Prot. 2018, 20, 68–84. [Google Scholar] [CrossRef]
- Grammatikis, P.R.; Sarigiannidis, P.; Sarigiannidis, A.; Margounakis, D.; Tsiakalos, A.; Efstathopoulos, G. An anomaly detection mechanism for IEC 60870-5-104. In Proceedings of the 2020 9th International Conference on Modern Circuits and Systems Technologies (MOCAST), Bremen, Germany, 7–9 September 2020; pp. 1–4. [Google Scholar]
- Matoušek, P.; Ryšavý, O.; Grégr, M.; Havlena, V. Flow based monitoring of ICS communication in the smart grid. J. Inf. Secur. Appl. 2020, 54, 102535. [Google Scholar]
- Matoušek, P.; Havlena, V.; Holík, L. Efficient modelling of ICS communication for anomaly detection using probabilistic automata. In Proceedings of the 2021 IFIP/IEEE International Symposium on Integrated Network Management (IM), Bordeaux, France, 17–21 May 2021; pp. 81–89. [Google Scholar]
Approach | Basic Idea | Pros | Cons |
---|---|---|---|
1SVM | Constructs a hyperplane to encapsulate normal data and separates it from anomalies. |
|
|
LOF | Measures the local density deviation of a data point with respect to its neighbors. |
|
|
Isolation Forest (iF) | Constructs isolation trees to isolate anomalies with fewer splits than normal data. |
|
|
Elliptic Envelope (EE) | Fits an ellipse to the data and detects outliers outside the ellipse. |
|
|
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Harrou, F.; Bouyeddou, B.; Dairi, A.; Sun, Y. Exploiting Autoencoder-Based Anomaly Detection to Enhance Cybersecurity in Power Grids. Future Internet 2024, 16, 184. https://doi.org/10.3390/fi16060184
Harrou F, Bouyeddou B, Dairi A, Sun Y. Exploiting Autoencoder-Based Anomaly Detection to Enhance Cybersecurity in Power Grids. Future Internet. 2024; 16(6):184. https://doi.org/10.3390/fi16060184
Chicago/Turabian StyleHarrou, Fouzi, Benamar Bouyeddou, Abdelkader Dairi, and Ying Sun. 2024. "Exploiting Autoencoder-Based Anomaly Detection to Enhance Cybersecurity in Power Grids" Future Internet 16, no. 6: 184. https://doi.org/10.3390/fi16060184