Measuring and Improving the Security Postures of Smart Grid Substations Against Cyber Attacks