# Securing Wireless Sensor Networks Using Machine Learning and Blockchain: A Review
## 5 Cyberattacks in WSN Contexts  
Cyberattacks are the greatest challenge facing communication networks worldwide. The threat of cyberattacks affects any network's connectivity, availability, reliability, and confidentiality, limiting its efficient use. Mitigating this challenge is essential, especially because the frequency and the nature of attacks have increased tremendously over time [41]. For this reason, cyberattacks targeting WSNs have been the focus of several recent studies in the literature [42; 43; 44; 45; 46]. Cyberattacks occur when good nodes are communicating over a communication link and intruder or eavesdropper nodes interfere with or disturb that link. This malicious activity usually aims to obtain, alter, or prevent the flow of data within the network using different means; therefore, this activity should be prevented, detected, and mitigated in order to maintain a reliable communication channel [47]. Malicious acts targeting WSNs have been classified in the literature in different ways: the first classification divides attacks into active or passive attacks; the second classification is based on the physical location of the attack relative to the network's physical position, using this distinction to divide attacks into inside or outside attacks; and the third classification is based on the disrupted stack Open Systems Interconnection (OSI) layer, dividing attacks into physical layer, data link layer, and network layer attacks [42; 48]. Table 2 classifies a selection of classical attacks targeting WSNs and provides their definitions. \begin{table}
\begin{tabular}{p{42.7 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \multirow{2}{*}{**Attack Type**} & **Affected Stack Layer** & \multirow{2}{*}{**Attack Name**} & \multirow{2}{*}{**Definition**} \\ \hline \multirow{8}{*}{Active} & \multirow{8}{*}{Multi-layer} & Man-in-the-Middle & A malicious node intercepts a message passing between two sensor nodes with the aim of modifying, injecting, or deleting content before relaying the message again. \\ \cline{3-4}  & & Denial-of-Service & An attacker performs malicious activities to prevent original users from accessing system resources. \\ \cline{3-4}  & & Distributed Denial-of-Service & A more powerful version of DoS attack that overwhelms the targeted nodes with excessive messages to exhaust their resources, leading to a system overload that prevents it from answering some or all legitimate messages. \\ \cline{3-4}  & & Deluge & An attacker tries to remotely reprogram a sensor node. \\ \cline{3-4}  & & Misdirection & An attacker forwards packets to the wrong destinations or paths by misdirecting packets or altering routes towards a malicious node. \\ \hline \end{tabular}
\end{table} 
Table 2: Classification of cyberattacks on WSNs. \begin{table}
\begin{tabular}{p{42.7 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Attack Type** & \begin{tabular}{c} **Affected** \\ **Stack** \\ **Layer** \\ \end{tabular}  & **Attack Name** & **Definition** \\ \hline \hline \multirow{8}{*}{ \begin{tabular}{} \end{tabular}  } & \multirow{8}{*}{ \begin{tabular}{} \end{tabular}  } & \multirow{8}{*}{\ \begin{tabular}{} \end{tabular}  } & \begin{tabular}{} \end{tabular}  \\  & & & \\ \cline{1-1}  & &  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Attack** & **Affected** & & \\
**Type** & **Stack** & **Attack Name** & **Definition** \\  & **Layer** & & \\ \hline \hline \multirow{6}{*}{Spoofing} & & & An attacker analyzes traffic using a traffic pattern analysis algorithm to recognize the nodes with special responsibilities, such as cluster heads (CHs) or base station (BS), which are the attack targets. Afterwards, additional DoS attacks may be launched toward these nodes to jam or destroy them.