All Topics  
Computer virus

 

   Email Print
   Bookmark   Link






 

Computer virus



 
 
A computer virus is a computer program
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
 that can copy itself and infect a computer without the permission or knowledge of the user. The term "virus" is also commonly but erroneously used to refer to other types of malware
Malware

Malware, a portmanteau from the words Malice and Computer software, is software designed to infiltrate or damage a computer system without the owner's informed consent....
, adware
Adware

Adware or advertising-supported software is any Computer software package which automatically plays, displays, or downloads advertisements to a computer after the software is installed on it or while the application is being used....
 and spyware
Spyware

Spyware is computer software that is installed wikt:surreptitiously on a personal computer to intercept or take partial control over the user's interaction with the computer, without the user's informed consent....
 programs that do not have the reproductive ability. A true virus can only spread from one computer to another (in some form of executable code
Code

In communications, a code is a Operator for converting a piece of information into another form or representation , not necessarily of the same type....
) when its host is taken to the target computer; for instance because a user sent it over a network or the Internet, or carried it on a removable medium such as a floppy disk
Floppy disk

A floppy disk is a data storage medium that is composed of a disk of thin, flexible magnetic storage medium encased in a square or rectangle plastic shell....
, CD
Compact Disc

A Compact Disc is an optical disc used to store Data , originally developed for storing digital audio. The CD, available on the market since October 1982, remains the standard physical medium for sale of commercial Sound recording and reproduction to the present day....
, DVD
DVD

DVD, also known as "Digital Versatile Disc" or "Digital Video Disc,"is a popular optical disc data storage device media format. Its main uses are video and data storage....
, or USB drive
USB flash drive

A USB flash drive consists of a Flash memory#NAND memories-type flash memory data storage device integrated with a USB interface. USB flash drives are typically removable and rewritable, much smaller than a floppy disk , and most USB flash drives weigh less than an ounce ....
.






Discussion
Ask a question about 'Computer virus'
Start a new discussion about 'Computer virus'
Answer questions from other users
Full Discussion Forum



Encyclopedia


A computer virus is a computer program
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
 that can copy itself and infect a computer without the permission or knowledge of the user. The term "virus" is also commonly but erroneously used to refer to other types of malware
Malware

Malware, a portmanteau from the words Malice and Computer software, is software designed to infiltrate or damage a computer system without the owner's informed consent....
, adware
Adware

Adware or advertising-supported software is any Computer software package which automatically plays, displays, or downloads advertisements to a computer after the software is installed on it or while the application is being used....
 and spyware
Spyware

Spyware is computer software that is installed wikt:surreptitiously on a personal computer to intercept or take partial control over the user's interaction with the computer, without the user's informed consent....
 programs that do not have the reproductive ability. A true virus can only spread from one computer to another (in some form of executable code
Code

In communications, a code is a Operator for converting a piece of information into another form or representation , not necessarily of the same type....
) when its host is taken to the target computer; for instance because a user sent it over a network or the Internet, or carried it on a removable medium such as a floppy disk
Floppy disk

A floppy disk is a data storage medium that is composed of a disk of thin, flexible magnetic storage medium encased in a square or rectangle plastic shell....
, CD
Compact Disc

A Compact Disc is an optical disc used to store Data , originally developed for storing digital audio. The CD, available on the market since October 1982, remains the standard physical medium for sale of commercial Sound recording and reproduction to the present day....
, DVD
DVD

DVD, also known as "Digital Versatile Disc" or "Digital Video Disc,"is a popular optical disc data storage device media format. Its main uses are video and data storage....
, or USB drive
USB flash drive

A USB flash drive consists of a Flash memory#NAND memories-type flash memory data storage device integrated with a USB interface. USB flash drives are typically removable and rewritable, much smaller than a floppy disk , and most USB flash drives weigh less than an ounce ....
. Viruses can increase their chances of spreading to other computers by infecting files on a network file system
Network File System

Network File System is a network file system protocol originally developed by Sun Microsystems in 1984, allowing a user on a client computer to access files over a computer network as easily as if the network devices were attached to its local disks....
 or a file system that is accessed by another computer.

Viruses are sometimes confused with computer worm
Computer worm

A computer worm is a self-replicating computer program. It uses a network to send copies of itself to other nodes and it may do so without any user intervention....
s and Trojan horses
Trojan horse (computing)

The Trojan horse, also known as trojan, in the context of computer software, describes a class of computer threats that appears to perform a desirable function but in fact performs undisclosed malicious functions that allow unauthorized access to the host machine, giving them the ability to save their files on the user's computer...
, which are technically different. A worm can use security vulnerabilities to spread itself to other computers without needing to be transferred as part of a host, and a Trojan horse is a program that appears harmless but has a hidden agenda. Worms and Trojans, like viruses, may cause harm to either a computer system's hosted data, functional performance, or networking throughput, when they are executed. Some viruses and other malware have symptoms noticeable to the computer user, but most are surreptitious. This makes it hard for the average user to notice, find and disable and is why specialist anti-virus programs are now commonplace.

Most personal computers are now connected to the Internet and to local area network
Local area network

A local area network is a computer network covering a small physical area, like a home, office, or small group of buildings, such as a school, or an airport....
s, facilitating the spread of malicious code. Today's viruses may also take advantage of network services such as the World Wide Web
World Wide Web

The World Wide Web is a very large set of interlinked hypertext documents accessed via the Internet. With a Web browser, one can view Web pages that may contain writing, s, videos, and other multimedia and navigate between them using hyperlinks....
, e-mail
E-mail

Electronic mail, often abbreviated as e-mail, email, E-Mail, or eMail, is any method of creating, transmitting, or storing primarily text-based human communications with digital communications systems....
, Instant Messaging
Instant messaging

Instant messaging is a form of Real-time computing communication between two or more people based on typed text. The Written language is conveyed via devices connected over a network such as the Internet....
 and file sharing
File sharing

File sharing is a method of distributing electronically stored information such as computer programs and digital media. File sharing can be implemented in a variety of storage and distribution models....
 systems to spread, blurring the line between viruses and worms. Furthermore, some sources use an alternative terminology in which a virus is any form of self-replicating malware
Malware

Malware, a portmanteau from the words Malice and Computer software, is software designed to infiltrate or damage a computer system without the owner's informed consent....
.

History

The Creeper virus
Creeper virus

The Creeper virus was an experimental self-replicating program written by Bob Thomas at BBN in 1971. Creeper infected DEC PDP-10 computers running the TOPS-20....
 was first detected on ARPANET
ARPANET

The ARPANET developed by Defense Advanced Research Projects Agency of the United States Department of Defense during the Cold War, was the world's first operational packet switching network, and the predecessor of the global Internet....
, the forerunner of the Internet
Internet

The Internet is a global network of interconnected computers, enabling users to share information along multiple channels. Typically, a computer that connects to the Internet can access information from a vast array of available server and other computers by moving information from them to the computer's local memory....
 in the early 1970s. Creeper was an experimental self-replicating program written by Bob Thomas
Bob Thomas

Bob Thomas is a radio personality, actor, and writer. He was one of the top radio announcers in Knoxville, Tennessee for 25 years. During his tenure at radio station WIVK, he had the highest-rated midday radio show in the United States for over 16 years....
 at BBN
BBN

BBN might refer to:* Business Branding Network, an international network of marketing and communications agencies* BBN Technologies, formerly Bolt, Beranek and Newman, a technology company in Cambridge, Massachusetts, best known for its work on packet switching technology and its construction of the Interface Message Processor - the first r...
 in 1971. Creeper used the ARPANET to infect DEC PDP-10
PDP-10

The PDP-10 was a mainframe computer manufactured by Digital Equipment Corporation from the late 1960s on; the name stands for "Programmed Data Processor model 10"....
 computers running the TENEX operating system
TOPS-20

The TOPS-20 operating system by Digital Equipment Corporation was the second proprietary OS for the PDP-10 mainframe computer. TOPS-20 began in 1969 as Bolt, Beranek and Newman's TENEX operating system, using special paging hardware....
. Creeper gained access via the ARPANET and copied itself to the remote system where the message, "I'm the creeper, catch me if you can!" was displayed. The Reaper program was created to delete Creeper.

A common misconception is that a program called "Rother J" was the first computer virus to appear "in the wild" — that is, outside the single computer or lab where it was created, but that claim is false. See the Timeline of notable computer viruses and worms
Timeline of notable computer viruses and worms

This is a timeline of noteworthy computer viruses, computer worms and Trojan horse s....
 for other earlier viruses. It was, however, the first virus to infect computers "in the home." Written in 1982 by Richard Skrenta, it attached itself to the Apple DOS
Apple DOS

Apple DOS refers to operating systems for the Apple II series of Personal computer from 1979 through early 1983. Apple DOS had three major releases: DOS 3.1, DOS 3.2, and DOS 3.3; each one of these three releases was followed by a second, minor "bug-fix" release, but only in the case of Apple DOS 3.2 did that minor release receive its own ver...
 3.3 operating system and spread via floppy disk
Floppy disk

A floppy disk is a data storage medium that is composed of a disk of thin, flexible magnetic storage medium encased in a square or rectangle plastic shell....
. This virus was originally a joke, created by a high school student. It was injected in a game on a floppy disk. On its 50th use the Elk Cloner
Elk Cloner

Elk Cloner is one of the first known computer virus that spread "in the wild," i.e., outside the computer system or lab in which it was written....
 virus would be activated, infecting the computer and displaying a short poem beginning "Elk Cloner: The program with a personality."

The first PC virus in the wild was a boot sector virus dubbed (c)Brain
(c)Brain

?Brain is considered to be the first computer virus for MS-DOS. It infects the boot sector of storage media formatted with the DOS File Allocation Table file system....
, created in 1986 by the Farooq Alvi Brothers
Farooq Alvi Brothers

Basit Farooq Alvi along with his brother Amjad Farooq Alvi are known for having developed the Personal Computer computer virus known as Brain....
, operating out of Lahore, Pakistan. The brothers reportedly created the virus to deter pirated copies of software they had written. However, analysts have claimed that the Ashar virus, a variant of Brain, possibly predated it based on code within the virus.

Before computer networks became widespread, most viruses spread on removable media
Removable media

In computer storage, removable media refers to storage media which can be removed from its reader device, conferring portability on the data it carries....
, particularly floppy disk
Floppy disk

A floppy disk is a data storage medium that is composed of a disk of thin, flexible magnetic storage medium encased in a square or rectangle plastic shell....
s. In the early days of the personal computer
Personal computer

A personal computer is any general-purpose computer whose original sales price, size, and capabilities make it useful for individuals, and which is intended to be operated directly by an end user, with no intervening computer operator....
, many users regularly exchanged information and programs on floppies. Some viruses spread by infecting programs stored on these disks, while others installed themselves into the disk boot sector
Boot sector

A boot sector is a disk_sector of a hard disk, floppy disk, or similar data storage device that contains code for booting computer programs stored in other parts of the disk....
, ensuring that they would be run when the user booted the computer from the disk, usually inadvertently. PCs of the era would attempt to boot first from a floppy if one had been left in the drive. Until floppy disks fell out of use, this was the most successful infection strategy and boot sector viruses were the most common in the wild for many years.

Traditional computer viruses emerged in the 1980s, driven by the spread of personal computers and the resultant increase in BBS
Bulletin board system

File:Monochrome-bbs.pngA Bulletin Board System, or BBS, is a computer system running list of BBS software that allows User to Telecommunication circuit and Logging to the system using a terminal program....
, modem
Modem

Modem is a peripheral device that modulation an analog carrier wave Signal to encode digital information, and also demodulation such a carrier signal to decode the transmitted information....
 use, and software sharing. Bulletin board
Bulletin board

A bulletin board is a place where people can leave public messages, for example, to advertise things to buy or sell, announce Gatherings, or provide information....
 driven software sharing contributed directly to the spread of Trojan horse programs, and viruses were written to infect popularly traded software. Shareware
Shareware

The term shareware, popularized by Bob Wallace, refers to copyrighted commercial software that is distributed without payment on a trial basis and is limited by any combination of functionality, availability, or convenience....
 and bootleg software were equally common vectors for viruses on BBS's. Within the "pirate scene" of hobbyists trading illicit copies of retail software, traders in a hurry to obtain the latest applications and were easy targets for viruses.

Since the mid-1990s, macro virus
Macro virus (computing)

In computing terminology, a macro virus is a computer virus that is written in a Macro programming language: that is to say, a language built into a software application such as a word processor....
es have become common. Most of these viruses are written in the scripting languages for Microsoft programs such as Word
Microsoft Word

Microsoft Word is Microsoft's word processor computer software. It was first released in 1983 under the name Multi-Tool Word for Xenix systems....
 and Excel
Microsoft Excel

Microsoft Excel is a spreadsheet-application written and distributed by Microsoft for Microsoft Windows and Mac OS X. It features calculation, graphing tools, pivot tables and a macro programming language called VBA ....
 and spread throughout Microsoft Office
Microsoft Office

Microsoft Office is a popular set of interrelated desktop applications, servers and services. Microsoft Office is collectively referred to as an office suite, for the Microsoft Windows and Mac OS X operating systems....
 by infecting documents and spreadsheets. Since Word and Excel were also available for Mac OS
Mac OS

Mac OS is the trademarked name for a series of graphical user interface-based operating systems developed by Apple Inc. for their Macintosh line of computer systems....
, most could also spread onto Macintosh computers
Macintosh

File:Imac alu.pngMacintosh, commonly shortened to Mac, is a brand name which covers several lines of personal computers designed, developed, and marketed by Apple Inc....
 as well. Although the majority of these viruses did not have the ability to send infected e-mail, those viruses which did took advantage of the Microsoft Outlook
Microsoft Outlook

Microsoft Office Outlook or Outlook is a personal information manager from Microsoft. The 2007 version is available both as a separate application as well as a part of the Microsoft Office suite....
 COM
Component Object Model

Component Object Model is an interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages....
 interface.

Macro viruses pose unique problems for detection software. For example, some versions of Microsoft Word allowed macros to replicate themselves with additional blank lines. The virus behaved identically but would be misidentified as a new virus. Additionally, if two macro viruses simultaneously infect a document, the combination of the two, if also self-replicating, can appear as a "mating" of the two and would likely be detected as a virus unique from the "parents."

A virus may also send a web address
Uniform Resource Locator

In Information technology, a Uniform Resource Locator is a type of Uniform Resource Identifier that specifies where an identified resource is available and the mechanism for retrieving it....
 link as an instant message to all the contacts on an infected machine. If the recipient, thinking the link is from a friend (a trusted source) follows the link to the website, the virus hosted at the site may be able to infect this new computer and continue propagating.

The newest species of the virus family is the cross-site scripting virus. The virus emerged from research and was academically demonstrated in 2005. This virus utilizes cross-site scripting
Cross-site scripting

Cross-site scripting is a type of computer insecurity vulnerability typically found in web applications which allow code injection by malicious web users into the web pages viewed by other users....
 vulnerabilities to propagate. Since 2005 there have been multiple instances of the cross-site scripting viruses in the wild, most notable sites affected have been MySpace
Samy (XSS)

Samy was an XSS Worm developed to propagate across the MySpace social-networking site. At the time of release it gained significant media attention....
 and Yahoo.

Infection strategies

In order to replicate itself, a virus must be permitted to execute code and write to memory. For this reason, many viruses attach themselves to executable files that may be part of legitimate programs. If a user attempts to launch an infected program, the virus' code may be executed simultaneously. Viruses can be divided into two types, on the basis of their behavior when they are executed. Nonresident viruses immediately search for other hosts that can be infected, infect those targets, and finally transfer control to the application program
Application software

Application software is any tool that functions and is operated by means of a computer, with the purpose of supporting or improving the software user 's work....
 they infected. Resident viruses do not search for hosts when they are started. Instead, a resident virus loads itself into memory on execution and transfers control to the host program. The virus stays active in the background and infects new hosts when those files are accessed by other programs or the operating system itself.

Nonresident viruses

Nonresident viruses can be thought of as consisting of a finder module and a replication module. The finder module is responsible for finding new files to infect. For each new executable file the finder module encounters, it calls the replication module to infect that file.

Resident viruses

Resident viruses contain a replication module that is similar to the one that is employed by nonresident viruses. However, this module is not called by a finder module. Instead, the virus loads the replication module into memory when it is executed and ensures that this module is executed each time the operating system is called to perform a certain operation. For example, the replication module can be called each time the operating system executes a file. In this case, the virus infects every suitable program that is executed on the computer.

Resident viruses are sometimes subdivided into a category of fast infectors and a category of slow infectors. Fast infectors are designed to infect as many files as possible. For instance, a fast infector can infect every potential host file that is accessed. This poses a special problem when using anti-virus software, since a virus scanner will access every potential host file on a computer when it performs a system-wide scan. If the virus scanner fails to notice that such a virus is present in memory, the virus can "piggy-back" on the virus scanner and in this way infect all files that are scanned. Fast infectors rely on their fast infection rate to spread. The disadvantage of this method is that infecting many files may make detection more likely, because the virus may slow down a computer or perform many suspicious actions that can be noticed by anti-virus software. Slow infectors, on the other hand, are designed to infect hosts infrequently. For instance, some slow infectors only infect files when they are copied. Slow infectors are designed to avoid detection by limiting their actions: they are less likely to slow down a computer noticeably, and will at most infrequently trigger anti-virus software that detects suspicious behavior by programs. The slow infector approach does not seem very successful, however.

Vectors and hosts

Viruses have targeted various types of transmission media or hosts. This list is not exhaustive:
  • Binary executable files (such as COM file
    COM file

    In many computer operating systems, a COM file is a type of executable; the name is derived from the file name extension .COM. Originally, the term stood for "Command file", a text file containing commands to be issued to the operating system , on many of the Digital Equipment Corporation minicomputer and mainframe operating systems going...
    s and EXE
    EXE

    EXE is the common filename extension denoting an executable file in the DOS, OpenVMS, Microsoft Windows, ReactOS, and OS/2 operating systems.Besides the executable program itself, many EXE files contain other components called Resource , such as bitmaps and icons which the executable program may use for its graphical user interface....
     files in MS-DOS
    MS-DOS

    MS-DOS is an operating system commercialized by Microsoft. It was the most commonly used member of the DOS family of operating systems and was the main operating system for personal computers during the 1980s....
    , Portable Executable
    Portable Executable

    The Portable Executable format is a file format for executables, object file, and Dynamic-link librarys, used in 32-bit and 64-bit versions of Microsoft Windows operating systems....
     files in Microsoft Windows
    Microsoft Windows

    Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces ....
    , and ELF
    Executable and Linkable Format

    In computing, the Executable and Linking Format is a common standard file format for executables, object code, shared libraries, and core dumps....
     files in Linux
    Linux

    Linux is a generic term referring to Unix-like computer operating systems based on the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed by anyone under the terms of the GNU GPL license...
    )
  • Volume Boot Record
    Volume Boot Record

    A Volume Boot Record is a type of boot sector, stored in a volume on a hard disk, floppy disk, or similar data storage device, that contains code for booting computer programs stored in other parts of the volume....
    s of floppy disk
    Floppy disk

    A floppy disk is a data storage medium that is composed of a disk of thin, flexible magnetic storage medium encased in a square or rectangle plastic shell....
    s and hard disk partitions
  • The master boot record
    Master boot record

    A master boot record , or partition sector, is the 512-byte boot sector that is the first disk sector of a Disk partitioning data storage device such as a hard disk....
     (MBR) of a hard disk
  • General-purpose script files (such as batch file
    Batch file

    In DOS, OS/2, and Microsoft Windows, a batch file is a text file containing a series of Command intended to be executed by the Command line interpreter....
    s in MS-DOS
    MS-DOS

    MS-DOS is an operating system commercialized by Microsoft. It was the most commonly used member of the DOS family of operating systems and was the main operating system for personal computers during the 1980s....
     and Microsoft Windows
    Microsoft Windows

    Microsoft Windows is a series of software operating systems and graphical user interfaces produced by Microsoft. Microsoft first introduced an operating environment named Windows in November 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces ....
    , VBScript
    VBScript

    VBScript is an Active Scripting language, developed by Microsoft, which uses the Component Object Model to access elements of the environment within which it's running ....
     files, and shell script
    Shell script

    A shell script is a Scripting language written for the Shell , or command line interpreter, of an operating system. It is often considered a simple domain-specific programming language....
     files on Unix-like
    Unix-like

    A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....
     platforms).
  • Application-specific script files (such as Telix
    Telix

    Telix is a telecommunications Computer program originally written for DOS by Colin Sampaleanu and released in 1986. More recent versions were distributed by deltaComm Development, including a version for Microsoft Windows....
    -scripts)
  • Documents that can contain macros (such as Microsoft Word
    Microsoft Word

    Microsoft Word is Microsoft's word processor computer software. It was first released in 1983 under the name Multi-Tool Word for Xenix systems....
     documents, Microsoft Excel
    Microsoft Excel

    Microsoft Excel is a spreadsheet-application written and distributed by Microsoft for Microsoft Windows and Mac OS X. It features calculation, graphing tools, pivot tables and a macro programming language called VBA ....
     spreadsheets, AmiPro documents, and Microsoft Access
    Microsoft Access

    Microsoft Office Access, previously known as Microsoft Access, is a relational database management system from Microsoft that combines the relational Microsoft Jet Database Engine with a graphical user interface and software development tools....
     database files)
  • Cross-site scripting
    Cross-site scripting

    Cross-site scripting is a type of computer insecurity vulnerability typically found in web applications which allow code injection by malicious web users into the web pages viewed by other users....
     vulnerabilities in web applications
  • Arbitrary computer files. An exploitable buffer overflow
    Buffer overflow

    In computer security and computer programming, a buffer overflow, or buffer overrun, is an Anomaly in software condition where a process attempts to store data beyond the boundaries of a fixed-length buffer ....
    , format string, race condition
    Race condition

    A race condition or race hazard is a flaw in a system or process whereby the output and/or result of the process is unexpectedly and critically dependent on the sequence or timing of other events....
     or other exploitable bug in a program which reads the file could be used to trigger the execution of code hidden within it. Most bugs of this type can be made more difficult to exploit in computer architecture
    Computer architecture

    Computer architecture in computer engineering is the conceptual design and fundamental operational structure of a computer system. It is a blueprint and functional description of requirements and design implementations for the various parts of a computer, focusing largely on the way by which the central processing unit performs internally an...
    s with protection features such as an execute disable bit
    NX bit

    The NX bit, which stands for No eXecute, is a technology used in CPUs to segregate areas of memory for use by either storage of processor instructions or for storage of data, a feature normally only found in Harvard architecture processors....
     and/or address space layout randomization.


PDFs, like HTML
HTML

HTML, an Acronym and initialism of HyperText Markup Language, is the predominant markup language for Web pages. It provides a means to describe the structure of text-based information in a document?by denoting certain text as links, headings, paragraphs, lists, and so on?and to supplement that text with interactive forms, embedded '...
, may link to malicious code.PDFs can also be infected with malicious code.

In operating systems that use file extensions to determine program associations (such as Microsoft Windows), the extensions may be hidden from the user by default. This makes it possible to create a file that is of a different type than it appears to the user. For example, an executable may be created named "picture.png.exe", in which the user sees only "picture.png" and therefore assumes that this file is an image and most likely is safe.

Methods to avoid detection

In order to avoid detection by users, some viruses employ different kinds of deception. Some old viruses, especially on the MS-DOS platform, make sure that the "last modified" date of a host file stays the same when the file is infected by the virus. This approach does not fool anti-virus software, however, especially those which maintain and date Cyclic redundancy check
Cyclic redundancy check

A cyclic redundancy check is a type of function that takes as input a data stream of any length, and produces as output a value of a certain space, commonly a 32-bit integer....
s on file changes.

Some viruses can infect files without increasing their sizes or damaging the files. They accomplish this by overwriting unused areas of executable files. These are called cavity viruses. For example the CIH virus, or Chernobyl Virus, infects Portable Executable
Portable Executable

The Portable Executable format is a file format for executables, object file, and Dynamic-link librarys, used in 32-bit and 64-bit versions of Microsoft Windows operating systems....
 files. Because those files have many empty gaps, the virus, which was 1 KB
Kilobyte

Kilobyte is a unit of Computer data storage equal to either 1,024 bytes or 1,000 bytes , depending on context.It is abbreviated in a number of ways: KB, kB, K and Kbyte....
 in length, did not add to the size of the file.

Some viruses try to avoid detection by killing the tasks associated with antivirus software before it can detect them.

As computers and operating systems grow larger and more complex, old hiding techniques need to be updated or replaced. Defending a computer against viruses may demand that a file system migrate towards detailed and explicit permission for every kind of file access.

Avoiding bait files and other undesirable hosts

A virus needs to infect hosts in order to spread further. In some cases, it might be a bad idea to infect a host program. For example, many anti-virus programs perform an integrity check of their own code. Infecting such programs will therefore increase the likelihood that the virus is detected. For this reason, some viruses are programmed not to infect programs that are known to be part of anti-virus software. Another type of host that viruses sometimes avoid is bait files. Bait files (or goat files) are files that are specially created by anti-virus software, or by anti-virus professionals themselves, to be infected by a virus. These files can be created for various reasons, all of which are related to the detection of the virus:
  • Anti-virus professionals can use bait files to take a sample of a virus (i.e. a copy of a program file that is infected by the virus). It is more practical to store and exchange a small, infected bait file, than to exchange a large application program that has been infected by the virus.
  • Anti-virus professionals can use bait files to study the behavior of a virus and evaluate detection methods. This is especially useful when the virus is polymorphic
    Polymorphic code

    In computer terminology, polymorphic code is code that mutates while keeping the original algorithm intact. This technique is sometimes used by computer viruses, shellcodes and computer worms to hide their presence....
    . In this case, the virus can be made to infect a large number of bait files. The infected files can be used to test whether a virus scanner detects all versions of the virus.
  • Some anti-virus software employs bait files that are accessed regularly. When these files are modified, the anti-virus software warns the user that a virus is probably active on the system.


Since bait files are used to detect the virus, or to make detection possible, a virus can benefit from not infecting them. Viruses typically do this by avoiding suspicious programs, such as small program files or programs that contain certain patterns of 'garbage instructions'.

A related strategy to make baiting difficult is sparse infection. Sometimes, sparse infectors do not infect a host file that would be a suitable candidate for infection in other circumstances. For example, a virus can decide on a random basis whether to infect a file or not, or a virus can only infect host files on particular days of the week.

Stealth

Some viruses try to trick anti-virus software by intercepting its requests to the operating system. A virus can hide itself by intercepting the anti-virus software’s request to read the file and passing the request to the virus, instead of the OS
Operating system

An operating system is an interface between hardware and applications; it is responsible for the management and coordination of activities and the sharing of the limited resources of the computer....
. The virus can then return an uninfected version of the file to the anti-virus software, so that it seems that the file is "clean". Modern anti-virus software employs various techniques to counter stealth mechanisms of viruses. The only completely reliable method to avoid stealth is to boot from a medium that is known to be clean.

Self-modification
Most modern antivirus programs try to find virus-patterns inside ordinary programs by scanning them for so-called virus signatures. A signature is a characteristic byte-pattern that is part of a certain virus or family of viruses. If a virus scanner finds such a pattern in a file, it notifies the user that the file is infected. The user can then delete, or (in some cases) "clean" or "heal" the infected file. Some viruses employ techniques that make detection by means of signatures difficult but probably not impossible. These viruses modify their code on each infection. That is, each infected file contains a different variant of the virus.

Encryption with a variable key
A more advanced method is the use of simple encryption
Encryption

In cryptography, encryption is the process of transforming information using an algorithm to make it unreadable to anyone except those possessing special knowledge, usually referred to as a key ....
 to encipher the virus. In this case, the virus consists of a small decrypting module and an encrypted copy of the virus code. If the virus is encrypted with a different key for each infected file, the only part of the virus that remains constant is the decrypting module, which would (for example) be appended to the end. In this case, a virus scanner cannot directly detect the virus using signatures, but it can still detect the decrypting module, which still makes indirect detection of the virus possible. Since these would be symmetric keys, stored on the infected host, it is in fact entirely possible to decrypt the final virus, but that probably isn't required, since self-modifying code is such a rarity that it may be reason for virus scanners to at least flag the file as suspicious.

An old, but compact, encryption involves XORing each byte in a virus with a constant, so that the exclusive-or operation had only to be repeated for decryption. It is suspicious code that modifies itself, so the code to do the encryption/decryption may be part of the signature in many virus definitions.

Polymorphic code
Polymorphic code
Polymorphic code

In computer terminology, polymorphic code is code that mutates while keeping the original algorithm intact. This technique is sometimes used by computer viruses, shellcodes and computer worms to hide their presence....
 was the first technique that posed a serious threat to virus scanners. Just like regular encrypted viruses, a polymorphic virus infects files with an encrypted copy of itself, which is decoded by a decryption module. In the case of polymorphic viruses, however, this decryption module is also modified on each infection. A well-written polymorphic virus therefore has no parts which remain identical between infections, making it very difficult to detect directly using signatures. Anti-virus software can detect it by decrypting the viruses using an emulator, or by statistical pattern analysis of the encrypted virus body. To enable polymorphic code, the virus has to have a polymorphic engine (also called mutating engine or mutation engine) somewhere in its encrypted body. See Polymorphic code
Polymorphic code

In computer terminology, polymorphic code is code that mutates while keeping the original algorithm intact. This technique is sometimes used by computer viruses, shellcodes and computer worms to hide their presence....
 for technical detail on how such engines operate.

Some viruses employ polymorphic code in a way that constrains the mutation rate of the virus significantly. For example, a virus can be programmed to mutate only slightly over time, or it can be programmed to refrain from mutating when it infects a file on a computer that already contains copies of the virus. The advantage of using such slow polymorphic code is that it makes it more difficult for anti-virus professionals to obtain representative samples of the virus, because bait files that are infected in one run will typically contain identical or similar samples of the virus. This will make it more likely that the detection by the virus scanner will be unreliable, and that some instances of the virus may be able to avoid detection.

Metamorphic code
To avoid being detected by emulation, some viruses rewrite themselves completely each time they are to infect new executables. Viruses that use this technique are said to be metamorphic
Metamorphic code

In computer virus terms, metamorphic code is code that can reprogram itself. Often, it does this by translating its own code into a temporary representation, edit the temporary representation of itself, and then write itself back to normal code again....
. To enable metamorphism
Metamorphic code

In computer virus terms, metamorphic code is code that can reprogram itself. Often, it does this by translating its own code into a temporary representation, edit the temporary representation of itself, and then write itself back to normal code again....
, a metamorphic engine is needed. A metamorphic virus is usually very large and complex. For example, W32/Simile consisted of over 14000 lines of Assembly language
Assembly language

An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture....
 code, 90% of which is part of the metamorphic engine.

Vulnerability and countermeasures


The vulnerability of operating systems to viruses

Just as genetic diversity
Genetic diversity

Genetic diversity is a level of biodiversity that refers to the total number of Genetics characteristics in the genetic makeup of a species. It is distinguished from genetic variability, which describes the tendency of genetic characteristics to vary....
 in a population decreases the chance of a single disease wiping out a population, the diversity of software systems on a network similarly limits the destructive potential of viruses.

This became a particular concern in the 1990s, when Microsoft
Microsoft

Microsoft Corporation is a multinational corporation computer technology corporation that develops, manufactures, licenses, and supports a wide range of computer software products for computing devices....
 gained market dominance in desktop operating systems and office suite
Office suite

In computing, an office suite, sometimes called an office software suite or productivity suite is a collection of programs intended to be used by typical clerical and knowledge workers....
s. The users of Microsoft software (especially networking software such as Microsoft Outlook
Microsoft Outlook

Microsoft Office Outlook or Outlook is a personal information manager from Microsoft. The 2007 version is available both as a separate application as well as a part of the Microsoft Office suite....
 and Internet Explorer
Internet Explorer

Windows Internet Explorer , commonly abbreviated to IE, is a series of graphical user interface web browsers developed by Microsoft and included as part of the Microsoft Windows line of operating systems starting in 1995....
) are especially vulnerable to the spread of viruses. Microsoft software is targeted by virus writers due to their desktop dominance, and is often criticized for including many errors and holes for virus writers to exploit. Integrated and non-integrated Microsoft applications (such as Microsoft Office
Microsoft Office

Microsoft Office is a popular set of interrelated desktop applications, servers and services. Microsoft Office is collectively referred to as an office suite, for the Microsoft Windows and Mac OS X operating systems....
) and applications with scripting languages with access to the file system (for example Visual Basic Script (VBS), and applications with networking features) are also particularly vulnerable.

Although Windows is by far the most popular operating system for virus writers, some viruses also exist on other platforms. Any operating system that allows third-party programs to run can theoretically run viruses. Some operating systems are less secure than others. Unix-based OS's (and NTFS-aware applications on Windows NT based platforms) only allow their users to run executables within their own protected memory space.

An Internet based research revealed that there were cases when people willingly pressed a particular button to download a virus. Security analyst Didier Stevens ran a half year advertising campaign on Google AdWords which said "Is your PC virus-free? Get it infected here!". The result was 409 clicks.

, there are relatively few security exploits targeting Mac OS X
Mac OS X

Mac OS X is a line of computer operating systems developed, marketed, and sold by Apple Inc., and since 2002 has been included with all new Macintosh computer systems....
 (with a Unix-based file system and kernel). The number of viruses for the older Apple operating systems, known as Mac OS Classic, varies greatly from source to source, with Apple stating that there are only four known viruses, and independent sources
Independent sources

Independent sources, in journalism, criminal justice and general research, represent two or more people or organizations which attest to a given piece of information....
 stating there are as many as 63 viruses. Virus vulnerability between Macs and Windows is a chief selling point, one that Apple uses in their Get a Mac
Get a Mac

The Get a Mac campaign is a current television advertising campaign created for Apple Inc. by TBWA Worldwide, the company's advertising agency....
 advertising.

Windows and Unix have similar scripting abilities, but while Unix natively blocks normal users from having access to make changes to the operating system environment, older copies of Windows such as Windows 95 and 98 do not. In 1997, when a virus for Linux was released – known as "Bliss
Bliss (virus)

Bliss is a computer virus that infects Linux systems....
" – leading antivirus vendors issued warnings that Unix-like
Unix-like

A Unix-like operating system is one that behaves in a manner similar to a Unix system, while not necessarily conforming to or being certified to any version of the Single UNIX Specification....
 systems could fall prey to viruses just like Windows. The Bliss virus may be considered characteristic of viruses – as opposed to worms – on Unix systems. Bliss requires that the user run it explicitly (so it is a trojan), and it can only infect programs that the user has the access to modify. Unlike Windows users, most Unix users do not log in
Logging (computer security)

In computer security, login is the process by which individual access to a computer system is controlled by identification of the User using credentials provided by the user....
 as an administrator user except to install or configure software; as a result, even if a user ran the virus, it could not harm their operating system. The Bliss virus never became widespread, and remains chiefly a research curiosity. Its creator later posted the source code to Usenet, allowing researchers to see how it worked.

The role of software development

Because software is often designed with security features to prevent unauthorized use of system resources, many viruses must exploit software bug
Software bug

A software bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from behaving as intended . Most bugs arise from mistakes and errors made by people in either a program's source code or its software architecture, and a few are caused by compilers producing incorrect code....
s in a system or application to spread. Software development
Software engineering

Software engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches....
 strategies that produce large numbers of bugs will generally also produce potential exploits.

Anti-virus software and other preventive measures

Many users install anti-virus software that can detect and eliminate known viruses after the computer downloads or runs the executable. There are two common methods that an anti-virus software application uses to detect viruses. The first, and by far the most common method of virus detection is using a list of virus signature definitions. This works by examining the content of the computer's memory (its RAM, and boot sector
Boot sector

A boot sector is a disk_sector of a hard disk, floppy disk, or similar data storage device that contains code for booting computer programs stored in other parts of the disk....
s) and the files stored on fixed or removable drives (hard drives, floppy drives), and comparing those files against a database
Database

A database is a structured collection of records or data that is stored in a computer system. The structure is achieved by organizing the data according to a database model....
 of known virus "signatures". The disadvantage of this detection method is that users are only protected from viruses that pre-date their last virus definition update. The second method is to use a heuristic
Heuristic (computer science)

In computer science, a heuristic algorithm, or simply a heuristic, is an algorithm that is able to produce an acceptable solution to a problem in many practical scenarios, but for which there is no formal proof of its correctness....
 algorithm to find viruses based on common behaviors. This method has the ability to detect viruses that anti-virus security firms have yet to create a signature for.

Some anti-virus programs are able to scan opened files in addition to sent and received e-mails 'on the fly' in a similar manner. This practice is known as "on-access scanning." Anti-virus software does not change the underlying capability of host software to transmit viruses. Users must update their software regularly to patch
Patch (computing)

A patch is a small piece of software designed to fix problems with or update a computer program or its supporting data. This includes fixing computer bug, replacing graphics and improving the usability or performance....
 security holes. Anti-virus software also needs to be regularly updated in order to prevent the latest threats.

One may also minimise the damage done by viruses by making regular backup
Backup

In information technology, backup refers to making copies of data so that these additional copies may be used to restore the original after a data loss event....
s of data (and the Operating Systems) on different media, that are either kept unconnected to the system (most of the time), read-only or not accessible for other reasons, such as using different file system
File system

In computing, a file system is a method for store and organize computer files and the data they contain to make it easy to find and access them....
s. This way, if data is lost through a virus, one can start again using the backup (which should preferably be recent).

If a backup session on optical media
Optical disc

In computing, sound reproduction, and video, an optical disc is a flat, circular disc wherein Data is stored in the pits in its flat surface ? sequentially on the continuous, spiral track extending from the innermost track to the outermost track, covering the entire disc surface....
 like CD and DVD
DVD

DVD, also known as "Digital Versatile Disc" or "Digital Video Disc,"is a popular optical disc data storage device media format. Its main uses are video and data storage....
 is closed, it becomes read-only and can no longer be affected by a virus (so long as a virus or infected file was not copied onto the CD/DVD). Likewise, an operating system on a bootable can be used to start the computer if the installed operating systems become unusable. Backups on removable media must be carefully inspected before restoration. The Gammima virus, for example, propagates via removable flash drives.

Another method is to use different operating systems on different file systems. A virus is not likely to affect both. Data backups can also be put on different file systems. For example, Linux requires specific software to write to NTFS
NTFS

NTFS is the standard file system of Windows NT, including its later versions Windows 2000, Windows XP, Windows Server 2003, Windows Server 2008, Windows Vista, and Windows 7....
 partitions, so if one does not install such software and uses a separate installation of MS Windows to make the backups on an NTFS partition, the backup should remain safe from any Linux viruses (unless they are written to specifically provide this capability). Likewise, MS Windows can not read file systems like ext3
Ext3

The ext3 or third extended filesystem is a journaling file system that is commonly used by the Linux operating system. It is the default file system for many popular Linux distributions....
, so if one normally uses MS Windows, the backups can be made on an ext3 partition using a Linux installation.

Recovery methods

Once a computer has been compromised by a virus, it is usually unsafe to continue using the same computer without completely reinstalling the operating system. However, there are a number of recovery options that exist after a computer has a virus. These actions depend on severity of the type of virus.

Virus removal
One possibility on Windows Me
Windows Me

Windows Millennium Edition, or Windows Me , is a hybrid 16-bit/32-bit graphical operating system released on 14 September 2000 by Microsoft....
, Windows XP
Windows XP

Windows XP is a line of operating systems produced by Microsoft for use on personal computers, including home and business desktops, laptop, and media centers....
 and Windows Vista
Windows Vista

Windows Vista is one member in a family of operating systems developed by Microsoft for use on personal computers, including home and business Desktop computer, laptops, Tablet PCs, and media center PCs....
 is a tool known as System Restore
System Restore

System Restore is a component of Microsoft's Windows Me, Windows XP and Windows Vista operating systems that allows for the rolling back of system files, registry keys, installed programs, etc., to a previous state in the event of malfunctioning or failure....
, which restores the registry and critical system files to a previous checkpoint. Often a virus will cause a system to hang, and a subsequent hard reboot will render a system restore point from the same day corrupt. Restore points from previous days should work provided the virus is not designed to corrupt the restore files or also exists in previous restore points. Some viruses, however, disable system restore and other important tools such as Task Manager and Command Prompt. An example of a virus that does this is CiaDoor.

Administrators have the option to disable such tools from limited users for various reasons (for example, to reduce potential damage from and the spread of viruses). The virus modifies the registry to do the same, except, when the Administrator is controlling the computer, it blocks all users from accessing the tools. When an infected tool activates it gives the message "Task Manager has been disabled by your administrator.", even if the user trying to open the program is the administrator.

Users running a Microsoft operating system can access Microsoft's website to run a free scan, provided they have their 20-digit registration number.

Operating system reinstallation
Reinstalling the operating system is another approach to virus removal. It involves simply reformatting the OS partition and installing the OS from its original media, or imaging
Disk cloning

Disk cloning is a category of software which copies the contents of one computer hard disk to another or into an "image" . Often, the contents of the first disk are written to an disk image computer file as an intermediate step, and the second disk is loaded with the contents of the image....
 the partition with a clean backup image (Taken with Ghost
Ghost (software)

Ghost is a disk cloning program, originally produced by Binary Research, but purchased by Symantec in 1998. The Ghost program launched the market for disk-cloning software....
 or Acronis
Acronis

Acronis, Inc. is a company incorporated in Delaware that produces hard disk utility software, including disk-imaging backup and recovery, Partition manager, and boot management software....
 for example).

This method has the benefits of being simple to do, being faster than running multiple antivirus scans, and is guaranteed to remove any malware. Downsides include having to reinstall all other software, reconfiguring, restoring user preferences. User data can be backed up by booting off of a Live CD
Live CD

A live CD or live DVD is a CD or DVD containing a booting computer operating system. Live CDs are unique in that they have the ability to run a complete, modern operating system on a computer lacking Computer_storage , such as a hard disk drive....
 or putting the hard drive into another computer and booting from the other computer's operating system (though care must be taken not to transfer the virus to the new computer).

See also

  • Adware
    Adware

    Adware or advertising-supported software is any Computer software package which automatically plays, displays, or downloads advertisements to a computer after the software is installed on it or while the application is being used....
  • Antivirus software
    Antivirus software

    Antivirus software is computer software used to identify and remove computer viruses, as well as many other types of harmful computer software, collectively referred to as malware....
  • Attack tree
    Attack tree

    Attack trees are conceptual diagrams of threats on computer systems and possible attacks to reach those threats. The concept was suggested by Bruce Schneier, CIO of Counterpane Internet Security....
  • Black hat
    Black hat

    A black hat is the villain or bad guy, especially in a Western in which such a character would wear a black hat in contrast to the hero white hat....
  • Computer insecurity
    Computer insecurity

    Many current computer systems have only limited security precautions in place. This computer insecurity article describes the current battlefield of computer security exploit s and defenses....
  • Computer worm
    Computer worm

    A computer worm is a self-replicating computer program. It uses a network to send copies of itself to other nodes and it may do so without any user intervention....
  • Crimeware
    Crimeware

    Crimeware is a class of malware designed specifically to automate financial crime. The term was coined by Peter Cassidy, Secretary General of the Anti-Phishing Working Group to distinguish it from other kinds of malevolent programs....
  • Cryptovirology
    Cryptovirology

    Cryptovirology is a field that studies how to use cryptography to design powerful malware. The field was born with the observation that public key cryptography can be used to break the symmetry between what an antivirus analyst sees regarding a virus and what the virus writer sees....
  • Keystroke logging
    Keystroke logging

    Keystroke logging is a method of capturing and recording user keystrokes. The technique and name came from before the era of the graphical user interface; loggers nowadays would expect to capture mouse operations and screenshots....
  • List of computer viruses
    List of computer viruses

    To aid the fight against computer viruses and other malware many security advisory organizations and developers of anti-virus software compile and publish lists of viruses....
  • List of computer virus hoaxes
  • Linux malware
  • Malware
    Malware

    Malware, a portmanteau from the words Malice and Computer software, is software designed to infiltrate or damage a computer system without the owner's informed consent....
  • Mobile virus
    Mobile virus

    A mobile virus is an electronic Computer virus that targets mobile phones or wireless-enabled Personal digital assistantswireless phone and PDA networks become more numerous and more complex, it has become more difficult to secure them against electronic attacks in the form of viruses or other malicious software ....
    es
  • Multipartite virus
    Multipartite virus

    A multipartite virus is a computer virus that infects multiple different targets. The term was coined to describe the first viruses that included DOS executable files and PC BIOS boot sector virus code, where both parts are viral themselves....
  • Palm OS Viruses
    Palm OS Viruses

    While some computer viruses do exist for Palm OS based devices, very few have ever been designed. Typically, mobile devices are difficult for virus writers to target, since their simplicity provides many fewer security holes to target compared to a desktop....
  • Security through obscurity
    Security through obscurity

    In cryptography and computer security, security through obscurity is a principle in security engineering, which attempts to use secrecy to provide security....
  • Spam
    Spam (electronic)

    Spam is the abuse of electronic messaging systems to send unsolicited bulk messages indiscriminately. While the most widely recognized form of spam is e-mail spam, the term is applied to similar abuses in other media: Messaging spam, Newsgroup spam, spamdexing, spam in blogs, wiki spam, Classified advertising spam, mobile phone spam, Forum...
  • Spyware
    Spyware

    Spyware is computer software that is installed wikt:surreptitiously on a personal computer to intercept or take partial control over the user's interaction with the computer, without the user's informed consent....
  • Timeline of notable computer viruses and worms
    Timeline of notable computer viruses and worms

    This is a timeline of noteworthy computer viruses, computer worms and Trojan horse s....
  • Trojan horse (computing)
    Trojan horse (computing)

    The Trojan horse, also known as trojan, in the context of computer software, describes a class of computer threats that appears to perform a desirable function but in fact performs undisclosed malicious functions that allow unauthorized access to the host machine, giving them the ability to save their files on the user's computer...
  • Virus hoax
    Virus hoax

    A computer virus hoax is a false email message warning the recipient of a virus that is going around. The message usually serves as a chain e-mail that tells the recipient to forward it to everyone they know....
  • Eicar test file
    Eicar test file

    The EICAR test file is a file, developed by the EICAR, to test the response of computer antivirus programs. The rationale behind it is to allow people, companies, and AV programmers to test their software without having to use a real computer virus that could cause actual damage should the AV not respond correctly....


Further reading

  • Mark Russinovich, , Microsoft TechEd: IT Forum, November 2006
  • Jussi Parikka
    Jussi Parikka

    Jussi Parikka is a Finnish new media theorist and Reader in media studies at Anglia Ruskin University in Cambridge. He is also an adjunct research scholar at the International Institute for Popular Culture at the University of Turku in Finland....
     ( 2007) Digital Contagions. A Media Archaeology of Computer Viruses, Peter Lang: New York. Digital Formations-series


External links

  • " (early) by Dr. Alan Solomon
  • by Andrew Ross
    Andrew Ross

    Andrew Ross is the chair of the Department of Social and Cultural Analysis at New York University. A writer for Artforum, The Nation and The Village Voice, he is also the author and/or editor of numerous books....
  • by Tony Sampson
  • by Tony Sampson
  • by Jussi Parikka
    Jussi Parikka

    Jussi Parikka is a Finnish new media theorist and Reader in media studies at Anglia Ruskin University in Cambridge. He is also an adjunct research scholar at the International Institute for Popular Culture at the University of Turku in Finland....
  • " by Jussi Parikka
    Jussi Parikka

    Jussi Parikka is a Finnish new media theorist and Reader in media studies at Anglia Ruskin University in Cambridge. He is also an adjunct research scholar at the International Institute for Popular Culture at the University of Turku in Finland....
  • " by Thierry Bardini
    Thierry Bardini

    Thierry Bardini is a France sociologist who did all his academic career outside France. He is an associate professor in the Department of Communication at the Universit? de Montr?al, Canada, where he co-directs the Workshop in Radical Empiricism ....
  • (Video)