## 6 Application of Proposed Architecture
### Major Security Threats and Attacks  
We summarize the major security threats and attacks faced by edge computing in our scenario. Then, we explore the corresponding defense mechanisms. In the next section, we outline the main causes of the attacks and discuss the practicality of launching/defending them. 1. _DDoS attacks and defense mechanisms_: DDoS attacks are the most common and easiest-to-exploit attacks in the practical world. Therefore, they are significant threats to EC services as well. This attack is very dangerous, especially in scenarios where many IoT devices are involved, such as in our scenario. Lack of suitable security or any vulnerability in IoT devices (mobile phones, Raspberry Pis, and beacons in our scenario) can be misused by attackers to launch a DDoS attack. DDoS attacks targeting edge computing can be categorized as _flooding-based attacks_ and _zero-day attacks_. Flooding-based attacks aim to shut down the normal service of a server using a large amount of flooded malformed/malicious network packets. Zero-day DDoS attacks are more advanced than flooding-based DDoS, but they are more difficult to implement. In such an attack, an unknown vulnerability in a piece of code running on the target edge server/device must be fined by an attacker (i.e., zero-day vulnerability), which can result in memory corruption and a service shutdown. The detection of flooding-based DDoS attacks can be mainly classified into two categories: per-packet-based detection and statistics-based detection. Per-packet-based detections detect flooding-based attacks at the packet level. A flooding-based DDoS attack is launched mainly by sending an enormous amount of malicious/malformed network packets; therefore, detecting and filtering those packets is an effective defense. Statistics-based approaches mainly detect DDoS attacks based on the advent of clusters of DDoS traffic. The existing statistics-based detection solutions use either packet entropy or machine learning tools. As per-packet-based detections were used in our scenario, we used packet filters and firewalls against the flooding-based attacks. In addition, for statistics-based detections, we used IDSs. Moreover, it is important to use secure firmware updates. We also considered static analysis techniques to detect any vulnerability in our codes. 2. _Side-channel attacks and defense mechanisms_: defenses against side-channel attacks can be performed by either restricting access to side-channel information or protecting sensitive data from inference attacks. In our scenario, we considered defense mechanisms such as data perturbation-based techniques (e.g., differential privacy) and source code-level obfuscation and hardware protection to directly manipulate or restrict access to the side channels in order to provide protection. 3. _Malware injection attacks and defense mechanisms_: malware injection attacks in edge computing can be classified into two categories: server-side injections (injection attacks targeting edge servers) and device-side injections (injection attacks targeting edge devices). The defenses against server-side injections are mainly based on the detection filter philosophy, while code-level analysis for fine-grained access control and malicious behavior detection is mainly used to defend against device-side injections. To detect these attacks, we considered employing code checking with various schemes such as static analysis, dynamic debugging, blackbox testing, and taint-based analysis; and to prevent any illegal SQL queries from being executed, we considered setting up a proxy filter and employing instruction-set randomization (ISR). Malware injections attacking mobile devices exploit the design flaws of the mobile OSes and the usage of malicious libraries. We used static analysis methods to identify possible malicious uses of dangerous Android APIs. In addition, we considered using cryptographic techniques, such as signature verification, as well as Trojan activation methods, circuit modification/replacing, and prior testing.