Dark Angel's Phunky Virus Writing Guide

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=
DISCLAIMER: The author hereby disclaims himself. Virus coding guide, Courtesy: Phalcon
       This guide is purely for educational purpose ony.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-

Virii are  wondrous creations written for the sole purpose of spreading and destroying the  systems of unsuspecting fools. This eliminates the systems of simpletons  who can't  tell that there is a problem when a 100 byte file suddenly blossoms  into a  1,000 byte  file. Duh... These low-lifes do not deserve to  exist, so  it is  the coders' sacred duty to wipe their hard drives off the face of the Earth. It is a simple matter of speeding along survival of the fittest!!

Virus writing  is not  as hard  as you  might first imagine. To write an effective virus, however, you *must* know assembly language. Short, compact code are hallmarks of assembly language and these are desirable characteristics of  virii. However, it is *not* necessary to write in pure assembly. C may also be used, as  it allows almost total control of the system while generating relatively compact code (if you stay away from the library functions). However, you still must access  the interrupts, so assembly knowledge  is still  required. However, it is still best to stick with pure assembly,  since most operations  are more  easily coded in assembly. If you do not know assembly, I would recommend picking up a copy of The Microsoft Macro Assembler Bible (Nabajyoti Barkakati, ISBN #: 0-672-22659-6).   It is an easy-to-follow book covering assembly in great detail. Also get yourself a copy of Undocumented DOS (Schulman, et al, ISBN #0-201-57064-5), as it is very helpful.

The question of which compiler to use arises often. I suggest using Borland Turbo  Assembler and/or Borland C++. I do not have a copy of Zortech C (it was too large to download), but I would suspect that it is also a good choice. Stay away from Microsoft compilers, as they are not as flexible nor as efficient as those of other vendors.

A few more items round out the list of tools helpful in constructing virii. The latest version of Norton Utilities is one of the most powerful programs available, and is immeasurably helpful.   MAKE SURE YOU HAVE A COPY! You can find  it on  any decent board. It can be used during every step of the process, from the writing  to the testing. A good debugger helps. Memory management utilities such as MAPMEM, PMAP, and MARK/RELEASE, are invaluable, especially when coding TSR virii. Sourcer,  the  commenting disassembler, is  useful when  you wish to examine the code of other virii (this is a good place to get ideas/techniques for your virus).

Now that  you have  your tools,  you are  ready to  create a  work  of  art designed to smash the systems of cretins.  There are three types of virii:
1) Tiny virii (under 500 bytes) which are designed to be  undetectable due to their small size.   TINY  is  one  such  virus.    They  are generally very simple because their code length is so limited.
2) Large  virii  (over 1,500 bytes)   which   are   designed   to   be undetectable because they cover their tracks very  well  (all  that code DOES have a use!).  The best example  of  this  is  the  Whale virus, which is perhaps the best 'Stealth' virus in existence.
3) Other virii which are not designed to be hidden at all (the writers don't give  a  shit). The  common  virus  is  like  this.    All overwriting virii are in this category.

You must  decide which  kind of  virus you wish to write. I will mostly be discussing  the  second type  (Stealth  virii). However,  many  of  the techniques discribed  may be easily applied to the first type (tiny virii). However, tiny virii generally do not have many of the "features" of larger virii, such  as  directory  traversal. The  third  type  is  more  of  a replicating trojan-type, and will warrant a brief (very, very  brief!) discussion later.

A virus may be divided into three parts: the replicator, the concealer, and the bomb. The replicator part controls the spread of the virus to other files, the concealer keeps the virus from being detected, and the bomb only executes when  the activation  conditions of the virus (more on that later) are satisfied.

well well well.... enough talks today... check out for details on the replicator, the concealer and the bomb on the following posts.
blog comments powered by Disqus