Defending Legacy Systems against Advanced Attacks