Shrinking the Cyberattack Surface by Hardening IoT Systems