Attack Surface Analysis and Reduction