Securing the IoT: Understanding Vulnerabilities and Mitigating Risks