## 3 Discussion and Classification of IoT Attacks and Countermeasures
### IoT Attacks  
A detailed description of each IoT layer with the corresponding attack types and examples is provided in the following listing, which is followed by elucidations regarding the various architectural and algorithmic countermeasures--with concrete examples--that can potentially be applied to protect smart city IoT networks. The presented classification is based on a literature review, which aimed at finding common ground between the various classifications in the relatively new field of cybersecurity for smart city IoT devices. Figure 2: IoT layers classification (based on definitions from refs.) [1; 2; 3]. **Application Layer:** The application layer serves as an interface between the end users and a given platform or service [1; 2]. It provides functionalities such as authentication, authorization, data overview, and data access [2]. For this reason, the most common security vulnerabilities exploited at this layer are related to data theft and privacy violations [1]. For instance, some of the attacks performed at the application layer include the following:  
* _Data theft_[1; 2]: IoT devices are utilized in a wide range of use cases and, therefore, are involved in generating, processing, and transferring a variety of data. As pointed out by [PERSON] et al. [1], data that are being transferred are more vulnerable to attacks and consequently they can be stolen. At the same time, some of these data might include sensitive or private information. Therefore, if the end users cannot trust the IoT platform's privacy-preserving capabilities, they are unlikely to store their data on this platform [2]. Some of the common approaches for providing security guarantees against data theft comprise using data encryption, isolation, and network authentication [1];
* _Sniffing attacks_[2] occur when an attacker monitors the network traffic in an attempt to acquire sensitive user data [1]. The attack is executed by an attacker that uses malicious software to intercept and read confidential data flowing through the IoT network [2]. Similar to data theft, the prevention against such attacks includes the utilization of secure data transfer protocols [2];
* _Malicious code and database injections_ describe attacks that are performed with the help of malicious user inputs such as scripts and code snippets. These attacks are possible due to insufficient code checks or the lack thereof [1]. The standard attack procedure includes an attacker finding a vulnerable entry point in the application layer and injecting a harmful piece of code that compromises the system [2]. Some of the common examples for such attacks include the SQL injection [9] and the cross-site scripting (XSS) attacks [1; 10]. **Network Layer:** The main responsibility of the network layer is to handle the transmission of data coming from the physical layer across the IoT network [2]. Some examples of common network layer attacks include the following:  
* _Distributed denial of service (DDoS)_ is an attack that uses multiple devices or systems to flood a target service with unwanted traffic [1; 11]. The main goal of the attack is to generate a massive number of requests which will either disrupt the normal functioning of the service or will completely shut it down. As pointed out by [PERSON] and [PERSON] [2], DDoS attacks are not specific to IoT networks. However, the large number of poorly secured IoT devices can become easy targets for a motivated perpetrator who can add the devices as a part of a botnet (e.g., Mirai [2; 9; 12]);