A heuristic approach to network hardening using attack graphs