Invia SMS: Securing Deeply Embedded Systems Through Firmware Analysis and Threat Mitigation