home *** CD-ROM | disk | FTP | other *** search
/ Amiga Computing 61 / ac061.adf / VirusChecker / Virus_Checker.doc / Virus_Checker.doc
Text File  |  1993-04-05  |  22KB  |  509 lines

  1. ************************************************************************
  2.  
  3.                         Virus_Checker Documentation
  4.  
  5.                              by John Veldthuis
  6.                       Member of SHI Anti Virus Group 
  7.  
  8. ************************************************************************
  9.  
  10.  
  11. DISTRIBUTION:
  12.  
  13. Virus_Checker is a freely distributable, copyrighted piece of
  14. software. You do not have to pay money to use it, and may upload it
  15. wherever you choose, but you are not allowed to sell Virus_Checker
  16. for profit, or include Virus_Checker on a disk which is sold for
  17. profit, without the author's (John Veldthuis) permission.  Commodore
  18. have this permission already.
  19.  
  20. Money is not solicited but would be welcome. I can be contacted at
  21. the address below.
  22.  
  23. Please send me any more new viruses so I can update Virus_Checker,
  24. but please don't send a letter asking for a copy without sending me
  25. money to cover postage and disks. I cannot afford to send everyone a disk
  26. out of my own pocket. If you send just a disk then don't be surprised if
  27. you never see it again.
  28.  
  29.     John Veldthuis
  30.     21 Ngatai Street
  31.     Manaia, Taranaki
  32.     New Zealand
  33.     Phone  +64-6-274-8409
  34.  
  35. Email addresses:
  36.  
  37.     FIDO 3:771/440.0
  38.     USENET johnv@tower.actrix.gen.nz
  39.  
  40.  
  41. ABOUT SAFE HEX INTERNATIONAL
  42.  
  43.  
  44. If  you   know  a  virus  programmer  you  can  get  a reward of $ 1000 for
  45. supplying  his  name  and  address.  The fact is that the law punishes data 
  46. crime very severely. (5 years in jail in most countries).
  47.  
  48. We  are an international group with more than 250 members  who have started 
  49. trying to stop the spread of virus. Let me give you some example:
  50.  
  51.  
  52.         1. Our motto is: "Safe Hex", who dares do anything else today?".
  53.     2. A virus bank containing all well known virus killer programmes.
  54.     3. We help people to get money back lost by virus infection.
  55.         4. We  write articles about virus problems for 8 magazines.
  56.         5. We release the newest and the best virus killers around.
  57.         6. We have more than 20 "Virus Centers" worldwide  where you 
  58.            can get free virus help by phoning our "Hotline", and the
  59.            newest killers translated n your own language at very little
  60.            cost.
  61.  
  62. For more information contact:
  63.  
  64.         SAFE HEX INTERNATIONAL            (Please  send  a "Coupon-Response 
  65.         Erik Loevendahl Soerensen         International" and a self addres-
  66.         Snaphanevej 10                    sed  envelope, if you want infor-
  67.         DK-4720 Praestoe                  mation about SHI by letter).
  68.         Denmark                             
  69.         Phone: + 45 55 99 25 12
  70.         Fax  : + 45 55 99 34 98
  71.  
  72.  
  73. INSTALLATION:
  74.  
  75. To run Virus_Checker once, either type it's name into a CLI window (while
  76. the program is in the current directory), or double-click on it's icon
  77. from the Workbench.  The program will be active until you quit it or
  78. reset your computer.
  79.  
  80. Installing Virus_Checker so that it will be active all the while your
  81. computer is running is a good idea.  This is because viruses can be on
  82. any disk you insert into any disk drive.  With Virus_Checker always
  83. active, you will be protected.
  84.  
  85. Under 1.3, to install Virus_Checker so that it will be run whenever
  86. you reset your computer, edit your startup-sequence to include simply
  87. "Virus_Checker".  The program will have to be either in the root
  88. directory of the disk you are booting off of, or in the C: directory,
  89. for this to work.
  90.  
  91. Under the 2.0 operating system, installation is much easier.  All you
  92. have to do is drag the icon for Virus_Checker into the WBStartup
  93. drawer on your Workbench disk (or your boot partition if you use a
  94. hard disk), and Virus_Checker will automatically be loaded when the
  95. Workbench is loaded.
  96. If you don't load or use WorkBench then edit the user-startup file in the
  97. s: directory and simply include "Virus_Checker" somewhere in it.
  98.  
  99. NOTICE FOR USERS OF FILE PACKERS AND CRUNCHERS:
  100.  
  101. If you use a program such as PowerPacker to make your files smaller
  102. then be aware that you must check these files before you crunch them.
  103. If the file is infected and you crunch them then VC will not find the
  104. virus in the file and each time you use that file it will infect your
  105. machine.  VC will still detect the virus in memory and remove it okay.
  106. So if you get VC telling you your memory is infected but you cannot
  107. find it on any disks then start unpacking any of these files and
  108. check them UNPACKED.
  109.  
  110.  
  111. ENFORCER USERS
  112.  
  113. Just a quick note for people who use the program called enforcer.
  114. Virus_Checker will cause Enforcer hits when it does it's memory scan. There
  115. is no way around this as it is the only way to detect a couple of viruses.
  116. For each low memory read Virus_Checker will cause 2 enforcer hits. One for
  117. the read and one for the zero that was returned. This will happen only when
  118. Virus_Checker starts up and when you cause it to do a full memory scan via
  119. the menu or 'm' key.
  120. There should be 4 enforcer hits. The reads are from location $20 and
  121. location $6c. The other 2 will depend on your setup.
  122.  
  123.  
  124. WORKBENCH 2.0 USERS BEWARE
  125.  
  126. Workbench 2.0 now looks at and acts on the protection flags on each file.
  127. If you have a file that is read protected then Virus_Checker will not be
  128. able to check this file. WB1.3 ignores most of these flags and will happily
  129. read a read protected file.
  130. I got a disk with the BSG9 virus on it and wondered why VC would not pick
  131. it up. I finally did a list on it and saw it only had the delete flag on.
  132. After un-read protecting it VC picked the file up okay.
  133.  
  134. UPDATE
  135. From version 6.05 VC will warn you if it finds a file that is read
  136. protected. This will allow you to use the Shell command protect to
  137. unprotect the file. Just use
  138.      protect filename +r
  139. and then use Virus_Checker to Scan the file again.
  140.  
  141.  
  142. FRENCH USERS
  143.  
  144. Someone has gone to the trouble of translating the Virus_Checker docs into
  145. French. If you wish to get them then please read the following
  146.  
  147. You can get the French doc from AUGL or order it for 20 French Francs at:
  148.     BUGSS
  149.     4, Place de L'Aube
  150.     33170 GRADIGNAN
  151.     FRANCE
  152. Direct any questions to berger@geocub.greco-prog.fr
  153.              or berger@platon.greco-prog.fr
  154.  
  155. COMMAND LINE OPTIONS:
  156.  
  157. The syntax is:
  158.  
  159.     Virus_Checker [-l###] [-t###] [-w###] [-b] [-q] [-i] [-n] [-m] [dirname]
  160.  
  161.     -l### tells Virus_Checker how far from the left edge of the 
  162.         screen to open the Virus_Checker window.
  163.  
  164.     -t### tells Virus_Checker how far down from the top edge of 
  165.         the screen to open the Virus_Checker window.
  166.  
  167.     -w### tells Virus_Checker how wide you want the window. It has 
  168.         a maximum size of 386 pixels and a minimum of 200.  Any 
  169.         numbers out of this range are ignored.
  170.  
  171.         This is ignored by Workbench 2.0 as there is really no need
  172.         for it due to being able to 'pop' the window up when you
  173.         want it and hide it when you don't want it.
  174.  
  175.     -b tells Virus_Checker to send its window to the back of all the 
  176.         other open windows.
  177.  
  178.     -n tells Virus_Checker not to open a window. It will check memory 
  179.         and disks inserted but you will have to use the ARexx port 
  180.         or the commodities 'Exchange' program (or the hotkey) to 
  181.         get it to scan the whole disk for Link/File viruses or to
  182.         view the user interface.  To stop VC, run VC again,  use 
  183.         the ARexx port, or send it a Kill command from the
  184.         commodities 'Exchange' program.
  185.  
  186.     -q tells Virus_Checker to check all memory, files, and disks for 
  187.         viruses, then exit.  To check the dh0: partition and exit,
  188.         do the following:  "Virus_Checker -q dh0:".  This will check 
  189.         memory, disks, files, and dh0:, then exit.
  190.  
  191.     -i tells Virus_Checker not to put up a requester when it can't read
  192.         the bootblock of a disk.
  193.  
  194.     -m tells Virus_Checker to watch the file s:startup-sequence for any
  195.         changes. Some viruses will change this file and VC will
  196.         catch it. (Only works under WB2.0 and above)
  197.       Bug report
  198.         There seems to be a bug that if the file is changed VC will
  199.         pick it up okay. but if another file is changed in the S:
  200.         directory then AmigaDOS tells VC the startup-sequence has been
  201.         changed. It is okay again after    that. You have been warned
  202.  
  203.     dirname is the directory/file you want checked for File Viruses on 
  204.         startup.  An example to open the window at x/y position of 
  205.         200/100 and check DH0: is: "Virus_Checker -l200 -t100 dh0:".
  206.  
  207. For WB2.0 users the command line is
  208.  
  209. L=LEFT T=TOP B=BACKDROPWINDOW N=NOWINDOW Q=QUIT I=IGNOREBB W=WATCHSS DIR
  210. L=LEFT is the same as -l
  211. T=TOP is the same as -t
  212. B=BACKDROPWINDOW sets the Virus_Checker window as a Backdrop window
  213. N=NOWINDOW is the same as -n
  214. I=IGNOREBB is the same as -i
  215. W=WATCHSS is the same as -m
  216. DIR is the name of a dir/file to check for viruses on startup
  217. an example is
  218.  
  219. Virus_Checker l 10 top 20 b i dh0:test
  220. This will set the VC window at x/y position of 10,20, make it into a
  221. backdrop window, ignore errors from the BootBlock reads and check the file
  222. dh0:test when it starts up.
  223.  
  224. For the window coordinates, any values outside the size of the WB
  225. screen are ignored and any non numerical values are ignored. There
  226. must be no spaces between the options and the numbers. Options may be
  227. given in any order.
  228.  
  229. If Virus_Checker is already running, and you invoke it again from the
  230. command line, you will be asked if you want to kill it.  If you answer
  231. yes, the already-running copy will be removed from memory, and you will
  232. have no Virus_Checker running.  This will work not if you RUN Virus_Checker,
  233. as you have you be able to answer it's question.
  234.  
  235.  
  236. THE WORKBENCH STARTUP:
  237.  
  238. SPECIAL NOTE:
  239.  
  240. If Virus_Checker is not run from Workbench it will look for the file
  241. S:VIRUS_CHECKER.INFO  This is just a standard workbench info file and can
  242. be used as described in the next section. This is to allow 1.3 users who
  243. run VC from their startup-sequence to config VC easily. It will work for
  244. 2.0 users as well. I have done it this way because it is too hard to find
  245. where a program ran from under 1.3. This way I only have to look for 1 file
  246. in one directory.
  247. To use it add the stuff you want under Workbench and save it. Then copy the
  248. Virus_Checker.info file to the S: directory.
  249.  
  250. Support for the icon stuff has now been put in. These will override the
  251. default settings and also the settings in the S:Virus_Checker.config file.
  252. It will only affect those things that are given in the ICON. The rest will
  253. be left as default or as the config file sets them.
  254.  
  255. The things that you can put in via the Information menu on Workbench are as
  256. follows. These will be used if VC is started by Workbench
  257. HOTKEY is only used by WB2.0
  258.  
  259.  
  260. HOTKEY=string        /* HOTKEY=lcommand shift del            */
  261. LEFT=num        /* LEFT=150                     */
  262. TOP=num            /* TOP=25                    */
  263. WINDOW=ON/OFF        /* WINDOW=ON or WINDOW=OFF            */
  264. RESIDENT=ON/OFF        /* RESIDENT=ON or RESIDENT=OFF            */
  265. IGNOREBBERROR=ON/OFF    /* Ignore BootBlock Read Error            */
  266.             /* use IGNOREBBERROR=OFF to turn requester off    */
  267. WATCHSS=ON/OFF        /* WATCHSS=ON or WATCHSS=OFF            */
  268. DF0=ON/OFF        /* DF0=ON or DF0=OFF                */
  269.  |
  270.  V        ;If Off VC will not check BootBlock or startup-sequence
  271. DF3=ON/OFF
  272. FULLCHECKDF0=ON/OFF    /* FULLCHECKDF0=ON or FULLCHECKDF0=OFF    */
  273.      |
  274.      V        ;If ON VC will scan all files on the inserted disk.
  275. FULLCHECKDF3=ON/OFF
  276.  
  277.  
  278. IN ALL CASES DO NOT USE THE QUOTE MARKS " or ' in any place. VC can see the
  279. spaces between strings without them.
  280.  
  281.  
  282. THE AREXX INTERFACE:
  283.  
  284. VC has an ARexx port, which means you can send VC commands using the
  285. REXX language, available from your Amiga dealer, or as part of the 2.0
  286. Operating System.  The port name is "Virus_Checker". Be aware that
  287. case is important and ARexx will not find it if the name is not spelled
  288. right.  Here is an example ARexx program that talks to VC:
  289.  
  290.     /* ARexx programs must start with a comment */
  291.  
  292.     address 'Virus_Checker'    /* Talk to Virus_Checker          */ 
  293.     'checkdrive\df0:'          /* Make virus_Checker check df0:     */
  294.                    /* for viruses              */ 
  295.     'scanforsaddam\df0:'       /* Make VC check df0: for Saddam     */
  296.                    /* virus damage            */
  297.     'quit'               /* Make Virus_Checker shut down.    */
  298.         'drive\df1: off'       /* Turn off df1: from being scanned  */
  299.  
  300. Notice the '\' between the command and the drive name in the middle
  301. examples. This must be put between all commands and their options.  'quit'
  302. does not take an option so does not need the '\' character there.
  303. Virus_Checker will take the following commands:
  304.  
  305.     checkdrive\drivename      Check drive 'drivename' for file viruses.
  306.     scanforsaddam\drivename   Check drive (DF0:-DF3) for Saddam damage.
  307.     quit                      Make Virus_Checker shut down.
  308.     saveconfig                Save the s:Virus_Checker.file file
  309.         window\option             Open or Close window (Option = on or off)
  310.     drive\df?: option         Turn on/off Drive scan (Option = on or off)
  311.     resident\option          Turn on/off Resident flag ""      ""  ""
  312.     checkfile\device:dir/filename
  313.     checkbootblock\df?:       Check the Bootblock in df? for viruses
  314.  
  315. Special note for 'checkfile' command.
  316. This one turns off any requesters while doing it's work. If the command
  317. OPTIONS RESULTS is used it will return RESULT if no virus found or if a
  318. virus is found then the string VIRUSNAME Virus was/is present in the file.
  319. This does not mean the virus is gone as there may have been errors trying
  320. to remove the virus.
  321. This is really for BBS users who want to check files as they come in.
  322. You could write an arexx script to search files and log any that come up
  323. with viruses. Later after findong which ones where infected you would run
  324. VC over them again via the main menu thus making sure they where clear.
  325.  
  326. CheckBootBlock command
  327. This one also needs the options results and returns messages.
  328. If the disk is clear or you give it a number outside the range of df0: to
  329. df3: it will return 'Okay', if VC had trouble reading the disk the message
  330. returned is 'ERROR reading BOOTBLOCK', if the bootblock is Not the normal
  331. one then 'NON-STANDARD BOOT CODE' is returned.  If the Bootblock is
  332. infected then the virus name will be returned.  At present there is no way
  333. to clear the virus from Arexx but I am working on it.  Requesters are
  334. disabled while this is done.
  335.  
  336.  
  337. VIRUS_CHECKER OPERATION:
  338.  
  339.  Upon running Virus_Checker, it will first check your memory for
  340. viruses and tell you if any were detected.  They will either be
  341. removed or disabled.  Next all disks in the floppy drives will be
  342. checked.  Any disk put in any drive (df0: to df3:) will be checked.
  343.  
  344. If Virus_Checker finds and disables the LAMER virus in memory, the
  345. machine may guru.  Once the machine is reset, however, the virus
  346. should be gone.
  347.  
  348.  
  349. THE 2.0 USER INTERFACE:
  350.  
  351. Many Thanks goes to Steve Tibbett for designing and most of the C code for
  352. this section. All I did was translate it into assembly and intergrate it
  353. into Virus_Checker.
  354.  
  355. This section describes the user interface that Virus_Checker uses
  356. when Kickstart 2.0 is detected in your computer.  This section does
  357. not apply for users with Kickstart 1.3.
  358. Kickstart 1.3 users can see the special note for using the Config file
  359. below.
  360.  
  361. Virus_Checker can be used either with a window open, or with no window
  362. open.  When used with the window closed, Virus_Checker will only show
  363. itself when it has something to tell you about.  If you insert a disk
  364. containing a virus, Virus_Checker will pop up a requester telling you
  365. about it, and give you some options to deal with it.
  366.  
  367. The normal Virus_Checker user interface can present itself in two
  368. forms.  One is the 'TitleBar Window', where only the close gadget,
  369. the depth gadget, the Zoom gadget, and the program name are visible. 
  370.  
  371. If you click the Zoom gadget, Virus_Checker's window will change into
  372. a window occupying nearly half a normal 640x200 Workbench screen.
  373. This window is broken up into three sections:  The Preferences
  374. section, the Files section, and the Drives seection.
  375.  
  376. In the Preferences section, you can tell Virus_Checker whether it
  377. should open a window or not, whether the window should be a Backdrop
  378. window, and whether Virus_Checker should quit immediately when run,
  379. or whether it should stay resident.  You can also set the window
  380. position, and the hotkey that will call Virus_Checker when you want
  381. to open it's window or pop it to the front.  (The hotkey format is
  382. described in the AmigaDOS 2.0 manual, in the section on the
  383. commodities exchange). As from 6.05 you can also tell Virus_Checker to
  384. ignore errors when reading the BootBlock. It will be saved in the config
  385. file.
  386.  
  387. THE DEFAULT HOTKEY is Left-Amiga Shift del
  388.  
  389. The Files section is where you list the drives or directories that 
  390. Virus_Checker will check when you click the Check button.  If you 
  391. 'Add' DF0: and DF1: to the list, then choose Check, then
  392. Virus_Checker will check all the files on both DF0: and DF1: for file
  393. viruses.
  394.  
  395. The Drives section lets you specify which of your floppy disk drives
  396. will automatically be checked for bootblock and file viruses when you
  397. insert a disk. If you have a program like CrossDOS and you don't want
  398. Virus_Checker looking at the msdos disks then simply disable it and
  399. Virus_Checker will never look at that drive again. Unless you enable it
  400. again.
  401.  
  402. The Second row of Drive gadgets turn on and off the automatic scanning of
  403. the entire disk. These are disabled by default. If you turn them on, then
  404. Virus_Checker will scan the entire disk every time you insert one.
  405. Checking for file viruses takes some time, so you may not want this on for
  406. a drive that you are constantly moving disks in and out of.
  407. The state of these gadgets is also saved in the Config file.
  408.  
  409. Any of the Gadgets that have text with an UnderScore beneath then can be
  410. accessed by simply pressing the that key on the keyboard.
  411. For example. If you wished to change the Hotkey you will notice that the H
  412. in HotKey is Underlined. This means simply by pressing the 'h' key that
  413. gadget will become active.
  414.  
  415. The options that you set in the user interface can be saved to disk
  416. using the Save button.  The options are saved to the file
  417. "S:Virus_Checker.Config", and are read from there whenever the
  418. program is loaded.
  419.  
  420. KEYSTROKES:
  421.  
  422. The Following keys will activate the following functions, when typed
  423. into the Virus_Checker window:
  424.  
  425. s -    Will activate the Scan mode
  426. m -    Will immediately do a complete memory scan (same as startup)
  427. f -    Will activate the Saddam Disk Scan (used to fix Saddam virus damage)
  428. 0 - 3  Will check the First File in startup-sequence and bootblock on disk
  429.        in drive which matches number
  430.  
  431. There are also some options on the menu (hold the right mouse button
  432. to get to the menus) which have keyboard-equivalent shortcuts.  These
  433. are next to the inverse A on the menu.
  434.  
  435. LINK/FILE VIRUS CHECK:
  436.  
  437. If you want to check a disk for Link/File viruses then put the disk in
  438. any drive. Make sure the Virus_Checker window is active and use the right
  439. mouse button to bring up the Project Menu. Select the "Link/File Scan"
  440. and release the mouse button.  An alternative way is to just press
  441. the 's' key on the keyboard.
  442.  
  443. This will bring up a requester asking you which drive to check. Enter
  444. the drive name in the box, eg.  DF0:, DH1:,RAD:  etc. Under WB2.0 you
  445. can also use the "Use Requester" option.  It will then check all the
  446. files on that drive.  You can also enter directories if you want to
  447. eg, c:  df0:c, df0:libs etc.
  448.  
  449. When Virus_Checker is scanning the disk and you know that a directory
  450. is clear and don't want to check it press control-d in the window
  451. with the filenames and Virus_Checker will ignore that directory and
  452. go back up one level.
  453.  
  454. If you want to stop the check completely press control-c in the
  455. window with the filenames and Virus_Checker will print a break
  456. message then stop scanning the disk and go back to normal scanning.
  457.  
  458. If Virus_Checker brings a requester up that says a program just run
  459. has infected your memory with the Xeno Virus, it has already disabled
  460. it.  You should immediately check all files on the disks that are in
  461. the drives at that time.  This means that a program that you just ran
  462. or a program some other program just ran is infected with the virus
  463. and all files should be checked to find out which one it was.
  464.  
  465. With viruses which use a RomTag I have decided to clear out all
  466. RomTags to make sure I remove the Viruses from the list.  In doing
  467. this you will lose things like Recoverable ram disks such as RAD:,
  468. VD0: etc. If you have a virus make sure that you save anything in the
  469. ram disks that you want before rebooting.  The ramdisks and others
  470. will disappear on a reboot.  My policy is better safe than sorry.
  471.  
  472. BRAINFILE ADDITION:
  473.  
  474. When VC finds a Non-Standard bootblock it will bring up 4 gadgets.
  475. One of these gadgets is Learn.  Pressing this will allow VC to
  476. remember this BootBlock and not bother you again with it.  To do this
  477. VC writes a file called VCBrainFile to the S: directory.  If you have
  478. a single drive this will invoke a requester asking that Volume
  479. something be put in the drive.  This will then save to the file.  On
  480. Startup VC will check for the file in the S: directory and read it if
  481. it is there.  If not it will carry on without it.  If you get an error
  482. then VC will tell you about it and will happily write over the file
  483. next time.
  484.  
  485.  
  486.  
  487. NON-STANDARD BOOT CODE:
  488.  
  489. When Virus_Checker brings up a Requester that says the disk has
  490. non-standard boot code, this means that the code in the boot block is
  491. not what should be there.  This does not mean that it is a virus as
  492. many games use copy protection in their boot blocks, and there are many
  493. bootblocks that do interesting things, that are not viruses.  You
  494. should however be cautious if it is not a game.  Do not replace the
  495. boot block if you are not sure.  If something strange happens then
  496. please send a copy of the disk to me so that I can check it out.  To
  497. determine if an unknown bootblock is likely a virus:
  498.  
  499. 1.      Format a blank disk so you know it is clear.
  500. 2.      Make sure all disks except the one just formatted are write protected.
  501. 3.      Boot from the disk that you suspect.
  502. 4.      Place formatted disk in drive zero and then reboot.
  503. 5.      Take disk out of drive zero and turn off computer for about 30 secs.
  504. 6.      Run the Virus_Checker program. If the Virus_Checker finds
  505.         non-standard boot code on the newly formatted disk, you have found a
  506.         new virus.  Please send it to me.
  507.  
  508.  
  509.