# Build-Launch-Consolidate Framework and Toolkit for Impact Analysis on Wireless Sensor Networks
## 4 Case Study: Analyzing Flooding Attack
### Results and Analysis  
The outcomes of our experiment are summarized in Table 4, where we compare the results of each attack scenario to the baseline for the respective network layout. For each metric, a darker red shading for a cell indicates a larger deviation from the most favorable reading. We distinguish both layouts in the baseline scenario. We note that both performed differently, with the binary topology being the most efficient across all metrics. Starting with PDR, we note that on average, it was marginally better in the binary layout compared to the grid layout. After a closer look at Figure 7, we can determine that the marginal difference is mainly driven by the extended time needed to build the grid layout and its DODAG because both layouts performed virtually the same after minute 3. For the average E2E delay, we noted significant delays in the grid layout equal to 35% more compared to the binary layout. The delays were particularly higher for the first 3 min but rapidly decreased thereafter and slightly fluctuated throughout the rest of the simulation, as visible in Figure 8. However, the grid layout still experienced more delays more often than not on average compared with the binary network. Last, we can see that the binary network showed more efficient power consumption compared to the grid layout throughout the experiment, as illustrated in Figure 9. In fact, there were periods when the power consumption for the grid layout was double and triple that for the binary (e.g., minutes 1, 6, and 21). Over the duration of the experiment, the grid layout had a 46% higher power consumption rate compared to the binary. We attribute this to the increased exchange of control messages in the grid layout because of its increased density. The results consolidated by our consolidator (shown in Table 4) show that both layouts were impacted when exposed to flooding attacks to a varying degree. To facilitate quick analysis, particularly for larger experiments, the background color of the cells gets redder as the score gets worse for each metric. We note that the grid layout was more impacted by the attack when compared to the binary layout, implying that having more dense networks where a node has more neighbors helps the propagation of the flooding messages to a larger population of the network. Figure 6: Layouts in our experiments highlighting the sinks’ and attackers’ positions. Looking at the network's population to analyze the impact on different nodes can help us better understand the attack's propagation and consider the severity when distributing our sensors and planning our mitigation approach. To that end, we will analyze the changes in each metric for each topology in more detail, leveraging the heatmaps generated by our framework and toolkit. There is one heatmap for each metric-topology-attack combination, where each heatmap plots all nodes as colored circles in their corresponding coordinates. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Scenario**} & \multicolumn{3}{c}{**Binary**} & \multicolumn{3}{c}{**Grid**} \\ \cline{2-7}  & **Avg PDR** & **Avg E2E** & **Avg PC** & **Avg PDR** & **Avg E2E** & **Avg PC** \\  & **(\%)** & **(ms)** & **(mW)** & **(\%)** & **(ms)** & **(mW)** \\ \hline
**Normal** & 98\% & 1027 & 0.52 & 96\% & 1385 & 0.76 \\ \hline
**Flooding** & 79\% & 1177 & 0.80 & 54\% & 2389 & 1.67 \\
**Attack** & \(-\)19\% & +15\% & +55\% & \(-\)44\% & +72\% & +120\% \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Experiment results as shown by the consolidator. Figure 8: E2E performance for grid and normal topologies under normal conditions. Figure 7: PDR performance for grid and normal topologies under normal conditions. Figure 9: PC for grid and normal topologies under normal conditions. and highlights potential links as lines. The sink node is colored in light green, whereas the attacker node is highlighted in pink. Other nodes are labeled with their node number as well as the change in the analyzed metric compared to the normal baseline.