# Toward Secure Smart Grid Systems: Risks, Threats, Challenges, and Future Directions
## 5 Smart Grid Attacks
### Ethical Hacking Solutions  
In the context of smart grids, ethical hacking can play a crucial role in identifying vulnerabilities and security gaps/weaknesses in both systems and devices to help identify potential attack vectors and exploits that may jeopardize the safety and security of the smart grid domain (see Table 29). A recent ethical hackers framework was presented in [286], including tools and scenarios/situations, especially surrounding the IoT domain [287], and can be adapted to the context of smart grids. However, ethical hacking must be conducted in an authorized, responsible, professional, safe, and legal manner, especially when applying the \"Red Team/Blue Team\" solution that divides the penetration testing scenario into a red team serving as attackers and a blue team serving as defenders. As critical as this domain is for smart grids, there are not many available solutions dedicated to solving this issue. [PERSON] et al. [288] presented a case study that works on quantification of security, formal methods, and tool creation before testing it on the AMI protocol space to prove its effectiveness. In [289], [PERSON] et al. focused on the Intelligent Electronic Device (IED) firmware system security testing to ensure early vulnerability detection that surrounds the IED communication stack and Supervisory Control and Data Acquisition (SCADA) applications. Moreover, good security practices in design and coding were also discussed. In [290], [PERSON] et al. presented the design of ISAAC, the Idaho CPS Smart Grid Cybersecurity Testbed, with several fully functional components with machine learning capabilities for CPS. In [291], [PERSON] et al. discussed how the hardware of grid equipment can be used to collect intelligence using different attack and access scenarios while examining the outcome of \"hardware hacking\" at device and grid operation levels. Hardware hardening techniques were also presented to make components attack-resistant and reduce their vulnerability surface. In [292], [PERSON] et al. presented the design and implementation of an integrated testing platform, where several smart inverter behavior tests were executed with results showing that this platform increases the system testing efficiency by 85% while minimizing human errors and man-hours. In [293], [PERSON] et al. conducted the most comprehensive study on penetration testing of connected household products, where systematic penetration tests were conducted on 22 devices in five categories related to connected homes. As a result, 17 vulnerabilities were discovered and published as new Common Vulnerabilities and Exposures (CVEs), with 52 other weaknesses. Authorized simulated attacks on smart grid infrastructure are used in ethical hacking to find security flaws before any adversary can take advantage of them. Penetration testers can, for example, simulate an insider trying to increase privileges within the SCADA network, assisting services in locating incorrectly installed access controls and fixing serious security holes and vulnerabilities. It is important to know that despite being popular in IT security, direct application of penetration testing and ethical hacking in OT environments, particularly legacy systems, can be dangerous and even detrimental. Since OT systems are frequently mission-critical, they are not built to withstand stress-testing or active probing methods, which could cause unanticipated failures or outages. Therefore, such testing needs to be done very carefully in smart grid contexts, ideally using digital twins, testbeds, or replicated environments instead of operational systems. Live penetration testing is not suitable for the majority of OT infrastructures due to the potential for financial losses or disruption of critical services. Key security challenges and mitigation strategies in OT-based smart grid environments are presented in Table 30.  
\begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline
**Year** & **Ref.