## 4 Attack Model
For instance, the attack can be performed by sending a hello request and can lead to a loss of the node availability. Desynchronization attacks, clock-skewing and data-replay attacks can be classified as attacks on the protocol of interaction between nodes [23; 32]. A desynchronization attack involves sending packets with a duplicate of the current session number. Since, in accordance with the rules for the correct functioning of the network, there should not be two identical session numbers at the same time, the attack leads to the closure of the session with the sent sequence number. Therefore, such nodes have to create new sessions (and this, in turn, implies preliminary message exchange), which additionally consumes node resources and, as a result, can lead to disruptions in the functioning of the network. A clock-skewing attack is an attack on WSN sensors that require synchronization of the current time to operate. It desynchronizes the sensors, spreading false values of the current time moment. A data-replay attack involves an unauthorized repetition of data packets. An attacker resends correct, previously recorded data packets over the network. This action can lead to distorted information about the state of the environment where the WSN operates. A jamming attack consists of noising the communication channel through which WSN nodes communicate [33; 34]. An attack can be classified as a physical method of influence. The attack can lead to a complete disruption of the network or the disconnection of one, two or more nodes in the network. The attack is harder to detect and may not be immediately revealed by an attack detection mechanism due to the presence of self-organizing properties in the network. Figure 4 shows an example of the use of self-organized decentralized WSNs as part of a smart city system. In the figure, the arrows show the connections between specific WSN nodes that define the network topology at a certain point in time. The elements of the figure indicate nodes that measure ambient air parameters (temperature, humidity, etc.). Some of them are separate devices, while others are installed on elements of the city's infrastructure. In this example, the WSN nodes monitor environmental parameters (temperature, humidity, pollution, etc.) and are located on both individual devices and vehicles. In case a WSN node is a separate device, it is periodically moved from one point in the city to another. Self-organization allows the nodes to move freely in space so, at the same time, the performance of the network is not disturbed, because when one node leaves, the intended messages will be transmitted through the other nodes. Decentralization allows one to distribute the processing, analysis and storage of information among several WSN nodes, while not overloading any node with these computational processes. Role-based  
functioning keeps the network operation in the case of disconnection of one of the nodes from the network (i.e., the role performed is passed to another node). It also allows one to balance the performance of the network if a new node is added to it (i.e., the new node starts realizing a specific role while reducing the load on the other nodes). Specifically, Figure 4a discloses the initial state of WSN, where there are two subnets connected to each other through two specific nodes. Data can be transmitted seamlessly through one of the possible routes from one part of the WSN to the other. Part b of Figure 4 illustrates two attacks. Namely, a wormhole attack is presented in red and, a sinkhole attack is in blue. The wormhole attack exploits the self-organization property to introduce two malicious nodes into the network, disrupting the routing processes of the network. The decentralization property, in practice, can exacerbate the effects of the attack, as the added nodes can be given specific roles and the WSN operation will be disrupted.