Building Hardened Internet of Things Clients with Language theoretic Security