pull down to refresh

For the key exfil attack, how to guard for the hardware/firmware being corrupt? How can one realize that?