Malicious code is any code designed to have an effect that is unintended by the receiver. Viruses, Spyware and Malware are three examples. Virus: Any code designed with th…e intent to damage files or disrupt hardware on a computer and to pass itself to other computers with the same intent.