Analyzing and Securing Embedded Systems