






The escalating threat landscape on South Africa's critical infrastructure cyberattacks demands innovative solutions that harness the synergy between AI and cybersecurity. This research delves into the intersection of these domains, utilising machine learning algorithms to bolster Supervisory Control and Data Acquisition (SCADA) networks of such critical infrastructures. These networks, pivotal for controlling and monitoring critical infrastructures, collect and process sensitive data. The approach melds machine learning's predictive prowess with cybersecurity imperatives, resulting in a resilient model capable of preemptively identifying and thwarting cyber threats—an aspect often lacking in existing models. To achieve this, a comprehensive methodology involves the emulation of cyberattacks through a Kali Linux machine integrated into a simulated SCADA network. Leveraging Wireshark, network traffic is collected for machine learning insights. The solution emerges in the form of a dual-tasked ensemble supervised machine learning model, combining the power of a Multi-Layer Perceptron (MLP) Neural Network and Extreme Gradient Boosting (XGBoost). This synergy equips the model to decipher subtle patterns and anomalies within network traffic. With an average accuracy of 99.60% and a detection rate of 99.48%, the model effectively discriminates between normal and suspicious states, while proactively preventing malicious packet infiltration. Through PowerShell, the model enforces firewall rules an embodiment of AI's adaptive governance endowing it with a dual role as both an Intrusion Detection and Prevention Model. Rigorous testing on previously unseen data validates the model's performance, boasting 99.19% accuracy and 98.95% detection rates. Benchmarked against existing models, the proposed solution excels in precision, accuracy, and recall/detection rates. This cybersecurity model stands as a robust defence for computer-based, data-driven networks, underscoring the vital role of machine learning and AI in fortifying the security of SCADA networks and critical infrastructure.