Saturday, 19 May 2007

Computer Viruses: The Underlying Truth

What is a computer virus


As soon we think of the word "virus" we think of a deadly wriggling creature, which is out to destroy everything. So first thing first, a computer virus is NOT a living thing!! In computer terminology though "virus" is nothing but a piece of code ( 'a computer program' in simple terms ) which is intentionally programmed to do some mischief! All Viruses are self-replicating in nature, by making a copy of itself and copying it to other media it makes sure it affects a large number of it target. Self-replication is the property that distinguishes a virus program from other types of programs.

Virus isn't the only nasty thing waiting to harm you, there are other types of malicious programs wandering in the cyber-space waiting to attack. Major types of these programs are

1) Trojan Horses : These are programs that otherwise seem to be normal, non-harmful software, but internally they hide their dirty piece of code, which does bad things to the user, which uses it. A Trojan may be a carrier of a virus! They got their name from the famous Trojan horse legend.

2) Worms : These programs do nothing but make copies of their own, spreading themselves over computer networks if the computer on which they reside is connected to a network. They increase in number very rapidly thus eating up the entire disk-space, slowing down the system and eating up into to valuable computer resources. They also slow down computer networks, as the network gets clogged up carrying these worms to other hosts!! A property that distinguishes a virus from a worm is that viruses not only make copies of themselves, they also attach their code to other normal programs, which become the carrier of these viruses. Viruses also do other bad things like destroying your hard-disk etc. whereas a worm only makes copies of itself. Also viruses 'normally' do not replicate as fast as worms do. Worms's sole intention is to eat up all the various computer resources and storage-space.

3) Bomb : These are as bad as a virus, but these programs do not replicate as viruses and worms do. Bombs are planted on a computer system and when some special event occurs, it triggers the bomb and it explodes. In plain English terms these programs do their 'nasty-work' when a specific event occurs. For example a bomb hidden inside a game might erase all the contents of your 'C:' drive ( for Unix/Linux may be your 'home' directory! ) after the game has been run for 5 times.


We will limit our discussion only to viruses. As a reminder a 'virus' can be differentiated from it's other counterparts by the property of 'replication' it exhibits.

A virus can be simply irritating as the famous cascade virus, which made the characters on the screen fall-down at random! Or they can be as deadly as some variants of Jerusalem, which erase every program run on Friday the 13th. So how did these viruses came into being?

How is a virus born
`````````````````
```````````

Viruses do not come from nowhere, they need to be created and the creators are non other than the Homo-sapiens. Some human beings out of frustration, for taking revenge, just for fun or just for the heck of it, write viruses. One thing commendable about them is that they have real expertise in computers. They are very good at programming (mostly in more than one languages) and know the internal tid-bits and loopholes of the system.

Virus writers aren't people who have an image or personality of an underworld don. A virus writer can be a person like the best-student in your class with spectacles always lost in his books or a person like the best cricket player in your college always with a bat in his hand, never to be seen in the class. The point is you cannot make out a person from his appearance whether he was the one behind the last week's headlines about a virus attack. And one thing more, age does not matter when it comes to writing viruses. An 80 years old can write a virus too, provided he has the expertise (and health ).


A brief History
`````````````````````

First computer viruses were found on the Macintosh's Apple-II computer series, in the late 1981. No record of who made it is present as yet! In early 1980s, Fred Cohen did extensive theoretical research, as well as setting up and performing numerous practical experiments, regarding viral type programs. His dissertation was presented in 1986 as part of the requirements for a doctorate in electrical engineering from the University of Southern California.

Dr. Cohen's definition of a computer virus as "a program that can 'infect' other programs by modifying them to include a version of itself" is generally accepted as a standard. On occasion it presents problems with the acceptance of, say, boot sector viral programs and entities such as the Internet/UNIX/Morris worm. However, his work did experimentally demonstrate and theoretically prove many vital issues.

The fame of being the first DOS based virus goes to '(c) Brain', it is said to have been developed by two Pakistani Brothers, from the text that had the name and address of these two brothers. This is generally accepted but it may not be the case as replacing a text string in an executable file is not difficult! (c) Brain is a boot-sectors virus. It is probably the first very successful virus! Successful in the terms that it got to spread very widely.

As more and more viruses came into existence, the wannabe virus writers used the existing ones as template and created new increasing the already growing number exponentially. Early viruses were limited to Boot-sectors and executable files. But with the invention of various scripting languages now-a-days the scenario is changing rapidly with the virus writers exploring new methods and new loopholes in the system.


The Present Scenario
````````````````````````

Earlier a program was only able to infect an executable file, it may delete data files but infecting a data file won't serve any purpose. As data files are not executed a virus won't get activated if an infected data file is used! But now a days many popular software encompass a powerful scripting language making it possible for virus writers to infect even data files which are used by programs that support a scripting language. A scripting language is not a full-fledged computer language, it was invented to include small programs in data files(not always), that would do long and repetitive tasks. An example is Microsoft's Word. It supports a scripting language (a subset of Visual Basic), you can use it, for example, to make portion of text superscript every time you press a specific key-combination. For this you just need to write a small script and attach it to that key-combination and it will run every time you that key-combination.

Earlier scripting languages had limited capabilities and command set, but as demand and necessities grew they become as powerful as any other programming language. Virus writers used this power to their advantage and created viruses that could infect even a data file. For example you can have a script (also called as a macro in MS-Word) in your Word document which runs every time you open that document. Suppose a virus replaces this macro, then whenever you'll open this infected file, the virus code will be executed! The 'data-file', macro or a scripting file virus was MS-Word Concept virus. Other programs like MS-Excel, Internet Browsers (Internet Explorer, Netscape, Mozilla etc), certain email clients (like MS-Outlook express etc) also have scripting language support and hence are vulnerable to a virus attack.

Now that I have filled you up with fear and left all wondering how to save yourself from these viruses ready to attack you system, let's get to the ground reality. As a fact, most data-loss and computer problems are still not caused by viruses, instead the major factor for all these problems still remains to be hardware problems, software problems and mistakes caused by humans. Viruses account only for a very little percentage of all the data-loss and computer problems. But if you are careless and have little knowledge about your computer system, it is very likely that you are included in that 'little percentage'. Remember it's always best to take precautions, than to lament later!!

How computer viruses DO NOT spread
```````````````````````````````

First let us discuss how computer viruses do not spread, as most people have misconceptions about how a virus spreads, which leads to unnecessary panic.

* A virus does not spread by a simple insertion of a floppy disk into the drive

* CD-ROMs (Compact Disc - Read only memory) cannot be infected by viruses as they are read-only media and can be written over only-once. Even though writable CD-ROM are present in the market, including the code to write on such CD's will make the virus very big and also takes too much time to write on writable CD-ROMs.

* Viruses cannot be spread by opening data files (Provided the data-file does not has any scripts attached AND most importantly the program being used to view that file should not support the scripting language used in that data-file. For example you can open an infected MS-Word document in Microsoft's Notepad without any risk)

* Just by connecting to the internet you cannot get a virus

* By doing a directory listing (DIR) on an infected media won't make your system infected

* Your system won't get infected even if you open the infected executable files in some text editor.

* Viewing e-mails that have virus as attachment won't get your system to be infected, until you open the attachment. (some e-mail clients like Outlook Express that automatically open the attachment do not follow this rule, though Microsoft has come up with improved versions, it always best to explore your e-mail clients configurations options and switch of scripting languages and auto-open of attachment features.) Almost all web-based e-mail providers won't open your e-mail attachments automatically (like Indiatimes, Yahoo!, RediffMail etc.)

* Viewing web-pages do not risk you to virus infection!

* Viewing Pictures, images and/or listening to music on the net on your system won't risk your system to virus attack, as all these are data files and luckily do not have any scripting language feature (as yet).

* You cannot get infected by erroneous use of your computer or software. Keyboard typing errors or playing with your BIOS won't infect you though it might affect you in some other harmful manner if you don't know what you are doing! ;)

I guess I've cleared enough misconceptions about how computer viruses do not spread. Now let's see how much risk you run of getting an infection!

How vulnerable are you to virus attack
```````````````````````````````````````````

Well if we go by the theory of probability then everyone runs the risk of getting a virus to some extent. Let's explore how high is the probability in your case.

Viruses do not spread on their own they need some kind of human intervention. You need to execute the virus infected program or open a document infected by a scripting language virus a program that is capable of executing those virus scripts. Unless any or one of these thing occurs, you cannot get infected. Some viruses are infect the boot-sector of a floppy disk (or a hard-disk), if you boot from such a floppy then also you can get infected by a virus. One VERY important point to note here is that, even though a floppy is not bootable but is infected and you try to boot from it then you will get infected. This happens because all floppy disks contain a small portion of storage space know as boot-sector. This small sector of memory contains the boot-image which is loaded by the system and executed if you try to boot from a floppy. So even-though the system file might not be present on a floppy, it can have a virus code in this boot-sector.

Considering the above mentioned points you run the risk of getting infected

1) If you use pirated software (Which have a high probability of being infected)
2) Run programs obtained from unauthorized source
3) Open (and execute) e-mail attachments obtained from unknown sources
4) Use buggy e-mail clients that automatically open e-mail attachments
5) Execute software obtained via Online Chat
6) Use World Wide Web browsers that do not have adequate security measures as to how much control a script embedded in a web-page should have on your system.
7) If you are connected to a Network (like LAN etc) and run every XYZ program you come across on the network (provided you have the permission to run those programs)


The bottom line is the virus needs to be activated (executed) at least once before it can affect your system and spread further. This activation occurs by all the ways mentioned above.

A Cell Phone virus? thankfully not as yet!
````````````````````````````````````````````````````````

Rumors about a cell phone virus are doing rounds across the globe despite regular denial of such a thing as a cell phone virus by various computer experts and cell phone vendors. The simple fact why a cell phone cannot get a virus is that it still cannot execute any external piece of software or program. Now questions may arise in the readers mind that why such a thing is not possible? A cell phone has a network same as the Internet, it even has a microprocessor as in your computer. Today's cell phones can even connect to the internet and allow you to send e-mail, view WebPages etc. Then what is the fact that makes cell phones immune to viruses?

As I mentioned earlier, a virus needs to have it's code i.e. instructions executed for it to become activated also it must have some permanent storage place where it can keep itself stored for further activation. In case of cell phones thought they have memory it is never used for storing of any executable programs, also cell-phones never execute the data they receive and send. The microprocessor only executes the software hard-wired on to the ROM (read only memory) chips inside the cell-phone.

Since technology like WAP (Wireless Application Protocol) now enable computers to communicate with the cell-phones, a virus was reported that used this technology to send SMS (Short messaging service) messages to random cell phone numbers. Out here, note that the computer system and not the cell-phone is infected by the virus. Till we have cell-phones that can store and execute external piece of code, a cell phone virus can be the theme of sci-fi Hollywood Movies!

Few simple steps to be safe from viruses
``````````````````````````````````````````````````````

Now on to some very simple steps to save you from a virus attack. One thing to note here is that there is no such thing as fool-proof. As the Moores Law of computer states "If anything can go wrong it Will" ( Now don't start believing it okay .. ;) )

But the fact is, with every increasing types of viruses and the temptation to run the game program e-mailed by your Online-Chat buddy makes it really difficult to be completely safe from virus attacks. But nonetheless it the risk can be brought down if we follow the following simple steps

1) Never boot from an unknown floppy.

2) Change your boot sequence to 'C' drive first from the BIOS ( you can get into BIOS settings by pressing the del key or F1 key one some systems. Look at your BIOS manual if the key combination is different) This way you will be saved by accidental boot from a floppy that you left after copying the text files from it!!

3) Do not open (execute) e-mail attachments you receive from unknown persons or sources.

4) Do not download and run programs from Web Sites that you do not trust ( or programs that you do not trust)

5) If you see any strange looking executable file on your system do not execute it (I know it is
very tempting specially for people like me who like to know what that piece of code does that's taking up valuable space on my hard-disk)

6) Don't use pirated software (Though not all but chances are high that it may be infected)

7) Turn of scripting support unless you really require it!

8) Disable ActiveX support in Microsoft's Internet Explorer web browser, it causes more problem than fun!

9) Control the scripting features in your Web Browser, like turning off unnecessary scripting language features.

10) Use an anti-virus Software AND update it regularly.

Look I've mentioned the anti-virus option at the end, because they simply cannot identify the 50,000+ viruses present a new virus being created everyday! You need to update them regularly to make them effective and as a phrase goes "Prevention is better than cure" it's better to prevent any virus being able to infect your system in the first place it self by following the first 9 rules. I am not discouraging you from using a Anti-Virus software, it's good to use it and can save you from already known viruses. But I don't have it installed on my system as I consider it as a waste of my computer resources after all "If anything can go wrong it Will" ;)

Also there is no need to fear by the figure 50,000+. Only very few viruses have been reported to have spread very vast. Also most of them are a slight variation of the other, at times raising debates whether the new virus is really a new virus!!

Epilogue
`````````````

Now to present the final picture in front of you. As I've mentioned viruses are not the only program present in this cyber world, out to destroy you valuable data! There are others as well like Trojan Horse's and Bomb's. Also surveys and statistics reveal that major data-loss and computer problems are caused because of Hardware, software or wrong use of The combination of these by the Human beings! Virus share only a small percentage of Data-loss problems and other computer problems!

Though this might make one reluctant to follow safety measures but would you not take precautions in real life just because not every body dies of diseases? You probably would, right!! So the same rule applies to the virtual-world as well. It is always better to follow the precautions and implement the safety-measures to save yourself from not only computer viruses but other similar threats as well.

Every technology can be used in a bad and a good way. And as technology advances and as Virus writers come up with new ideas and find out new loop holes in the latest technology, the number of computer viruses would only go up. One cannot expect viruses to be eradicated entirely ever! Today most of the viruses are written for the DOS and Microsoft's Windows environment, because majority of people use these platform. But as people will shift more to other various platforms viruses will start surfacing for those platforms as well because people using their excellent brains for destructive purpose cannot be expected to go down. As I heard in some movie "If God Exists then Evil does as well".

Increasing cases of unemployment and frustrations among the younger generations in yet another cause of increase in virus writers. A study revealed that majority of Virus programmers are teenagers or people in their early twenties. Well The scope of my article does not cover ethical view points about virus writing or virus writers so I would leave it onto the user to think about it! .. My sole intention in writing this article was to remove the common misconceptions about computer viruses which I hope I was able to remove. If you still have questions and/or queries, please do contact me it'll be my pleasure if I can help you in anyway.

.......................................................
EINSTEIN aka Jerry mouse....
.......................................................

No comments: