In this digital, internet-based world, it is not new to face cyber attacks from time to time. A number of heavy viruses have been made by hackers, and they have successfully given big losses to our systems. In the family of these viruses, the Stuxnet virus is a well-known name. Stuxnet is a very dangerous virus that probably targets the control systems of our industry. The main source of this virus can be an infected USB drive or flash drive. In this research paper, we study a mathematical model to define the dynamical structure or the effects of the Stuxnet virus on our computer systems. To study the given dynamics, we use a modified version of the Caputo-type fractional derivative, which can be used as an old Caputo derivative by fixing some slight changes, which is an advantage of this study. We demonstrate that the given fractional Caputo-type dynamical model has a unique solution using fixed point theory. We derive the solution of the proposed non-linear non-classical model with the application of a recent version of the Predictor-Corrector scheme. We analyze various graphs at different values of the arrival rate of new computers, damage rate, virus transmission rate, and natural removal rate. In the graphical interpretations, we verify the values of fractional orders and simulate 2-D and 3-D graphics to understand the dynamics clearly. The major novelty of this study is that we formulate the optimal control problem and its important consequences both theoretically and mathematically, which can be further extended graphically. The main contribution of this research work is to provide some novel results on the Stuxnet virus dynamics and explore the uses of fractional derivatives in computer science. The given methodology is effective, fully novel, and very easy to understand. (c) 2022 THE AUTHORS. Published by Elsevier BV on behalf of Faculty of Engineering, Ain Shams University.