# Automated Penetration Testing Framework for Smart-Home-Based IoT Devices
## 1 Introduction
The figure briefly explains how the user connects and interacts with the smart home-based IoT devices in the hardware layer (the IoT lock, the IoT camera and the IoT bulb) using his smartphone or computer (shown in the User Interface layer of the figure). Each device has an application associated with it, which can be used by the user through his smart device to control and interact with the IoT device. This application establishes a connection with the device through its corresponding API that is present between the app and the IoT device. Each application has a corresponding API (shown in the API layer of the figure) that establishes a connection with the specific IoT device. Apart from this, there is also a database layer which contains the cloud and local database. All the data corresponding to the interactions between the user and the IoT device get stored in this layer. Each uniquely coloured line in the figure represents the connections corresponding to one set of interactions between the user interface and the hardware. In recent times, the Internet of Things (IoT) has been a very fast-growing and trending technology. People are surrounded by Internet of Things (IoT) devices in their daily life in one way or another. There would not be a day in which people are not using at least one of these devices in their day-to-day life. However, the emphasis on the functionality of these devices is so high that the manufacturers, and the people, are ignoring or forgetting another very important aspect to take into consideration, i.e., \"Security\". As a result, these devices are manufactured with very basic security issues, such as outdated software, default passwords, improper configurations, and poor logging. These vulnerabilities make the devices primary targets for potential hackers, as the hackers can easily brute force the passwords, use a known software vulnerability or exploit the improper configuration to gain access to the device. These devices also contain a lot of sensitive, personal data about the consumer, which upon getting into the wrong hands can have a severe impact on the consumer's life. Along with the concern for the safety of civilians, and their devices, these IoT devices can also be used as potential botnets to attack major digital infrastructures. Several such successful attacks have been reported and there has been an exponential increase in the number of attacks on the IoT every year [12]. Therefore, keeping these repercussions in mind, security testing of IoT devices is what is relevant and very much necessary in today's day and age. Figure 1: The architecture of a Smart home. Currently, the most prominent and viable solution to evaluate the overall security of an IoT device, from the attacker's perspective, is Penetration Testing (PT). Although there is no approach yet that completely evaluates the security of an IoT device (yet), PT is the most favoured approach [13]. However, PT of the IoT manually can be cumbersome and time-consuming. Additionally, it might be difficult for a regular user as PT requires a deep knowledge of the possible attacks and the available hacking tools. Therefore, it is evident that automation is required to make PT more efficient, and this also makes it easy for a normal user to evaluate the security of his IoT device as there's no need to have a deep understanding of the topic, unlike in the case of manual PT. This is also what the current IoT security research aims to do, i.e., automation. In this paper, we aim to build an automated PT framework and test it on five smart home-based IoT devices to discover the most common vulnerabilities present in them. The Common Vulnerability Scoring System (CVSS) base score is evaluated based on the vulnerabilities discovered for each device, and they are compared based on the scores to identify the most secure device. The contributions of our paper are as follows:  
1. Design and implement an automated penetration framework, which can be used by both technical and non-technical persons with ease. 2.