Efficient network attack graph generation