In order to prevent, or at least to reduce the attack of malicious objects we need epidemic models that can accurately capture the main characteristics of such objects, as understanding the transmission of malicious codes is vital for the most effective reactive measures. As mathematical models give a clear view and can be a good help to identify and solve many complex problems, we develop dynamic models for infectious nodes and analyze the effect of anti-virus software in computer network.