Malicious code refers to viruses, Trojan horses, worms, logic bombs, and any other software created for the purpose of attacking a platform. • Virus. A code segment that replicates by attaching copies of itself to existing executables. The new copy o…