# Reliability Evaluation for Clustered WSNs under Malware Propagation
## 1 Introduction  
Wireless Sensor Networks (WSNs) play an important role in daily life, as numerous modern information systems rely on WSNs, which consist of many sensor nodes with limited computation, storage, and communication resources. WSN applications include environmental, highway, and patient health monitoring as well as other commercial uses [1]. To realize these applications, the research community has focused on ensuring the reliability of WSNs. By definition, _reliability_ reflects the ability of a system or component to perform its required functions under stated conditions for a specified period of time. Due to the nature of data collection in WSNs, this ability has been a major challenge in applying WSNs for successful monitoring. All sensor nodes need to send their sensed data towards the sink. Hence, packet loss due to transmission errors, packet collisions, interference, node failures, and malicious attacks is common [2]. Therefore, reliability evaluation for WSNs is vital in order to guarantee the delivery of sensed data from sensor nodes to the sink. In addition,reliability evaluation is crucial for maintaining sensor nodes' functionality as nodes face attacks from self-replicating malicious code (_malware_ for short). In practice, WSNs are prone to malware propagation [3] for two reasons. First, sensor nodes have similar hardware and software, which results in large-scale malware propagation if even one sensor node is compromised. Second, there are several over-the-air reprogramming protocols (such as Trickle, Firecracker, Deluge, and MNP) that reconfigure sensor nodes without physical contact. Such protocols provide an opportunity for malware to spread across WSNs. Hence, WSNs' reliability needs to be evaluated under epidemic-malware propagation conditions. This article focuses on such evaluation. Epidemic models are borrowed from epidemiology to describe malware propagation in WSNs, since there are strong similarities between biological viruses' self-replication and malware propagation. Classical epidemic models that have attracted much attention in the scientific community are classified among several families. The first family, the Susceptible-Infected (SI) model, is suitable for situations where nodes are either susceptible or infected. In this model, the state transition of any node is only from state _Susceptible_ (\(S\)) to state _Infected_ (\(I\)) and it is assumed that infected nodes remain in state \(I\) forever. The second family, the Susceptible-Infected-Susceptible (SIS) model, considers a susceptible node's infection with a certain probability when it comes into contact with another infected node. Unlike the SI model, an infected node can be removed with a different probability, becoming susceptible again. The third family, the Susceptible-Infected-Removed (SIR) model, adds the state _Removed_ (\(R\)) by extending the SI model. In this model, a susceptible node can be infected only once, since a node transforming from state \(I\) to state \(R\) becomes immune and is hence unable to propagate malware to other susceptible nodes. A continuous-time Markov chain (CTMC) provides considerable flexibility for modeling state transitions of sensor nodes, which is suitable for illustrating malware propagation. In general, when the CTMC is used, it includes a set of discrete states and is formally described by a state-transition-rate diagram. The diagram indicates possible states of a sensor node along with directed arcs that characterize transition rates between states. Since malware actions lead to state transitions in a CTMC, it shows the process of malware propagation. However, the CTMC, which is only one type of stochastic model, is insufficient for correctly treating malware infections that often result in security failures for sensor nodes. Malware residing in an infected sensor node always intentionally propagates itself to other susceptible sensor nodes; thus, such infections cannot be modeled as a stochastic process.