## 3 Security and Privacy Attacks and Threats in EC-Based IoT  
In this section, we describe the possible key security and privacy attacks, their types, and their sources at different levels and layers (EC devices, communication and EC servers/nodes, and cloud servers) of edge computing in IoT networks. 1. _Malicious hardware/software injection_: unauthorized software/hardware components to the communication or EC node levels can be added by attackers that inject malicious inputs into the EC servers. Then, adversaries will be able to exploit service providers to perform hacking processes on their behalf, such as bypassing authentication, stealing data, reporting false data, or exposing database integrity [92, 33, 93]. Hardware injection attacks have several classifications, and we will further investigate the most common ones. * _Node replication_: this occurs when adversaries inject a new malicious node into an existing set of nodes by replicating one node's ID number. Then, attackers will be able to corrupt, steal, or misdirect data packets arriving at the malicious replica. The required access to extract cryptographic shared keys can be obtained by attackers causing severe damage to the system. Moreover, by implementing node revocation protocols, legitimate EC nodes can be revoked by node replicas [92, 33]. This attack is considered an active attack [94, 95, 96]. * If attackers gain illegitimate access to integrated circuits (ICs), they can appear as _hardware trojan_. Attackers will be able to control the circuit and access data or even software running on these ICs. There are two types of Trojans: (1) internally activated Trojans, which can be activated by satisfying a particular condition inside the ICs; and (2) externally activated Trojans, which can be activated using sensors or antennas that interact with the outside world [92, 33]. * Attackers can also _camouflage_ by injecting a fake EC node into the network or attack an authorized node to be able to hide at the edge level. This counterfeit/modified EC node will work as a normal EC node to receive, share, process, store, redirect, or transmit data packets [33, 92]. In addition, this node is able to operate in a passive mode and only analyses the traffic. This attack is considered a passive attack [94, 96, 97]. * Attackers gain unauthorized access and control of the network, taking advantage of _corrupted or malicious EC nodes_, then inject misleading data packets or can block the delivery of legitimate data packets [98, 99, 100, 101]. This attack can be launched using three different attack methods: (1) insertion, in which the attacker inserts malicious packets (that seem legitimate) in network communication; (2) manipulation, in which the attacker captures packets, then change them; or (3) replication (or replay), in which the previously exchanged packets between two nodes have been captured and replayed by the attacker. _2. Side-channel attacks_ compromise the security and privacy of users by any accessible information that is not privacy-sensitive in nature, called side-channel information [33, 92]. However, this accessible information usually has some correlations with privacy-sensitive data. Attackers explore the hidden correlations and extract the desired sensitive information from side-channel information using specific algorithms or machine learning models. The most popular side channels in EC are: communication signals, electric power consumption, and smartphone/proc filesystem or embedded sensors. _3. Authentication and authorization attacks_ can be categorized into four types [101]: (1) dictionary attacks, in which the attacker utilizes a credential/password dictionary to crack into the authentication of a system [102]; (2) attacks exploiting vulnerabilities in authentication protocols, in which attackers discover the design flaws of the authentication protocols.