Programming A Virus

September 18, 2007 at 8:14 am (languages, Security)

Why is everybody scared of computer virus ? because it causes harmful actions to our data and system !! right ?

Logic – If we go to the root, virus just do something that is not desired. Example if we write a program that erases 1 byte from any exe file, that is a virus because the file is no more usable. The main idea is to force a user to run the virus code. This is done by attaching it or embedding the object file along with some utilities.

Code For TSR Virus – Following here is an example code for TSR virus. This is not much harmful. It just changes the attribute (color) of characters present on the screen.

Virus Code

Way For Anti Virus – Every virus has a signature which is easy to match. By this signature only, the identity of virus is done. So, for detecting virus, just search the signature (known as virus definition) in files. 🙂

Caution – Try this programming at your own risk !!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: