Data integrity, cybersecurity, and defense against more advanced cyber threats all depend on effective malware detection. The majority of signature-based techniques used by current malware detection systems are ineffective against novel and polymorphic malware. Consequently, systems are exposed to serious security risks and suffer from high false negative rates. Moreover, heuristic and behavior-based approaches, though more flexible, frequently produce false positives, disrupting legitimate user activities and minimizing user trust in security solutions. By protecting sensitive information and vital systems from malicious attacks, this research aims to improve cybersecurity. Initially, input log file data for analysis is taken from the dataset. Subsequently, data normalization is executed through z-score normalization to standardize feature values. Next, feature selection is performed utilizing Mutual Information (MI) to identify the most relevant features. Following this, malware detection is conducted using the Modified Scaling Wide Residual Network (Modified SWideRNet) framework to identify potential threats. If an attack is detected, the effect of the identified malware is mitigated by applying the Modified SWideRNet, and the overall effectiveness of the process is evaluated based on the outcomes. Additionally, the devised Modified SWideRNet has outperformed existing techniques by acquiring accuracy, precision, and recall with values of 91.435%, 90.133%, and 92.344%.