Computer virus (ConceptClass, 5)

From Compile Worlds


A computer virus is a malicious program designed as a (usually invalid) sequence of bytes within a file which exploits flaws in common programs, used to open that type of file, to run arbitrary code. That code would then contain two main parts: one part to infect other files and/or send infected files to other systems on a network through various protocols such as email; the other part to run some destructive or otherwise unwanted code on the infected machine. While many viruses are simply parts of other files, such as .jpg files (Microsoft Windows' native JPEG renderer had some bugs allowing arbitrary code to be run when invalid data was encountered), some are executable files in their own right, and the trick here is to socially engineer the user into running them.

Many less technically inclined people believe that viruses are unbeatable without the use of some expensive and CPU-hogging antivirus program. However, if code was written perfectly in the first place, there would not be any bugs for viruses to exploit, so viruses would simply not exist. In other words, viruses only exist because of human error in programming.