Black Hat Physical Device Security: Exploiting Hardware and Software