Beruflich Dokumente
Kultur Dokumente
Term paper of operating system program that appears harmless but hides malicious
Topic - How windows operating system handles viruses? functions. Worms and Trojan horses, like viruses, may harm
Write down various viruses that can cause serious damage
a computer system's data or performance. Some viruses and
other malware have symptoms noticeable to the computer
user, but many are surreptitious or simply do nothing to call
Submitted to Submitted by attention to themselves. Some viruses do nothing beyond
Lect.Pushpinder Shailja reproducing themselves.
RE2802B36
10800791 Virus programs
installed themselves into the disk boot sector, ensuring that Viruses that spread using cross side scripting were first
they would be run when the user booted the computer from reported in 2002 and were academically demonstrated in
the disk, usually inadvertently. PCs of the era would attempt 2004 there have been multiple instances of the cross-site
to boot first from a floppy if one had been left in the drive. scripting viruses in the wild, exploiting websites such as
Until floppy disks fell out of use, this was the most myspace and yahoo
successful infection strategy and boot sector viruses were A. Infection strategies
the most common in the wild for many years
In order to replicate itself, a virus must be permitted to
Traditional computer viruses emerged in the 1980s, driven
execute code and write to memory. For this reason, many
by the spread of personal computers and the resultant
viruses attach themselves to executable files that may be
increase in bbs modem use, and software sharing Boolean
part of legitimate programs. If a user attempts to launch an
board-driven software sharing contributed directly to the
infected program, the virus' code may be executed
spread of Trojan horse programs, and viruses were written to
simultaneously. Viruses can be divided into two types based
infect popularly traded software shareware and bootleg
on their behavior when they are executed. Nonresident
software were equally common vecrtors for viruses on
viruses immediately search for other hosts that can be
BBS's .macro viruses have become common since the mid-
infected, infect those targets, and finally transfer control to
1990s. Most of these viruses are written in the scripting
the application program they infected. Resident viruses do
languages for Microsoft programs such a word and
not search for hosts when they are started. Instead, a resident
excel and spread throughout Microsoft office by infecting
virus loads itself into memory on execution and transfers
documents and spreadsheets. Since Word and Excel were
control to the host program. The virus stays active in the
also available for MAC os, most could also spread to
background and infects new hosts when those files are
macintosh computers. Although most of these viruses did
accessed by other programs or the operating system itself.
not have the ability to send infected email, those viruses
1) Nonresident viruses
which did take advantage of the Microsoft outlook co
interface Nonresident viruses can be thought of as consisting of
a finder module and a replication module. The finder
Some old versions of Microsoft Word allow macros to
module is responsible for finding new files to infect. For
replicate themselves with additional blank lines. If two
each new executable file the finder module encounters, it
macro viruses simultaneously infect a document, the
calls the replication module to infect that file.
combination of the two, if also self-replicating, can appear
2) Resident viruses
as a "mating" of the two and would likely be detected as a
virus unique from the "parents Resident viruses contain a replication module that is similar
to the one that is employed by nonresident viruses. This
A virus may also send a webadress link link as an instsnt
module, however, is not called by a finder module. The
message to all the contacts on an infected machine. If the
virus loads the replication module into memory when it is
recipient, thinking the link is from a friend (a trusted source)
executed instead and ensures that this module is executed
follows the link to the website, the virus hosted at the site
each time the operating system is called to perform a certain
may be able to infect this new computer and continue
operation. The replication module can be called, for
propagating.
example, each time the operating system executes a file. In
INSTITUTE OF TECHNOLOGY, NIRMA UNIVERSITY, AHMEDABAD – 382 481, 27-29 NOVEMBER, 2008 3
this case the virus infects every suitable program that is General-purpose script files (such as batch
executed on the computer. files in MS-DOS and Microsoft
Windows, VBScript files, and shell script files on Unix-
Resident viruses are sometimes subdivided into a category
like platforms).
of fast infectors and a category of slow infectors. Fast
infectors are designed to infect as many files as possible. A Application-specific script files (such as Telix-
fast infector, for instance, can infect every potential host file scripts)
that is accessed. This poses a special problem when using System specific autorun script files (such
anti-virus software, since a virus scanner will access every as Autorun.inf file needed by Windows to automatically
potential host file on a computer when it performs a system- run software stored on USB Memory Storage Devices).
wide scan. If the virus scanner fails to notice that such a
Documents that can contain macros (such
virus is present in memory the virus can "piggy-back" on the
as Microsoft Word documents, Microsoft
virus scanner and in this way infect all files that are
Excel spreadsheets, AmiPro documents, and Microsoft
scanned. Fast infectors rely on their fast infection rate to
Access database files)
spread. The disadvantage of this method is that infecting
many files may make detection more likely, because the Cross-site scripting vulnerabilities in web
virus may slow down a computer or perform many applications (see XSS Worm)
suspicious actions that can be noticed by anti-virus software. Arbitrary computer files. An exploitable buffer
Slow infectors, on the other hand, are designed to infect overflow, format string, race condition or other
hosts infrequently. Some slow infectors, for instance, only exploitable bug in a program which reads the file could
infect files when they are copied. Slow infectors are be used to trigger the execution of code hidden within
designed to avoid detection by limiting their actions: they it. Most bugs of this type can be made more difficult to
are less likely to slow down a computer noticeably and will, exploit in computer architectures with protection
at most, infrequently trigger anti-virus software that detects features such as an execute disable bit and/or address
suspicious behavior by programs. The slow infector space layout randomization.
approach, however, does not seem very successful.
PDFs, like HTML, may link to malicious code. PDFs can
B. Vectors and hosts also be infected with malicious code.
Viruses have targeted various types of transmission media or In operating systems that use file extensions to determine
hosts. This list is not exhaustive: program associations (such as Microsoft Windows), the
extensions may be hidden from the user by default. This
Binary executable files (such as COM
makes it possible to create a file that is of a different type
files and EXE files in MS-DOS, Portable
than it appears to the user. For example, an executable may
Executable files in Microsoft Windows, the Mach-O
be created named "picture.png.exe", in which the user sees
format in OSX, and ELF files in Linux)
only "picture.png" and therefore assumes that this file is an
Volume Boot Records of floppy disks and hard disk image and most likely is safe, yet when opened runs the
partitions executable on the client machine.
An additional method is to generate the virus code from therefore increase the likelihood that the virus is detected.
parts of existing operating system files by using the For this reason, some viruses are programmed not to infect
CRC16/CRC32 data. The initial code can be quite small programs that are known to be part of anti-virus software.
(tens of bytes) and unpack a fairly large virus. This is Another type of host that viruses sometimes avoid are bait
analogous to a biological "prion" in the way it works but is files. Bait files (or goat files) are files that are specially
vulnerable to signature based detection. This attack has not created by anti-virus software, or by anti-virus professionals
yet been seen "in the wild". themselves, to be infected by a virus. These files can be
C. Methods to avoid detection created for various reasons, all of which are related to the
detection of the virus:
In order to avoid detection by users, some viruses employ
Anti-virus professionals can use bait files to take a
different kinds of deception. Some old viruses, especially on
sample of a virus (i.e. a copy of a program file that is
the MS-DOS platform, make sure that the "last modified"
infected by the virus). It is more practical to store and
date of a host file stays the same when the file is infected by
exchange a small, infected bait file, than to exchange a
the virus. This approach does not fool anti-virus software,
large application program that has been infected by the
however, especially those which maintain and date Cyclic
virus.
redundancy checks on file changes.
Anti-virus professionals can use bait files to study
Some viruses can infect files without increasing their sizes
the behavior of a virus and evaluate detection methods.
or damaging the files. They accomplish this by overwriting
This is especially useful when the virus is polymorphic.
unused areas of executable files. These are called cavity
In this case, the virus can be made to infect a large
viruses. For example, the CIH virus, or Chernobyl Virus,
number of bait files. The infected files can be used to
infects Portable Executable files. Because those files have
test whether a virus scanner detects all versions of the
many empty gaps, the virus, which was 1 KB in length, did
virus.
not add to the size of the file.
Some anti-virus software employs bait files that are
Some viruses try to avoid detection by killing the tasks accessed regularly. When these files are modified, the
associated with antivirus software before it can detect them. anti-virus software warns the user that a virus is
probably active on the system.
As computers and operating systems grow larger and more
complex, old hiding techniques need to be updated or Since bait files are used to detect the virus, or to make
replaced. Defending a computer against viruses may detection possible, a virus can benefit from not infecting
demand that a file system migrate towards detailed and them. Viruses typically do this by avoiding suspicious
explicit permission for every kind of file access. programs, such as small program files or programs that
contain certain patterns of 'garbage instructions'.
1) Avoiding bait files and other undesirable
hosts
A related strategy to make baiting difficult is sparse
A virus needs to infect hosts in order to spread further. In infection. Sometimes, sparse infectors do not infect a host
some cases, it might be a bad idea to infect a host program. file that would be a suitable candidate for infection in other
For example, many anti-virus programs perform an integrity circumstances. For example, a virus can decide on a random
check of their own code. Infecting such programs will
INSTITUTE OF TECHNOLOGY, NIRMA UNIVERSITY, AHMEDABAD – 382 481, 27-29 NOVEMBER, 2008 5
basis whether to infect a file or not, or a virus can only symmetric keys, stored on the infected host, it is in fact
infect host files on particular days of the week. entirely possible to decrypt the final virus, but this is
2) Stealth probably not required, since self-modifying code is such a
rarity that it may be reason for virus scanners to at least flag
Some viruses try to trick antivirus software by intercepting
the file as suspicious.
its requests to the operating system. A virus can hide itself
by intercepting the antivirus software’s request to read the An old, but compact, encryption involves XORing each byte
file and passing the request to the virus, instead of the OS. in a virus with a constant, so that the exclusive-or operation
The virus can then return an uninfected version of the file to had only to be repeated for decryption. It is suspicious for a
the antivirus software, so that it seems that the file is code to modify itself, so the code to do the
"clean". Modern antivirus software employs various encryption/decryption may be part of the signature in many
techniques to counter stealth mechanisms of viruses. The virus definitions.
only completely reliable method to avoid stealth is to boot c) Polymorphic code
from a medium that is known to be clean.
Polymorphic code was the first technique that posed a
a) Self-modification
serious threat to virus scanners. Just like regular encrypted
Most modern antivirus programs try to find virus-patterns viruses, a polymorphic virus infects files with an encrypted
inside ordinary programs by scanning them for so- copy of itself, which is decoded by a decryption module. In
called virus signatures. A signature is a characteristic byte- the case of polymorphic viruses, however, this decryption
pattern that is part of a certain virus or family of viruses. If a module is also modified on each infection. A well-written
virus scanner finds such a pattern in a file, it notifies the polymorphic virus therefore has no parts which remain
user that the file is infected. The user can then delete, or (in identical between infections, making it very difficult to
some cases) "clean" or "heal" the infected file. Some viruses detect directly using signatures. Antivirus software can
employ techniques that make detection by means of detect it by decrypting the viruses using an emulator, or by
signatures difficult but probably not impossible. These statistical pattern analysis of the encrypted virus body. To
viruses modify their code on each infection. That is, each enable polymorphic code, the virus has to have
infected file contains a different variant of the virus. a polymorphic engine (also called mutating engine or
b) Encryption with a variable key mutation engine) somewhere in its encrypted body.
See Polymorphic code for technical detail on how such
A more advanced method is the use of simple encryption to
engines operate.
encipher the virus. In this case, the virus consists of a small
decrypting module and an encrypted copy of the virus code. Some viruses employ polymorphic code in a way that
If the virus is encrypted with a different key for each constrains the mutation rate of the virus significantly. For
infected file, the only part of the virus that remains constant example, a virus can be programmed to mutate only slightly
is the decrypting module, which would (for example) be over time, or it can be programmed to refrain from mutating
appended to the end. In this case, a virus scanner cannot when it infects a file on a computer that already contains
directly detect the virus using signatures, but it can still copies of the virus. The advantage of using such slow
detect the decrypting module, which still makes indirect polymorphic code is that it makes it more difficult for
detection of the virus possible. Since these would be antivirus professionals to obtain representative samples of
6 NATIONAL CONFERENCE ON CURRENT TRENDS IN TECHNOLOGY, ‘NUCONE – 2008’
the virus, because bait files that are infected in one run will platforms. Any operating system that allows third-party
typically contain identical or similar samples of the virus. programs to run can theoretically run viruses. Some
This will make it more likely that the detection by the virus operating systems are more secure than others. Unix-based
scanner will be unreliable, and that some instances of the operating systems (and NTFS-aware applications on
virus may be able to avoid detection. Windows NT based platforms) only allow their users to run
d) Metamorphic code executables within their own protected memory space.
To avoid being detected by emulation, some viruses rewrite An Internet based experiment revealed that there were cases
themselves completely each time they are to infect new when people willingly pressed a particular button to
executables. Viruses that utilize this technique are said to be download a virus. Security analyst Didier Stevens ran a half
metamorphic. To enable metamorphism, a metamorphic year advertising campaign on Google Ad Words which said
engine is needed. A metamorphic virus is usually very large "Is your PC virus-free? Get it infected here!". The result was
and complex. For example, W32/Simile consisted of over 409 clicks.
14000 lines of Assembly language code, 90% of which is
As of 2006, there are relatively few security exploits
part of the metamorphic engine.
targeting Mac OS X (with a Unix-based file system
D. Vulnerability and countermeasures
and kernel) The number of viruses for the older Apple
1) The vulnerability of operating systems to operating systems, known as Mac OS Classic, varies greatly
viruses from source to source, with Apple stating that there are only
Just as genetic diversity in a population decreases the four known viruses, and independent sources stating there
chance of a single disease wiping out a population, the are as many as 63 viruses. Many Mac OS Classic viruses
diversity of software systems on a network similarly limits targeted the HyperCard authoring environment. The
the destructive potential of viruses. This became a particular difference in virus vulnerability between Macs and
The users of Microsoft software (especially networking 2009, Symantec announced the discovery of a trojan that
software such as Microsoft Outlook and Internet Explorer) targets Macs. This discovery did not gain much coverage
are especially vulnerable to the spread of viruses. Microsoft until April 2009.
Although Windows is by far the most popular target prey to viruses just like Windows. The Bliss virus may be
operating system for virus writers, viruses also exist on other considered characteristic of viruses – as opposed to worms –
INSTITUTE OF TECHNOLOGY, NIRMA UNIVERSITY, AHMEDABAD – 382 481, 27-29 NOVEMBER, 2008 7
on Unix systems. Bliss requires that the user run it Some anti-virus programs are able to scan opened files in
explicitly, and it can only infect programs that the user has addition to sent and received e-mails "on the fly" in a
the access to modify. Unlike Windows users, most Unix similar manner. This practice is known as "on-access
users do not log in as an administrator user except to install scanning". Anti-virus software does not change the
or configure software; as a result, even if a user ran the underlying capability of host software to transmit viruses.
virus, it could not harm their operating system. The Bliss Users must update their software regularly to patch security
virus never became widespread, and remains chiefly a holes. Anti-virus software also needs to be regularly updated
research curiosity. Its creator later posted the source code to in order to recognize the latest threats.
Usenet, allowing researchers to see how it worked.
One may also minimize the damage done by viruses by
2) The role of software development
making regular backups of data (and the operating systems)
Because software is often designed with security features to on different media, that are either kept unconnected to the
prevent unauthorized use of system resources, many viruses system (most of the time), read-only or not accessible for
must exploit Software bugs in a system or application to other reasons, such as using different file systems. This way,
spread. Software development strategies that produce large if data is lost through a virus, one can start again using the
numbers of bugs will generally also produce potential backup (which should preferably be recent).
exploits.
If a backup session on optical media like CD and DVD is
3)Anti-virus software and other preventive
closed, it becomes read-only and can no longer be affected
measures
by a virus (so long as a virus or infected file was not copied
Many users install anti-virus software that can detect and onto the CD/DVD). Likewise, an operating system on
eliminate known viruses after the computer downloads or a bootable CD can be used to start the computer if the
runs the executable. There are two common methods that installed operating systems become unusable. Backups on
an anti-virus software application uses to detect viruses. The removable media must be carefully inspected before
first, and by far the most common method of virus detection restoration. The Gammima virus, for example, propagates
is using a list of virus signature definitions. This works by via removable flash drives
examining the content of the computer's memory (its RAM,
4) Recovery methods
and boot sectors) and the files stored on fixed or removable
drives (hard drives, floppy drives), and comparing those Once a computer has been compromised by a virus, it is
files against a database of known virus "signatures". The usually unsafe to continue using the same computer without
disadvantage of this detection method is that users are only completely reinstalling the operating system. However,
protected from viruses that pre-date their last virus there are a number of recovery options that exist after a
definition update. The second method is to use computer has a virus. These actions depend on severity of
behaviors. This method has the ability to detect novel a) Virus removal
viruses that anti-virus security firms have yet to create a
One possibility on Windows Me, Windows XP, Windows
signature for.
Vista and Windows 7 is a tool known as System Restore,
which restores the registry and critical system files to a
previous checkpoint. Often a virus will cause a system to
8 NATIONAL CONFERENCE ON CURRENT TRENDS IN TECHNOLOGY, ‘NUCONE – 2008’
hang, and a subsequent hard reboot will render a system has been restored precautions must be taken to avoid
restore point from the same day corrupt. Restore points from reinfection from a restored executable file.
previous days should work provided the virus is not
These methods are simple to do, may be faster than
designed to corrupt the restore files or also exists in previous
disinfecting a computer, and are guaranteed to remove any
restore points. Some viruses, however, disable System
malware. If the operating system and programs must be
Restore and other important tools such as Task
reinstalled from scratch, the time and effort to reinstall,
Manager and Command Prompt. An example of a virus that
reconfigure, and restore user preferences must be taken into
does this is CiaDoor. However, many such viruses can be
account. Restoring from an image is much faster, totally
removed by rebooting the computer, entering Windows safe
safe, and restores the exact configuration to the state it was
mode, and then using system tools.
in when the image was made, with no further trouble.
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). A virus
can modify the registry to do the same even if the
Administrator is controlling the computer; it blocks all users
including the administrator from accessing the tools. The
message "Task Manager has been disabled by your
administrator" may be displayed, even to the administrator.