Industrial control systems (ICSs) are integrated with communication networks and the Internet of Things (IoT), they become more susceptible to cyberattacks, which can have catastrophic effects. However, the lack of sufficient high-quality attack examples has made it very difficult to withstand cyber threats like large-scale, sophisticated, and heterogeneous ICS. Conventional intrusion detection systems (IDSs), designed primarily to assist IT systems, rely heavily on pre-established models and are mostly trained on particular types of cyberattacks. Furthermore, most intrusion detection systems suffer from low accuracy and high false-positive rates when used because they fail to take into account the imbalanced nature of datasets and feature redundancy. In this article,the Deep DenseAttention Learning Model (DDAnet), a novel and inventive deep learning scheme described in this article, is intended to identify and detect cyber attacks that target industrial control systems. The intrusion activity is regarded as a densenet-based network intrusion detection model with an attention model along with a random forest as a classifier. The DDAnet learning scheme has been extensively tested on a real industrial control system dataset. The results of these experiments reveal the great effectiveness of the scheme in identifying different types of data injection attacks on industrial control systems. Furthermore, the scheme has been found to have superior performance compared to state-of-the-art schemes and existing methodologies. The proposed strategy is a versatile method that can be easily deployed in the current ICS infrastructure with minimal effort.