## 2 Related Work  
IoT has a major impact on people's daily life which attract researchers to contribute more so that it could become beneficial for human being. Consequently, many researchers worked on the survey of IoT to provide knowledge regarding the IoT ecosystem and its details. A few works were done to provide an overview of challenges faced by IoT. The security threats are reviewed in [11; 26; 27; 28]. In these articles, different kinds of attacks were discussed. Article [29] showed the security flaws in Bluetooth and possible attacks on IoT using vulnerabilities of Bluetooth. Challenges of IoT are presented by others and a few of them are [30; 31; 32], etc. The article [31] also presented security guidelines and the impact of 5G on IoT systems was discussed in [33]. IoT architecture and layers were focused on in [34] and different protocols are discussed in [28; 34; 35]. Various applications of IoT were discussed in different papers such as [36] showing the impact of smart logistics in the industry. As IoT is a resource-constrain device, efficient and lightweight operations are required. To cover these things, refs. [37; 38; 39] showed how edge computing can help to process IoT services like smart agriculture, smart logistics, etc. In relation to the above type of researches, it is necessary to ensure secure data transfer and defend against different security attacks. The authentication framework can be designed in both centralized methods and decentralized mechanisms. Blockchain based, decentralize method, solutions were presented in different review papers, for example [11; 40; 41; 42], etc. Smart mobile IoT architecture along with different security mechanisms was presented in [28]. On the other hand, machine learning based intrusion detection solutions were demonstrated in [27; 43; 44]. However, none of them reviewed the IoT attacks taxonomy, attack surfaces, security mechanisms, secure data communication method, etc., as we did in this research. Table 2 summarizes the contributions of different review papers and mentions how the perspective of our paper is different from other survey papers. In this survey, the security and privacy risks of IoT are demonstrated. The issues and obstacles of different applications are highlighted. The contributions of this paper are the followings. * Overview and elements of both IoT and IoE networks. The differences between these are discussed. * Limitations and Vulnerabilities of IoT devices and network. The taxonomy of different layers is provided in detail. * Countermeasures of each kind of attack are provided with reference. * Available security measures and their application in the sector of IoT are analyzed. * Open issues of IoT security systems and future directions are also discussed. \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline
**Survey** & **Citation** & **Year** & **Objective** \\ \hline Understanding security requirements and challenges in Internet of Things & [PERSON] et al. [30] & 2019 & Security vulnerabilities are classified; challenges, existing solutions and open research issues are highlighted. \\ \hline Survey on blockchain for Internet of Things & [PERSON] et al. [40] & 2019 & Blockchain data structure and consensus protocol enhancement related existing works. \\ \hline A Comprehensive Survey on Attacks, Security Issues and Blockchain Solutions for IoT and IIoT & [PERSON] et al. [11] & 2019 & Categorize IoT attacks and countermeasures; Detailed IoT and IIoT application-specific blockchain-based solutions. \\ \hline Demystifying IoT Security: An Exhaustive Survey on IoT Vulnerabilities and a First Empirical Look on Internet-Scale IoT Exploitations & [PERSON] et al. [26] & 2019 & IoT taxonomy, effects and remediation. \\ \hline IoT: Internet of Threats? A Survey of Practical Security Vulnerabilities in Real IoT Devices & [PERSON] et al. [35] & 2019 & The security measures used by the most prevalent IoT communication protocols, as well as their flaws.