# A New Individual-Based Model to Simulate Malware Propagation in Wireless Sensor Networks
## SEIRS-D Agent-Based Model
### Coefficients
#### 3.2.1 Infection Coefficient  
This coefficient defines the probability that malware may compromise a susceptible sensor. In this case, the computational characteristics of a sensor will define the probability that it will be infected by the malware designed to attack the WSN. This coefficient depends on the characteristics of the agents defined in the model; however, it can only affect the sensor agents. Consequently, it will be used in the transition rules to define the compartment state of each sensor.  
The infection coefficient of the \(i\)-th sensor agent at step of time \(t\) is represented mathematically by \(a[i,t]\) where \(1\leq i\leq n\) and \(n\) is the total number of sensors. As a consequence, the probability that the susceptible \(i\)-th sensor agent will be infected at time \(t+1\) is given by the following coefficient:  
\[a[i,t]=\prod_{1\leq j\leq 6,j\
eq 3}X_{j}\left(\vec{k}_{j}\right),\quad 0\leq a [i,t]\leq 1, \tag{1}\]  
where \(\vec{k}_{j}\) is a vector defining the characteristics on which depends the variable \(0\leq X_{j}\leq 1\). As a consequence the probability of infection depends on the 5 factors: \(X_{1},X_{2},X_{4},X_{5}\) and \(X_{6}\), \(X_{1}\) represents the characteristics of the sensors, \(X_{2}\) considers the characteristics of the malware, \(X_{3}\) are the characteristics of the network topology, \(X_{4}\) reflects the characteristics of the phenomenon of interest, \(X_{5}\) represents the characteristics of human action, and \(X_{6}\) considers the characteristics of the devices. The variable \(X_{3}\) has not been considered because the network topology can be directly affected the transmission of malware from a sensor to its neighbours due to the interconnections between neighbour nodes.  
The risk of infection can be calculated using the probabilities \(P_{k,q}\) associated to each possible value of the characteristics of agents (see Table 1). As a consequence if \(\vec{k}_{j}=(\alpha_{1},\alpha_{2},\ldots,\alpha_{m})\) with \(1\leq\alpha_{1}<\alpha_{2}<\ldots<\alpha_{m}\leq 15\), we can state the following:  
\[X_{j}\left(\vec{k}_{j}\right)=\prod_{l=1}^{m}P_{\alpha_{l},q}, \tag{2}\]  
where \(q\) is the value associated to the characteristic \(\alpha_{l}\) in each case.  
In this sense, for each variable \(X_{k}\left(\vec{k}_{j}\right)\) the characteristics with the most considerable influence on the infection process have been selected. For this, different scenarios have been studied in order to determine the possible values that allow the risk of infection to be high, medium or low. For example, a military or industrial environment (where human intervention on the network is low and is more likely to be targeted by attackers) may have a high risk of infection if the following conditions are satisfied:  
* The variable \(X_{1}\left(\vec{k}_{1}\right)\) depends on \(\vec{k}_{1}=(\alpha_{1}=2,\alpha_{2}=5,\alpha_{3}=6,\alpha_{4}=7)\) such that \[X_{1}\left(\vec{k}_{1}\right)=P_{2,2}\cdot P_{5,1}\cdot P_{6,1}\cdot P_{7,1}\] (3) since values \(q=2,1,1\) and \(1\) are considered for \(k=2,5,6,7\) respectively.
* The variable \(X_{2}\left(\vec{k}_{2}\right)\) depends on \(\vec{k}_{2}=(\alpha_{1}=9,\alpha_{2}=10)\) such that \[X_{2}\left(\vec{k}_{2}\right)=P_{9,1}\cdot P_{10,3}\] (4) since values \(q=1\) and \(3\) are considered for \(k=9,10\) respectively.
* The variable \(X_{4}\left(\vec{k}_{4}\right)\) depends on \(\vec{k}_{4}=(\alpha_{1}=13)\) such that \[X_{4}\left(\vec{k}_{4}\right)=P_{13,3}\] (5) since the value \(q=3\) is considered for \(k=13\).  
* The variable \(X_{5}\left(\widetilde{k}_{5}\right)\) depends on \(\widetilde{k}_{5}=\left(\alpha_{1}=14\right)\) such that \[X_{5}\left(\widetilde{k}_{5}\right)=P_{14,1}\] (6) since the value \(q=1\) is considered for \(k=14\).
* The variable \(X_{6}\left(\widetilde{k}_{6}\right)\) depends on \(\widetilde{k}_{6}=\left(\alpha_{1}=15\right)\) such that \[X_{6}\left(\widetilde{k}_{6}\right)=P_{15,3}\] (7) since the value \(q=3\) is considered for \(k=15\).