IoT devices are currently part of our environment, collecting confidential data and information. Therefore, it is important to know what vulnerabilities are present in the devices that are being used. This study shows that Raspberry Pi devices do not have a defense system that detects malicious or virus-infected files. This is one of the reasons why they are vulnerable to various attacks. To test this, three different attacks-Man In The Middle (MITM), Backdoor and Denial of Service (DoS)-were performed on the Raspberry Pi device using a virtual machine with the Kali Linux operating system. It is shown that Raspberry Pi with the Raspbian operating system is vulnerable to some of the test attacks. The time it takes for the attacker to execute the man-in-the-middle and backdoor attacks is 1 s. In the case of a Denial of Service (DoS) attack, it takes 60 seconds to execute. It was shown that an MITM attack takes much longer to prepare, approximately 15 min, than a DoS attack that takes 8 min.