An investigation of IoT device vulnerabilities and how to prevent them in the future