Embedded Security Risks and Best Practices for IoT and Critical Devices