Worm Epidemics in Wireless Adhoc Networks

A dramatic increase in the number of computing devices with wireless communication capability has resulted in the emergence of a new class of computer worms which specifically target such devices. The most striking feature of these worms is that they do not require Internet connectivity for their propagation but can spread directly from device to device using a short-range radio communication technology, such as WiFi or Bluetooth. In this paper, we develop a new model for epidemic spreading of these worms and investigate their spreading in wireless ad hoc networks via extensive Monte Carlo simulations. Our studies show that the threshold behaviour and dynamics of worm epidemics in these networks are greatly affected by a combination of spatial and temporal correlations which characterize these networks, and are significantly different from the previously studied epidemics in the Internet.


I. INTRODUCTION
Worms are self-replicating computer viruses which can propagate through computer networks without any human intervention [1,2,3]. Cyber attacks by this type of viruses present one of the most dangerous threats to the security and integrity of computer and telecommunications networks. The Code Red [4,5] and Nimda [4] worms, for example, infected hundreds of thousands of computers at alarming speeds and the resulting worm epidemics cost both the public and the private sector a great deal of money. The last few years have seen the emergence of a new type of worms which specifically targets portable computing devices, such as smartphones and laptops. The novel feature of these worms is that they do not necessarily require Internet connectivity for their propagation. They can spread directly from device to device using a short-range wireless communication technology, such as WiFi or Bluetooth [4,6,7,8], creating in their wake an adhoc contact network along which they propagate. The first computer worm written specially for wireless devices was detected in 2003 and within three years the number of such viruses soared from one to more than 300 [8]. With wireless networks becoming increasingly popular, many security experts predict that these networks will soon be a main target of attacks by worms and other type of malware. [8].
Worm and virus attacks on the Internet have been the subject of extensive empirical, theoretical and simulation studies [1,9,10,11,12]. These studies have greatly contributed to our understanding of the impact of network topology on the properties of virus spreading [9,10] and have inspired the design of more effective immunisation strategies to prevent and combat Internet epidemics [11,12]. Investigation of virus spreading in wireless networks in general and worms in particular is, however, at its infancy, and there has been very limited studies which address this problem [7,13].
In this paper we develop a new model for the spreading of worms in Wi-Fi-based wireless adhoc networks and investigate the properties of worm epidemics in these networks via extensive Monte Carlo simulations. Wireless adhoc networks [14,15,16,16,17,18] are distributed networks which can be formed on the fly by WiFi-equipped devices, such as laptops and smartphones. Nodes in these networks communicate directly with each other and can route data packets wirelessly, either among themselves or to the nearest Internet accesspoint. Adhoc technology has important applications in the provisioning of ubiquitous wireless Internet access, disaster relief operations and wireless sensor networks. From the perspective of complex network theory [20,21,22,23] the study of these networks is important as their topology provides a clear-cut example of spatial networks [24]. Spatial networks are embedded in a metric space where interactions between the nodes is a function of their spatial distance [24,25]. Despite their relevance to many real-life phenomena the properties of these networks are much less studied than abstract graphs.
Our Monte Carlo simulations show that epidemic spreading in wireless adhoc networks is significantly different from the previously studied epidemics in the Internet. The initial growth of the epidemic is significantly slower than the exponential growth observed for worm spreading in the Internet, and the epidemic prevalence exhibits a density-dependent critical threshold which is higher than the value predicted by the mean-field theory. We show that these differences are due to strong spatial and temporal correlations which characterise these networks. Our study also reveals the presence of a selfthrottling effect in the spreading of worms in wireless networks which greatly slows down the speed of worm invasion in these networks.
The rest of this paper is organised as follows. In section II we describe our models of network topology, data communication mechanism, and worm spreading in wireless adhoc networks. In section III we present and discuss results of our Monte Carlo simulations studies of epidemics in these networks for a range of device densities and infection rates. We close this paper in section IV with conclusions.

A. Network model
We consider a collection of nodes distributed in a two dimensional plane which communicate using short-range radio transmissions. The received radio signal strength at a device j resulting from a transmission by a device i decays with the distance between the sender and the receiver due to a combination of free-space attenuation and fading effects. Phenomenologically this effect is described using the so-called pathloss model [26] which states that the mean value of the signal power at a receiving device j is related to the signal power of the transmitting node i via the following equation: In the above equation r ij is the Euclidean distance between node i and node j, P i and P ij are the transmit power and the received power, respectively, and c is a constant whose precise value depends on a number of factors including the transmission frequency. For free space propagation α = 2, but depending on the specific indoor/outdoor propagation scenario it is found empirically that α can vary typically between 2 and 5. A data transmission by node i is correctly received at node j, i.e. i can establish a communication link with j, provided that: In the above equation β th is an attenuation threshold and ν is the noise level at node j. Condition (2) translates into a maximum transmission range for node i: such that each device can establish wireless links with only those devices within a circle of radius r i t . A communication graph is then constructed by creating an edge between node i and all other nodes in the plane that are within the transmission range of i, and repeating this procedure for all nodes in the network. In general wireless devices may use different transmit powers such that the existence of a wireless link from i to j does not imply that a link from j to i also exists. Consequently the resulting communication graph is directed. Assuming, however, that all devices use the same transmit power P , and a corresponding transmission range r t , the topology of the resulting network can be described as a two dimensional random geometric graph (RGG) [27,28]. Random geometric graphs have been used extensively in the study of continuum percolation and more recently for modelling wireless adhoc networks [15,16,17,18,19]. Like Erdős-Rényi random graphs (RG) [30], these graphs have a Poisson degree distribution, P (k), which peaks at an average value k and shows small fluctuations around k . However, other properties of a RGG are radically different from a Erdős-Rényi random graph. Most notably, these networks are characterised by a large cluster coefficient, C = 0.59, which is a purely geometric quantity independent of both node density and k [15,28]. Furthermore, it has been shown numerically that the critical connectivity in these networks is at k = 4.52 [28], which is much higher than the well-known k = 1 value in RG.

B. Medium access control
In WiFi networks access to the available frequency channels is controlled by a coordination mechanism called the Medium Access Control (MAC) [29]. The function of the MAC is to ensure interference-free wireless transmissions of data packets in the network. This is achieved by scheduling in time the transmissions of nearby devices in such a way that devices whose radio transmissions may interfere with each other do not get access to the wireless channel at the same time. The presence of the MAC introduces novel spatio-temporal correlations in the dynamics of data communications in these networks which are absent in the Internet communications.
The MAC protocol used by WiFi-based wireless devices follows the IEEE 802.11 standard [29], which specifies a set of rules that enable nearby devices coordinate their transmissions in a distributed manner. The IEEE 802.11 MAC is a highly complex protocol and we do not attempt to fully model this protocol. Instead we focus on the most relevant aspect of this protocol, the so-called listen-before-talk (LBT) rule. This rule dictates that each device should check the occupancy of the wireless medium before starting a data transmission and refrain from transmitting if it senses that the medium is busy. The precise implementation of the LBT algorithm will be discussed in section II.D.

C. Worm propagation model
Worms are stand-alone computer viruses which use networks for their spreading among computing devices.
Consequently, computer worms can propagate automatically from device to device, in contrast to other types of virus which require some form of user involvement for their spreading.
Several previous studies have analysed and modelled the propagation of computer worms on the Internet. Most contemporary Internet worms work as follows [4]. When a computer worm is fired into the Internet, it scans the IP (Internet Protocol) addresses and sends a probe to infect the corresponding machines. When a vulnerable machine becomes infected by such a probe, it begins running the worm and tries to infect other machines. A patch, which repairs the security holes of the machine, is used to defend against worms. When an infected or vulnerable machine is patched against a worm, it becomes immune to that worm. There are several different scanning mechanisms that worms deploy. Two main mechanisms are random scanning and local subnet scanning. In random scanning an infected computer scans the entire IP address space and selects its targets randomly from this space. In local scanning the worm scans the nearby targets (e.g. machines on the same subnet) with a higher probability. Many recent worms, such as Code Red v2 have used localised scanning.
The above mechanisms require that both the infected and the vulnerable nodes are connected to the Internet and rely on the IP routing mechanism for worm delivery. However, it is well-known that point-to-point routing of data packets in wireless adhoc networks could be problematic due to the highly dynamic nature of these networks. A much more robust mechanism for disseminating packets in such networks is by multihop forwarding in which a packet propagates in the network by broadcast radio transmissions from device to device, without the need for any routing mechanism or Internet connectivity. This mechanism shows interesting analogies with the way airborne diseases spread in populations and has been exploited in a recent worm attack on Bluetooth-enabled smartphones [8]. We assume therefore that worms targeting these networks will utilise multihop broadcasts as their primary method of propagation. With respect to an attacking worm, we assume that nodes in the network to be in one of the following three states: vulnerable, infected, or immune. Infected nodes try to transmit the worm to their neighbours at every possible opportunity. Vulnerable nodes can become infected at a rate λ when they receive a transmission containing a copy of the worm from an infected neighbour. Finally, infected nodes get patched and become immune to the worm at a rate δ. We denote by S(t), I(t) and R(t) the population of vulnerable, infected and immune nodes, respectively.

D. Implementation
In our simulations we have implemented the above model of worm spreading in wireless adhoc networks in the following way. At each timestep of simulations we create a randomly ordered list of the infected nodes in the network at that timestep. The first node on the list then gets access to the wireless channel and is allowed to transmit the worm. All other infected nodes that are within the transmission range of this node are eliminated from the list as their transmission may cause interference to that node, and is therefore blocked by the LBT rule. This procedure is repeated for the remaining nodes until the list is reduced to a set of non-interfering infected nodes which can transmit the worm at that same timestep.
Subsequently, all infected nodes which are on the above list go through a broadcast round in which they transmit the worm to their neighbours. Finally, all infected nodes (i.e. both those who were able to transmit the worm and those whose transmissions were blocked by the MAC protocol) go through a patching round in which they may become immune with probability δ.

III. SIMULATION STUDIES
We simulated the propagation of worms in wireless adhoc networks comprising N devices spread in a L 2 = 1000 × 1000 m 2 area. The transmission range of all devices was set at 50 m, which is somewhere between the typical minimum (30 m) and maximum (100 m) range of the WiFi systems. In order to investigate the impact of device density we performed our simulations for a range of densities, corresponding to N = 4000, 6000, 8000, 10000, 20000.
For a given density, nodes were distributed randomly and uniformly in the simulation cell. The resulting RGG networks were constructed following the prescription of Sec. II. A, and periodic boundary conditions were used in order to reduce finite-size effects. We verified numerically that all the networks considered were connected, and their degree distributions were well-described by the Poisson distribution: with the average degree, k , given by: where ρ = N/L 2 is the device density. The spreading dynamics was simulated on top of the above networks using Monte Carlo simulations. Each Monte Carlo run starts by infecting a single randomly chosen node and proceeds following the rules described in sections II.C and II.D until the epidemic dies out (i.e. no infected node is left in the network). We typically average our results over 500 Monte Carlo runs. Furthermore, the results were also averaged over simulations starting from at least 5 different initial infected seeds. Since the time scale of the epidemic spreading depends only on the ratio λ/δ, rather than λ and δ separately, without the loss of generality we set the patching rate at δ = 1 and performed our simulations for a range of values of the infection rate, λ.
In order to investigate the impact of the MAC on worm epidemics all simulations were performed both in the presence and in the absence of this mechanism. The latter case corresponds to an idealised scenario where nearby devices can communicate with each other without causing harmful interference, for example by using nonoverlapping frequency channels [34], and maps the dynamics of worm spreading onto the standard susceptibleinfected-removed (SIR) epidemic model. Finally, as a point of reference, we also performed simulation studies of the SIR model on a set of Erdős-Rényi random graphs which were constructed such that their degree distribution virtually coincided with that of our RGG networks. In the following we shall refer to our full simulations as RGG+MAC while simulations in the absence of MAC will be labelled as RGG and those performed on random graphs as RG. For future reference we note that the SIR epidemic on random graphs roughly mimics the spread of Internet worms via random scanning, and is well-described by the mean-field theory.

A. Prevalence and epidemic threshold
A key quantity in the study of epidemics in networks is the epidemic prevalence. For the SIR-type epidemics this quantity is defined as R ∞ = lim t→∞ R(t)/N [31]. In Fig. 1 prevalence as a function of λ is shown as obtained from our simulations of, respectively, RG, RGG and RGG+MAC networks comprising N = 10000 nodes. It can be seen that in all these networks R ∞ exhibits a  critical threshold λ c below which a worm cannot spread in the network and above which it infects a finite fraction of the nodes. However, the epidemic threshold corresponding to RGG is at a considerably higher value than that of RG, despite the fact that the degree distributions of these two networks are identical. Furthermore, it can be seen that the inclusion of the MAC mechanism results in an increase in the value of the epidemic threshold in RGG, shifting the position of λ c even further away from the RG value. Our computed epidemic thresholds for the above networks are λ = 0.0140, 0.0210, 0.0265 for RG, RGG and RGG+MAC, respectively. The meanfield theory, which in the infinite system size limit becomes exact for the RG network, predicts an epidemic threshold at λ c = 1/ k [31,32] , yielding λ c = 0.0127 for the above networks. This is in good agreement with our Monte Carlo result for the RG network, indicating that the above differences between λ c in RG, RGG and RGG+MAC are not due to finite-size effects (or statistical fluctuations) but are caused by a combination of topological and dynamic correlations in our wireless networks, which are absent in RG. Qualitatively, we can understand the above results by noting that due to spatial ordering in random geometric graphs, the epidemic state of a node in a RGG is strongly correlated to the state of its neighbours. These correlations reduce the so-called reproductive rate of the epidemic, the average number of new infections that can be produced by an infective node, below the value predicted by the mean-field approximation, hence increasing λ c above the mean-field value. The presence of the MAC introduces additional temporal correlations between the transmission times of adjacent infective nodes which further reduce the reproductive rate, hence further increasing λ c above the mean-field value. It can be seen from Fig.1 that this latter mechanism not only affects λ c but also results in a significant reduction in the epidemic prevalence.
Next we investigate the impact of node density, ρ, on the behaviour of epidemic prevalence in our networks. In Fig. 2 we plot R ∞ as function of λ for different device densities. Results are shown only for RGG but they show a similar behaviour for RGG+MAC. It can be seen that for all densities considered the prevalence shows a critical behaviour. However, the position of λ c decreases monotonically with increasing density, i.e. the worm epidemic is more successful in invading the network when the density of devices is high and less so when density is low. In order to better understand the density dependent behaviour of R ∞ we plot in Fig. 3 this quantity as function of κ = λ k = λπρr 2 t . It can be seen that for RGG there is a good collapse of curves in an extended region around the threshold. This indicates that in this region the prevalence of the SIR model on RGG is welldescribed by the scaling relation R ∞ (λ, ρ) = f (κ) (For RGG+MAC this scaling holds only approximately). In particular, we find that the epidemic threshold itself can be written as: with κ c = 1.50, a correction to the mean-field model resulting from spatial correlations in RGG. Since the cluster coefficient, C, is a measure of correlations in a network, we note that the value of κ is in fact very close to 1/C indicating that the departure from the mean-field model is possibly controlled by this quantity. Next, we investigate the dependence of the epidemic prevalence on device density. In Fig. 4 this quantity is plotted as a function of N and for λ = 0.1, both in the presence of MAC and when this mechanism is switched off. It can be seen that in both cases R ∞ increases monotonically with increasing node density. Furthermore, for all values of N the curve corresponding to RGG+MAC lies below that of RGG. However, the gap between the two curves decreases as N is increased, indicating that the impact of MAC on R ∞ becomes less significant at high densities.

B. Spreading dynamics
Finally, we discuss the propagation dynamics of worms in our networks. Fig. 5 displays, as an example, time evolution of the total fraction of infected nodes, I(t)/N , in the N = 10000 node network and for λ = 0.1. For comparison we have also plotted the result obtained for the corresponding random graph network. As can be seen from Fig. 5 worm spreading on the RGG network takes place at a much slower pace than on the RG network. In particular, the initial growth of the epidemic on RGG is much slower than the exponential growth seen for RG, which is a hallmark of mean-field models [33] and is also observed in epidemics in the Internet [2].
The above slow growth of the epidemic on the RGG is a purely topological effect, which we attribute to a combination of spatial correlations and high clustering in this network. As can be seen from Fig. 5 switching on the MAC protocol in RGG slows down the epidemic on this network even further. This effect, which we call self-throttling, is caused by temporal correlations in the spreading dynamics introduced by the MAC and has also been observed in a recent study of IP-based worm spreading in mobile adhoc networks [7]. It results because adjacent infective devices compete with each other in accessing the shared wireless medium, hence effectively blocking each other's broadcasts and slowing down the overall progress of the epidemic. In Fig. 6 we display our result for R(t)/N in the N = 10000 networks, which further demonstrates the great impact of spatial and temporal correlations on the spreading process in our wireless networks.
Next we discuss the impact of device density on the speed of worm propagation. As an indicator of the speed we use the position of the peak in I(t)/N , which we call T max . This quantity is plotted in Fig. 7 as a function of N , both in the absence and presence of MAC. It can be seen that both curves show a monotonic decrease with increasing node density. Furthermore, we see that the selfthrottling mechanism is most effective in slowing down the epidemic at the lowest density, where we observe a ∼ 40% increase in T max when MAC is switched on. As density increases the gap between the two curves becomes initially smaller before settling down at higher densities.

IV. CONCLUSIONS
In this paper we introduced a model for the propagation of a new class of computer worms which specifically target wireless computing devices. Using extensive  Monte Carlo simulations we investigated the epidemic spreading of such worms in WiFi-based wireless adhoc networks. We incorporated the spatial topology of these networks via a random geometric graph model, and also took into account the impact of the Medium Access Control on wireless data communications in these networks. Our studies show that worm epidemics in wireless adhoc networks are greatly different from the previously studied epidemics in the Internet. The epidemic threshold was found to be density-dependent and for all densities considered significantly higher than the value predicted by the mean-field theory. Furthermore, the initial growth of the epidemic was found to be significantly slower than the exponential growth observed in Internet  epidemics and predicted by the mean-field theory. We showed that these differences were due to a combination of spatial and temporal correlations which are inherent to wireless data networks. Our study also revealed the presence of a self-throttling mechanism which results from a competition between adjacent infected devices for access to the shared wireless medium. This mechanism greatly reduces the speed of worm propagation and the risk of large-scale worm epidemics in these networks. An understanding of the propagation characteristics of worm attacks on wireless networks is of great importance for the design of effective detection and prevention strategies for these networks. The work presented in this paper is a first step in this direction and, we hope, will inspire future empirical and theoretical investigations. From the perspective of complex network theory, our work presents an extensive study of epidemic spreading in random geometric graphs, and highlights the important role that spatial correlations play in dynamic processes on these and other spatial networks.