Logical Analysis of Cyber Vulnerability and Protection