# Security of IoT Application Layer Protocols: Challenges and Findings
## 1 Introduction  
The IoT ecosystem encompasses a growing number of smart objects connected to the Internet and characterized by diverse capabilities, such as sensing, actuating, processing, storing and communicating [1, 2]. These physical objects are becoming pervasive in many industry verticals (e.g., transportation, manufacturing, energy, oil, gas, healthcare), as well as in governments (e.g., smart cities, smart buildings) and in our daily life (e.g., smart homes) [3]. In fact, IoT technologies offer enormous potentials to consumers and industry. More precisely, they improve quality of life, increase operational efficiency and productivity, allow real-time decisions and create new business opportunities. These benefits are leading to an exponential increase of the number of connected devices that is expected to reach tens of billions in the next coming years. According to Gartner's estimates, Internet-connected-things will outnumber humans 4-to-1 by 2020. This expansion will have a strong economic effect. The McKinsey Global Institute predicts that IoT technologies could have an annual economic impact of 3.9 to 11.1 trillion USD worldwide by 2025. Unfortunately, all these benefits are often coupled with many security risks and challenges. The main problem presently is the presence of many insecure IoT objects treated by their designers,manufacturers and even owners as dumb devices that in the hands of malicious hackers can be easily exploited to create serious economic and reputation damages, steal private data and even threaten safety. For example, a security hole on an implanted medical device might pose serious risks to patients. A distributed cyberattack on connected cars might easily gridlock entire cities. IoT systems integrate and rely on a variety of enabling technologies, e.g., software modules, libraries, middleware, application programming interfaces, protocols, sensor and mobile networks, whose source and nature are often out of the control of organizations or individuals deploying these systems. The diversity of the devices and of the environments where they operate requires specific consideration of the potential security challenges. In the complex IoT world, application layer protocols play a key role. In fact, they are at the basis of the communications among applications and services running on different IoT devices and on cloud/edge infrastructures. This paper offers a comprehensive analysis of the security risks and challenges affecting the most popular application layer protocols employed in IoT environments. In particular, the paper examines and classifies the potential security threats and attacks outlined in the protocol standards. To gain some further insights of whether/how security threats have materialized and of their actual impact, these threats are also studied under a different perspective that is by analyzing the Common Vulnerabilities and Exposures (CVE) collected by MITRE for products and services devising the various protocols. Moreover, the paper investigates and discusses the measures and good practices proposed in the literature to enhance security and mitigate the associated risks. The main contributions of this paper can be summarized as follows:  
* Analysis and discussion of the potential security threats and attacks affecting the application layer protocols typical of IoT environments;
* Analysis and discussion of the CVEs affecting products and services based on these protocols;
* Analysis and discussion of good practices and countermeasures that could be applied to mitigate risks and enhance security. The layout of this paper is as follows. Section 2 presents a general overview of IoT threat landscape, while Section 3 introduces and compares the application layer protocols considered in this paper. Sections 4 and 5 analyze the potential security risks and possible countermeasures of messaging and service discovery protocols, respectively. Section 6 summarizes and discusses the main findings of the analysis. Finally, Section 7 concludes the paper with some remarks.