This book targets the key concern of protecting critical infrastructures such as smart grids. It explains various static and dynamic security analysis techniques that can automatically verify smart grid security and resiliency and identify potential attacks in a proactive manner. This book includes three main sections. The first presents the idea of formally verifying the compliance of smart grid configurations with the security and resiliency guidelines...