Epidemic models are commonly used to model the propagation of malicious self-replicating programs like computer viruses and worms. Deterministic Ordinary Differential Equations (ODEs) are the most popular used method to describe these models. The main contribution of this paper is that we provides a better understanding about the propagation of the selfreplicating programs by introducing stochastic techniques to describe the propagation phenomenon of such programs. In this paper, we focus on modeling the propagation of selfreplicating programs at its early infection stage since the early infection stage plays an important role on propagation scale and speed later on. We propose an infection-immunization (INIM) model based on the standard Susceptible-Infected-Removed (SIR) epidemic model, and present it using the stochastic techniques. We also analyze the convergence of the stochastic model and compare it with the corresponding deterministic model. Our experiment simulates the propagation of malicious self-replicating programs with immunization. The simulation results match the expected values from our model, which shows a success of our model.