The term Internet of Things has increased in popularity in recent years and has spread to be used in many applications around us, such as healthcare applications, smart homes and smart cities, IoT is a group of smart devices equipped with sensors that have the ability to calculate data, and carry out actions in the environment in which they are located, they are connected to each other through the Internet and recently it has become supported by 5G technology due to many advantages such as its ability to provide a fast connection, despite the efficiency of the IoT supported by the five G technology, it is subject to many security challenges. In this paper, we conducted a comprehensive review of previous research related to the security requirements of the IoT and security attacks.