home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / BATCHCOL.ZIP / TOOLS.ZIP / BVGEN.ZIP / BVGEN.TXT < prev    next >
Text File  |  1995-10-24  |  8KB  |  150 lines

  1. WaveFunc's Goofy Batch Virus Generator
  2. ======================================
  3.  
  4. Constructed in October 1995
  5. Requires DOS 6 to function
  6. Enter BVGEN to start program
  7.  
  8. Requires the files SETINVAR.COM and CONVBAT.EXE to work. Defines SHOW as
  9. the file viewer and EDIT as the file editor (alterable). A version of
  10. SHOW.EXE is included, no idea where it's from but does the job.
  11.  
  12. This program makes batch viruses in case you haven't figured that out yet.
  13. So if this is against your policy, delete this program right now before
  14. your monitor melts and your processor strips a register.
  15.  
  16. File sizes...
  17.  
  18.  SETINVAR.COM = 544 bytes
  19.  CONVBAT.EXE  = 3963 bytes
  20.  SHOW.EXE     = 4932 bytes
  21.  
  22. If any of these are different you might have a real virus. I won't bother
  23. to list BVGEN.BAT's size - it's in a constant state of flux right now.
  24.  
  25. This program and the batch programs it generates are provided purely for
  26. the personal persuit of knowledge and batch file appreciation. Viruses tend
  27. to have a bad rap but so does the batch programming language. Kind of works.
  28. Please do not add damaging code, it is in bad taste and detracts from the
  29. beauty of the art form. If you add code, add clever, unusual, insightful...
  30.  
  31. Writing a 'real' virus is too easy, and the dangers are all too real that
  32. your creation will wreak havok upon the world. Takes the fun out of it.
  33. Batch viruses provide a mechanism by which replicating code can be explored
  34. for the code's sake without the dangers normally associated with these things. 
  35.  
  36. I'm not saying you should run them or anything.
  37.  
  38.  
  39.  
  40. Using the Batch Virus Generator
  41. -------------------------------
  42. If ANSI.SYS is loaded, the program will use ANSI screen codes
  43. which make the interface much smoother. The non-ANSI version
  44. of the menu must clear the screen with each variable change
  45. but is otherwise functional.
  46.  
  47. Select the corresponding menu key to change the variables. 
  48. Some options act immediately while others prompt for input.
  49.  
  50.  
  51. A - Virus Type
  52.  
  53.  Appending - merely copies the virus code to the end of a victim batch.
  54.  Because of its simplicity there are many limitations. The virus Must use
  55.  a hidden file because of the need to call itself. The host batch always
  56.  runs first, then the virus (maybe).
  57.  
  58.  Inserting - copies the virus code before the host batch, ensuring it will
  59.  always run when the infected batch is run. This is somewhat better than
  60.  appending types, but still suffers from a problem that is brought out by
  61.  batch files which call themselves - the virus runs with every loop.
  62.  
  63.  Compound - this time solves the loop problem by gaining control ahead of
  64.  time, running the host to its completion then regaining control to reset
  65.  the loop variables that make it possible. The virus bulk can be chosen to
  66.  run before or after the host batch is run. Before is more virus-like.
  67.  
  68. B - Name for files - this is a base name to get names for the output and
  69. config files from. Also used for some internal strings. Should not exceed
  70. 8 characters and must not include any . or extension. Just the name.
  71.  
  72. C - Key String - a unique sequence of characters (up to 7) to define the
  73. virus lines. This must be chosen carefully to ensure it does not normally
  74. appear in batches. Any batch containing this string is assumed infected.
  75. Do not exceed 7 characters or the virus won't work!
  76.  
  77. D - Infects per run - a string of 1's to indicate how many files the virus
  78. will infect on any one run. 1111 means 4, 1 means 1, etc. If blank the virus
  79. will reproduce until the seeks limit is reached or it runs out of files.
  80.  
  81. E - Seeks per run - a string of 1's to indicate how many times the virus will
  82. seek for files before quitting. If blank the virus will seek until it finds
  83. an uninfected file or runs out of files.
  84.  
  85. F - Search Elements - where the virus looks to find files to infect. Several
  86. strategies are available, including current, parent, path and various orders
  87. and combinations. Different code is produced depending on if it's a directory
  88. list that includes the path or a direct mask list. If you want to experiment
  89. with other stratagies it is easy to alter the produced code. It should be
  90. apparent where the virus will go - . .. %path% means the current is checked
  91. first, then the parent directory, and then path directories. The direct mask
  92. ..\*.bat *.bat means the parent will be checked first, then the current. If
  93. the path is not involved, the direct form is used for efficiency.
  94.  
  95. G - Find Host? (Yes/No) - if Yes it generates code to search for the host in
  96. path directories if not present in current. This eliminates the need to
  97. have to run the infected batch from the directory it's in to infect or
  98. create a hidden copy. Appending viruses cannot use this option.
  99.  
  100. H - Use Hidden Copy? (Yes/No) - if Yes will place a copy of the virus code
  101. into the root directory of drive C. This makes the virus faster by not
  102. having to always find the host batch, and by allowing the code to run from
  103. a smaller file. It also allows infected batches to still infect from the
  104. path provided the file sticks around. If removed the virus must be run
  105. again from the current directory to recreate the file (unless the Find
  106. Host option is used - then it will always recreate it). Appending viruses
  107. must use a hidden copy, impossible to call itself.
  108.  
  109. I - Date Conditions - one or two strings that must match the output of the DATE
  110. command for activation to occur. If two strings are specified they must both
  111. match. If undefined, date is not considered. Specific dates are easy, if you
  112. are not sure, go to a DOS prompt and enter DATE, you're comparing to this.
  113.  
  114. J - Time Conditions - same thing for TIME command. If date and time are jointly
  115. specified, all conditions must be true to run the activation code. It is
  116. easy to make the virus activate on Fridays in the afternoon. It is harder
  117. to narrow down a specific time but it can be done.
  118.  
  119. K - Activation File - this holds the name of a file containing code to
  120. incorporate into the virus. If conditions are specified the code will
  121. run when all conditions are true. If conditions are specified but code is
  122. not a stub marking the position is included. All activation code is user
  123. supplied. BVGEN automatically adds the signature string to the version put
  124. into the virus so you don't have to clutter the code with %_ViRuS% symbols.
  125. You might have to double check the conversion, an echo'ed qbasic program
  126. is used to do the processing. The epitimy of anarchy but it works.
  127.  
  128. Note: In order for a batch to make another batch it must use alternate
  129. characters to define redirection and pipes. I chose { } and ^, if you
  130. use these characters they will be converted to < > and | with the
  131. corresponding changes to the routine's behavior! The CONVBAT.EXE filter
  132. program is used to accomplish this task.
  133.  
  134. Selecting Activation File from the main menu will take you to a mini-menu
  135. that lets you list, edit, sample-run or change the name of the activation
  136. routine. Lots of bugs in this part of the code...
  137.  
  138. M - Make Batch Virus - builds the virus into a BA file then displays the
  139. generated code with SHOW (or whatever viewer is defined).
  140.  
  141. N - Save Config File - saves the virus parameters to a CFG file to reload
  142. as soon as the new Name for files is given. See %path% limitations under
  143. Search Elements, this element is not always saved.
  144.  
  145. O - Program Notes - calls up this text file.
  146. P - List this batch - displays the code for the BVGEN.BAT file.
  147. Q - Quit - that means I'm done with this doc.
  148.  
  149.  
  150.