# Threat Analysis for Smart Homes +
## 6 Attack Model Graph Representation  
The threat analysis presented in Section 4.2 identified different threats that can arise as a result of malware infection of the smart home's network. To delve deeper into the study of such threats, we first developed the smart home network topology modeling algorithm described in Section 5, and then studied the malware propagation in the Smart Home infrastructure. To correctly study and visualize the effects that dynamic changes on a network have on specific security threats, we developed an attack model designed on the smart home networks generated by the topology generator. The attack model focuses on representing malware propagation. The model developed in this work is based on the discrete state Markov model presented by [PERSON] et al. [25] with additional considerations about spatial-temporal dependencies. Figure 6 describes the state-change process of our model. Figure 4: Generated network topology, with node SP01, corresponding to a smartphone device, highlighted. Figure 5: Node _SP01_ (highlighted) has moved from its original position. This caused the loss of the connection from _PC02_ and simultaneously the creation of a new connection with node _TIoT08_. Our model assumes that a recovered node can either remain healthy or become vulnerable again after a certain time interval. In addition, our model considers the existence of a fifth state, namely the intermittent state. If a node is in the intermittent state at time \(t\), after an interval of time \(\Delta t\), it may either remain in the intermittent state or transit back to the state it was at \(t-1\). The rate for the state-transitions are determined by a set of parameters. Table 4 describes these parameters and their constraints. The rates are used to determine the set of conditional probability functions of Equation (1), where each state is associated with a state (\(v\) = vulnerable, \(i\) = infected, \(q\) = quarantined, \(h\) = healthy, and \(i\) = intermittent). \[ \begin{split} P(X(t+1)=v|X(t)=v)=1-\beta-\frac{\beta*n(inf)}{n}- \theta,\\ P(X(t+1)=i|X(t)=i)=1-\delta-\theta,\\ P(X(t+1)=q|X(t)=q)=1-\beta-\alpha-\theta,\\ P(X(t+1)=h|X(t)=h)=1-\gamma-\theta,\\ P(X(t+1)=i|X(t)=v,i,q,i)=\theta.\end{split}  \tag{1}\]  
In addition to the intermittent property, the property of spatial dynamicity has also been added to specific nodes. These nodes have been assigned a _dynamic_ attribute that allows them to move from their current location to a different location after an interval of time \(\Delta t\). At every iteration, the algorithm selects whether a dynamic node will be moved from its current position to a new position. Figures 7-10 show sample outputs of the final algorithm. \begin{table}
\begin{tabular}{c l l} \hline \hline \multicolumn{3}{c}{**Input List**} \\ \hline
**Parameter** & **Description** & **Conditions** \\ \hline Birthrate (\(\beta\)) & Integer value corresponding to the the probability a vulnerable node & \(0\leq\beta\leq 1\) \\  & has of getting infected & \\ \hline Death rate (\(\alpha\)) & Integer value corresponding to the probability of a quarantined node & \(0\leq\alpha\leq 1\) \\  & to recover and be removed from the virus & \\ \hline Detection rate (\(\beta\)) & Integer value corresponding to the probability of the internal defense & \(0\leq\delta\leq 1\) \\  & mechanisms of each system to detect infections and put the virus into & \\  & isolation & \\ \hline Vulnerability rate (\(\gamma\)) & Integer value corresponding tothe probability of a recovered node to & \(0\leq\gamma\leq 1\) \\  & return to the vulnerable state & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Attack model parameters table. Figure 6: Diagram of the state transitions. Figure 8: Node-state graph at time \(t=3\). The dynamic node \(1\) has been selected to move after the next time interval, hence its current edges are highlighted. Figure 7: Node-state graph at time \(t=0\).