# Modeling Computer Virus and Its Dynamics

Authors: Mei Peng; Xing He; Junjian Huang; Tao Dong
Journal: Mathematical Problems in Engineering
 (2013)

---

## Abstract

Based on that the computer will be infected by infected computer and exposed computer, and some of the computers which are in suscepitible status and exposed status can get immunity by antivirus ability, a novel coumputer virus model is established. The dynamic behaviors of this model are investigated. First, the basic reproduction numberR0, which is a threshold of the computer virus spreading in internet, is determined. Second, this model has a virus-free equilibrium P0, which means that the infected part of the computer disappears, and the virus dies out, and P0 is a globally asymptotically stable equilibrium if R0<1. Third, if  R0>1 then this model has only one viral equilibrium P*, which means that the computer persists at a constant endemic level, and P* is also globally asymptotically stable. Finally, some numerical examples are given to demonstrate the analytical results.


---

## Body

## 1. Introduction

Computer virus is a malicious mobile code which including virus, Trojan horses, worm, and logic bomb. It is a program that can copy itself and attack other computers. And they are residing by erasing data, damaging files, or modifying the normal operation. Due to the high similarity between computer virus and biological virus [1], various computer virus propagation models are proposed [2–4]. This dynamical modeling of the spread process of computer virus is an effective approach to the understanding of the behavior of computer viruses because on this basis, some effective measures can be posed to prevent infection.The computer virus has a latent period, during which individuals are exposed to a computer virus but are not yet infectious. An infected computer which is in latency, called exposed computer, will not infect other computers immediately; however, it still can be infected. Based on these characteristics, delay is used in some models of computer virus to describe that although the exposed computer does not infect other computers, it still has infectivity [5, 6]. Yang et al. [7, 8] proposed an SLB and SLBS models; in these models, the authors considered that the computer virus has latency, and the computer also has infectivity in the period of latency. However, they do not show the length of latency and take into account the impact of artificial immunization ways such as installing antivirus software. And the newly entered in the internet from the susceptible status to exposed status, the contact rate is the same as that of susceptible status entering into infected status. In this paper, a novel model of computer virus, known as SEIR model, is put forward to describe the susceptible computer which can be infected by the other infected or exposed computer and come into the exposed status. In the SEIR model, based on artificial immunity, we consider the bilinear incidence rate for the latent and infection status. Assume that the computers which newly entered the internet are susceptible, the computers correspond with exposed computers, and their adequate contact rate is denoted by  β1, and computers also correspond with infected computers, and their adequate contact rate is denoted by β2. So, the fraction of the computer which newly entered the internet will enter the class R by anti-virus software; the fraction of computers contact with exposed and infected computer will stay latent before becoming infectious and enter the class E. It is shown that the dynamic behavior of the proposed model is determined by a threshold  R0, and this model has a virus-free equilibrium  P0, and P0  is a globally asymptotically stable equilibrium if  R0<1; if R0>1  this model has only one viral equilibrium  P*, and it is globally asymptotically stable.This paper is organized as follows. Section2 formulates a novel computer virus mode. Section 3 proves the global stability of the virus-free equilibrium. Section 4 discusses the stability of the viral equilibrium. In Section 5, numerical simulations are given to present the effectiveness of the theoretic results. Finally, Section 6 summarizes this work.


## 2. Model Formulation

At any time, a computer is classified as internal and external depending on weather it is connected to internet or not. At that time, all of the internet computers are further categorized into four classes: (1) susceptible computers, that is, uninfected computers and new computers which connected to network; (2) exposed computers, that is, infected but not yet broken-out; (3) infectious computers; (4) recovered computers, that is, virus-free computer having immunity. LetS(t),  E(t),  I(t),  R(t) denote their corresponding numbers at time t, without ambiguity;  S(t),  E(t),  I(t),  R(t) will be abbreviated as  S,  E,  I,  R, respectively. The model is formulated as the following system of differential equations:
(1)S′=(1-p)N-β1SI-β2SE-pS-μS,E′=β1SI+β2SE-kE-αE-μE,I′=αE-rI-μI,R′=pS+kE+rI,(2)N(t)=S(t)+E(t)+I(t)+R(t).We may see that the first three equations in (1) are independent of the fourth equation, and therefore, the fourth equation can be omitted without loss of generality. Hence, system (1) can be rewritten as
(3)S′=A-β1SI-β2SE-aS,E′=β1SI+β2SE-bE,I′=αE-cI.Therefore,(4)a=p+μ,b=k+α+μ,c=r+μ,(1-p)N=A,
where N denotes the rate at which external computers are connected to the network;  p  denotes the recovery rate of susceptible computer due to the anti-virus ability of network;  k  denotes the recovery rate of exposed computer due to the anti-virus ability of network;  β1  denotes the rate at which, when having a connection to one infected computer, one susceptible computer can become exposed but has not broken-out;  β2  denotes the rate of which, when having connection to one exposed computer, one susceptible computer can become exposed;  α  denotes the rate of the exposed computers cannot be cured by anti-virus software and broken-out;  r  denotes the recovery rate of infected computers that are cured;  μ  denotes the rate at which one computer is removed from the network. All the parameters are nonnegative.Moreover, all feasible solutions of the system (3) are bounded and enter the region  D, where
(5)D={(S,E,I)∈R+3∣S≥0,E≥0,I≥0,S+E+I≤Aa}.Referring to [9], we define the basic reproduction number of the infection as
(6)R0=A(β1α+β2c)abc.For system (3), there always exists the virus-free equilibrium which is  P0(A/a,0,0); if  R0>1, then there also exists a viral equilibrium  P*(S*,E*,I*).Therefore,(7)S*=AaR0,E*=A(R0-1)bR0,I*=Aα(R0-1)bcR0.


## 3. The Virus-Free Equilibrium and Its Stability

Theorem 1.
P
0  is locally asymptotically stable if R0<1. Whereas P0  is unstable if  R0>1.Proof.
The characteristic equation of (3) at  P0  is given by
(8)det(λ+a-β2S-β1S0λ-(β2S-b)β1S0αλ+c)=0,
which equals to
(9)(λ+a)[λ2-(β2S0-b-c)λ-bc(R0-1)]=0.
Then, (9) has negative real part characteristic roots:
(10)λ1=-a,λ2,3=(β2S-b-c)±(β2S-b-c)2+4abc(R0-1)2,
where
(11)β2S-b-c<0.
WhenR0<1, there are no positive real roots of (9) and thus P0 is a local asymptotically stable equilibrium. While  R0>1, (9) has positive real roots, which means P0 is unstable.
The proof is completed.Theorem 2.
P
0  is globally asymptotically stable with respect to D  if  R0<1.Proof.
LetL=((β1c+β2α)/bc)E+β2I/c.
Obviously(12)L>0,
thus
(13)L′=(β1c+β2α)bcE′+β2cI′=(β1c+β2α)bc(β1SI+β2SE-bE)+β2c(αE-cI)=(β1c+β2α)bc(β1I+β2E)S-(β1c+β2α)bcbE+β2αEc-β2I=(β1c+β2α)bc(β1I+β2E)S-β1E-β2I=(β1E+β2I)[(β1c+β2α)bcS-1]=(β1E+β2I)[1bc·Aa·R0abcA-1]=(β1E+β2I)(R0-1)<0.
The proof is completed.


## 4. The Viral Equilibrium and Its Stability

Theorem 3.
P
* is locally asymptotically stable if R0>1.Proof.
The Jacobin matrix of system (3) about P* is given by
(14)J*=(-aR0-β2S*-β1S*a(R0-1)β2S*-bβ1S*0α-c),
which equals to
(15)f(λ)=a0λ3+a1λ2+a2λ+a3=0,
where
(16)a0=1,a1=aR0-(β2S*-b-c)>0,a2=abR0+acR0-aβ2S*>abR0+acR0-a(b+c)=a(b+c)(R0-1)>0,
where
(17)β2S*<b+c,a3=abc(R0-1)>0.
Thus,
(18)Δ1=a1>0,Δ2=|a11a3a2|=a1a2-a3>0,Δ3=|a110a3a2a100a3|=a3(a1a2-a3)>0.
According to the Hurwitz criterion, all roots of (15) have negative real pats. Thus, the claimed result follows. The proof is completed.The following result can be proved in the same way (see [9]).Theorem 4.
P
* is uniquely globally asymptotically stable if  R0>1.Proof.
The Jacobin matrix of system (3) about P* is given by
(19)J*=(-aR0-β2S*-β1S*a(R0-1)β2S*-bβ1S*0α-c).
The second compound matrixJ[2] of the Jacobin matrix can be calculated as follows (see [10, 11]):
(20)J[2]=(-aR0+β2S*-bβ1S*β1S*α-aR0-c-β2S*0a(R0-1)β2S-b-c).
Set P as the following diagonal matrix:
(21)P(x)=(1,EI,EI).
Denote that(22)PfP-1=diag(0,E′E-I′I,E′E-I′I).
Therefore, the matrixB=PfP-1+PJ[2]P-1 can be written in the following block form:
(23)B=(B11B12B21B22),
with
(24)B11=-aR0+β2S*-b,B12=IEβ1S*(1,1),B21=EI(α,0)T,B22=(E′E-I′I-(aR0+c)-β2S*a(R0-1)E′E-I′I+(β2S*-b-c)),
thus
(25)μ1(B11)=β2S*-aR0-b,μ1(B22)=max{E′E-I′I-aR0-c+aR0-a,E′E-I′I+β2S*-b-c-β2S*}=E′E-I′I-c-a.
The vector norm ∥·∥ in R3≅R(32) is choosen as
(26)∥(u,v,w)∥=max{|u|,|v+w|}.
The Lozinskii measure μ(B) with respect to ∥·∥ is as follows (see [12]):
(27)μ(B)≤sup{g1,g2},
where
(28)g1=μ1(B11)+|B12|=β2S*-aR0-b+IEβ1S*,g2=μ1(B22)+|B21|=E′E-I′I-a-c+EIα.
From (3), we find that
(29)IEβ1S*=E′E-β2S*+b,I′I=EIα-c,
thus
(30)g1=E′E-aR0,g2=E′E-a.
Relations (28)–(30) imply that
(31)μ(B)≤E′E-a.
Thus,
(32)1t∫0tμ(B)dτ≤1t∫0t(E′E-a)dτ=1tlnE(t)E(0)-a.
IfR0>1, then the virus-free equilibrium is unstable by Theorem 1. Moreover,  the behavior of the local dynamic near  D0  as described in Theorem 1 implies that the system (3) is uniformly persistent in D; that is, there exists a constant c1>0 and T>0, such that t>T  implies that
(33)limt→∞infS(t)>c1,limt→∞infE(t)>c1,limt→∞infI(t)>c1,limt→∞inf[1-S(t)-E(t)-I(t)]>c1.
For all (S(0),E(0),I(0)∈D) (see [13, 14]),
(34)q-=limt→∞supsupx∈K1t∫0tμ(B)dτ≤-a2<0.
The proof is complete.


## 5. Numerical Examples

For the system (3), Theorem 2 implies that the virus dies out if  R0<1, and Theorem 4 implies that the virus persists if  R0>1. Now, we present two numerical examples.Letp=0.5,  μ=0.02,  k=0.4,  α=0.6,  r=0.6,  N=100,  β1=0.7,  β2=0.8,  then  R0=13.8>1 and  βS*<b+c; Figure 1 shows the solution of system (3) when  R0>1. We can see that the viral equilibrium P* of system (3) is globally asymptotically stable.Figure 1
Dynamical behavior of system (3). Time series of susceptible, exposed, and infectious computers S(t),  E(t),  I(t) with R0>1.Letp=0.7,  μ=0.001,  k=0.02,  α=0.09,  r=0.04,  N=10,  β1=0.002,  β2=0.003,  then  R0=0.1808<1 and  β2S0<b+c; Figure 2 shows the solution of system (3) when R0<1. We can see that the virus-free equilibrium  P0 of the system (3) is globally asymptotically stable.Figure 2
Dynamical behavior of system (3). Time series of susceptible, exposed, and infectious computers S(t),  E(t),  I(t) with R0<1.


## 6. Conclusion

We assume that the virus process has a latent period and in these times the infected computers have infectivity also. A compartmental SEIR model for transmission of virus in computer network is formulated. In this paper, the dynamics of this model have been fully studied.The results show that we should try our best to makeR0 less than 1. The most effective way is to increase the parameters p,  k,  r and decrease β1,  β2,  α and so on. Maybe in such way, the computer virus can be well predicted and thus controlled.



---

*Source: 842614-2013-06-26.xml*