26.12.2014 Views

Absolute PC Security and Privacy.pdf

Absolute PC Security and Privacy.pdf

Absolute PC Security and Privacy.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

How they infect files differs from virus to virus. In fact, there are seven different ways that<br />

file infector viruses can infect individual files:<br />

Parasitic Viruses Parasitic viruses are those that change the contents of the infected files, but<br />

in a way that allows those files to remain completely or partly usable. These viruses do this by<br />

appending themselves to the very beginning (top) or end (bottom) of a file, or inserting<br />

themselves somewhere in the middle. In most instances, the original code is moved up or<br />

down to make room for the virus code, with the unfortunate side effect (in some cases) of<br />

losing any program code that doesn’t fit within the original file parameters. In the cases where<br />

virus code is inserted into the middle of the file, the insertion is made into a “cavity”—a<br />

currently unused area of the file. Parasitic viruses, however, typically retain a large enough<br />

portion of the original program code to enable the program to work more or less as normal.<br />

Overwriting Viruses An overwriting virus does just what the name implies—it overwrites<br />

the original program code with its own code. This destroys the original code, of course, which<br />

causes the program file to stop working properly.<br />

Entry-Point Obscuring Viruses A particularly subtle way of infecting a file is to insert not<br />

the virus code itself, but instead code that launches separate virus code. These viruses—called<br />

Entry-Point Obscuring (EPO) viruses—have no distinct entry point in the host file <strong>and</strong> thus<br />

don’t load themselves into memory when the host file is run. The instruction to run the virus<br />

code is typically executed under specific program conditions, thus enabling the virus to<br />

“sleep” inside a file for an extended period of time.<br />

Companion Viruses A companion virus doesn’t alter the infected file; instead, it creates a<br />

clone of the host file, which is then run instead of the original file. This was fairly common in<br />

the DOS operating system, which would run a COM file instead of a similarly named EXE<br />

file. The virus might create a clone of xcopy.exe, for example, named xcopy.com; when the<br />

user entered the xcopy comm<strong>and</strong>, assuming to run the xcopy.exe file, the infected xcopy.com<br />

file would run instead. Companion viruses can also work by renaming the target file <strong>and</strong><br />

assigning the original file name to the infected clone, or by altering the DOS path to find the<br />

infected file before the original file.<br />

Worms A worm is a special type of companion virus that is not connected to any preexisting<br />

file. Instead, a worm copies its code to a completely new file, in the hope that the user will<br />

accidentally execute the new file. To that end, worm files typically have semi-familiar names<br />

that invite an action, such as install.exe or run.bat. Worms can also insert the comm<strong>and</strong> to run<br />

the infected file into BAT files, or into the Windows Startup folder.<br />

Note This type of worm, more technically called a file worm, is distinct from the category of<br />

network worms, which use network <strong>and</strong> Internet protocols to proliferate. To learn more<br />

about worms, turn to Chapter 6, “Trojan Horses <strong>and</strong> Worms.”<br />

Link Viruses A link virus, like a companion virus, does not change the physical<br />

contents of a host file. Instead, when the host file is run, the operating system is forced<br />

to execute the virus code. The virus does this by modifying the first cluster of the host<br />

file to point to a different cluster, which actually contains the virus code. Thus, when the<br />

host program is launched, the virus is launched simultaneously—as if it were included<br />

in the host file itself.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!