home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / virus / a079_1 / !Protector / !Help < prev    next >
Text File  |  1992-04-03  |  12KB  |  274 lines

  1.  
  2. Protector       - copyright 1992, Ian Palmer. 
  3. ----------
  4.  
  5. For details of copyright see the 'copyright' file.
  6.  
  7. Protector is a crude, but probably effective, bastion against the evils of
  8. viruses and theft. The former is supplied by giving a quick scan of relevant
  9. files to check they have not been altered since you have been able to verify
  10. their 'virus freeness'. The latter is supplied by the possibility of a
  11. banner (with or without password protection) to come up upon powering up the
  12. machine. Although this banner can be removed, it is unlikely that any theif
  13. will have the know-how to perform this operation.
  14.  
  15.  
  16. Virus protection
  17. ----------------
  18.  
  19. In order to operate, viruses must attatch themselves to files that exist, or
  20. make sure they are run by attatching calls within files that exist. In this
  21. way they can easily, and quickly, be detected by making a check on all files
  22. that are likely candidates.
  23.  
  24. Files that are candidates on Risc-OS machines are '!boot' and '!run' files
  25. as well as relocatable modules and absolute files. Protector works by
  26. simply keeping a note of the lengths, load addresses and execute addresses
  27. (and thus date stamps) of all these files on the disc(s). It has been
  28. designed to run on a hard disc based machine, and is unlikely to be very
  29. usable on floppies.
  30.  
  31. Before you get Protector to create this list, it is advised that you first
  32. check the relevant discs for viruses, thus you are starting from a virus
  33. free state (Protector does NOT detect viruses as such, only changes to
  34. files that might signify a virus).
  35.  
  36. The process whereby Protector creates, or alters, it's file list is called
  37. 'scanning' (as opposed to 'checking'). To scan a whole disc, the easiest way
  38. is to call up Protector's menu and select the 'Scan' sub menu, which
  39. contains a single writable option where you should place the full name of
  40. the root directory of the disc, eg.
  41.  
  42. adfs::HardDisc4.$
  43.  
  44. Do not add an extra '.' to the end of the name, and the 'adfs::....' stuff
  45. is necessary, as will become clearer later.
  46.  
  47. The scan will then take place (this is now multitasking). The scan
  48. builds up a list of all the relevant files and notes their length, load and
  49. execute addresses.
  50.  
  51. If you don't want to scan the whole disc, you can type any directory name,
  52. or even a file name, into the 'scan' sub menu. This will make Protector
  53. update the file list, removing entries that were in that directory, and then
  54. add the files that are in that directory. This means that updating the file
  55. list can be done simply and, more importantly, quickly. If you type in the
  56. name of a file, as opposed to a directory, that file will be added to the
  57. list, whether or not it is one of the 'at risk' files.
  58.  
  59. A much simpler way to get Protector to scan a directory, or file, (although
  60. this method can't be used for scanning from the root directory) is to drag
  61. the directory, or file, to Protector's icon on the icon bar. Protector
  62. will then do the rest.
  63.  
  64. As, during a scan, Protector updates the file list rather than create a new
  65. one, it allows more than one disc to have it's contents on the list. Thus if
  66. you have more than one hard disc you can have all the hard discs' files in
  67. one list.
  68.  
  69. If when you initiate a scan, you hold down the 'Shift' key then Protector
  70. will simply remove all files from that directory (or the file itself) from
  71. the list.
  72.  
  73. If you, instead, hold down the 'Ctrl' key, Protector will simply add the
  74. dragged item(s) to it's 'Avoid' list. This list contains a list of files (or
  75. directories) which you do not wish Protector to add to it's file list. Any
  76. file that appears in this list will not be added to the list (unless
  77. explicitly dragged to Protector), and any directory in this file will not be
  78. scanned by Protector (again unless the directory is explicetly dragged).
  79.  
  80.  
  81. Checking files
  82. --------------
  83.  
  84. There are three ways to get Protector to check the files within it's list.
  85.  
  86. The first method is something Protector will do automatically. By default it
  87. will check one (random) file EVERY 5 minutes (when the desktop is running,
  88. and Protector is loaded). The time between checks can be altered (see
  89. below), and this feature can also be switched off (again see below).
  90.  
  91. The second is by simply selecting the 'Check' option on Protector's menu.
  92. Once selected Protector initiates the check (which is multi tasking), and
  93. will produce error windows for any files that do not match it's list. Four
  94. error messages can be produced :
  95.  
  96. <file name> has been deleted
  97. <file name> has been altered
  98. <file name> has been extended
  99. <file name> has been reduced
  100.  
  101. Three of the messages speek for themselves, the 'altered' message means that
  102. the length is the same, but either the load or execute address has been
  103. changed.
  104.  
  105. Once you have checked that the file in question has not been altered by a
  106. virus you can simple drag the file, or the directory it was in, etc. to
  107. Protector's icon and the file list will be updated.
  108.  
  109. The other way to start a check is to place an 'option' on the call to
  110. Protector (see the options section below).
  111.  
  112.  
  113. Options
  114. -------
  115.  
  116. When Protector starts up it checks the command line that called it for
  117. options. It knows of five options :
  118.  
  119. -P (-p) Only run if the last reset was a Power Up.
  120. -S (-s) Initiate a check immediately 
  121. -B (-b) Bring up the 'Owner Banner' (see below) 
  122. -L (-l) Bring up the 'OwnerBanner' and lock Risc-OS (see below) 
  123. -Q (-q) Quit once other options have been satisfied.
  124. -R (-r) Set percentage of files checked each time.
  125. -T (-t) Set the time interval between file checks.
  126. -N (-n) Set the number of files to check on an interval check.
  127.  
  128. These options are basically supplied for use in your desktop !boot file.
  129. This means that you can have your computer check the files and display your
  130. name and address upon power up.
  131.  
  132. Note, each option must be preceeded by a space and must have it's own '-'.
  133. For example you might place the following in your $.!boot :
  134.  
  135. Run adfs::HardDisc4.$.!Protector.!Run -P -Q -B -S
  136.  
  137. By default Protector checks all the files in it's list on each 'check'. You
  138. can, however, make Protector check a random selection of files on each
  139. check. This means that if you have a lot of files you can make a reduced
  140. check on each occasion. This is done by the '-R' option which should be
  141. followed by a number (from 0 to 100) which stands for the percentage of
  142. files to check (100 = all files, etc.).
  143.  
  144. Thus for the above setting, with only 1/4 of your files checked each time,
  145. you need :
  146.  
  147. Run adfs::HardDisc4.$.!Protector.!Run -P -Q -B -S -R 25
  148.  
  149. If you want to change the percentage of files to be checked you can set it
  150. from the '% check' sub-menu. The current setting is also shown in the main
  151. menu in the 'Check' option.
  152.  
  153. As was stated above Protector checks some file every 5 minutes of desktop
  154. time (you should not even notice this apart from the hard disc light will
  155. flash on and off). You can, however, change this frequency (or even switch
  156. this facility off) - but this has to be done when you start up Protector.
  157. This is done via the '-T' option. This option (as with the -R option) should
  158. be followed by a number to represent the number of seconds between checking
  159. a file (default 300). If this value is zero (0) then the checking will not
  160. take place.
  161.  
  162. The number of files checked each time (default 5) can be set via the '-N'
  163. option. Both these values can also be changed from the main menu.
  164.  
  165. Owner Banner
  166. ------------
  167.  
  168. Before you can get the banner to show itself you must create a text file
  169. inside the Protector application window called 'Banner'. This can contain
  170. upto 5 lines of text, each line upto 40 characters. The lines might contain
  171. your name, address, etc.
  172.  
  173. Then if you call Protector with the -B option it will bring up the banner
  174. on the screen, and wait for you to click on the 'Click here' icon. The
  175. banner multitasks with both any 'check' and the desktop.
  176.  
  177. If you want password protection on the banner, you need to also create a
  178. password file. This can be done by selecting the 'Password' sub menu of
  179. Protector's main menu, and typing the password to want to use. This will
  180. then be saved (coded) in a special file within Protector's application
  181. directory. Now if you call Protector with the -L option, or select the
  182. 'Lock' option from Protector's main menu, the banner will be brought up,
  183. except you will have to type the correct password to get it to go away.
  184.  
  185. The locked banner only multitasks with and 'check' in progress, and does not
  186. pass control to the desktop. In this way you can not access anything on the
  187. desktop until you type the correct password, or perform a reset.
  188.  
  189.  
  190. Added protection
  191. ----------------
  192.  
  193. This part is for the real paranoid in you :-)
  194.  
  195. If the use of !Protector becomes faily widespread, the chances of someone
  196. writing a virus that can 'fool' Protector becomes greater. The only real way
  197. that this can happen is if the virus makes changes to the file list to
  198. update what is stored there to match the altered files, thus Protector will
  199. think nothing has changed.
  200.  
  201. To overcome this possibility it is best to change the name of Protector so
  202. that a virus can not be aware of it's presence, and more importantly can not
  203. locate the relevant files.
  204.  
  205. To do this you should change the name found in the following locations :
  206.  
  207.   • The application directory, simply rename. This name will now be refered
  208.     to as 'new_name'.
  209.  
  210.   • The !Run file. You need to change two lines, the first sets up a
  211.     variable, the second uses that variable (Protector$Dir) which needs to
  212.     be changed to new_name$Dir (substitute your new name).
  213.  
  214.   • The !RunImage. You will need to change two lines in this file, the first
  215.     (the first non REM line) contains the variable 'run%' which contains the
  216.     length of the !Run file you have just changed, this needs updating
  217.     otherwise the program will moan at you each time it's run.
  218.     On the next line is a call to PROCwimp_init, with a single parameter
  219.     which contains the name of the program, change this name.
  220.  
  221.   • The !Sprites files. Simply load the files into !Paint, and rename the
  222.     sprite to that which you renamed the application directory,
  223.     ie. !new_name.
  224.  
  225.  
  226. Extending the Scope of Protector
  227. --------------------------------
  228.  
  229. As time goes by, no doubt, some people (if that's the right word) are bound
  230. to discover other ways to make viruses spread themselves. Currently
  231. Protector will scan for four types of files :
  232.  
  233.   • Those called '!boot'
  234.  
  235.   • Those called '!run'
  236.  
  237.   • Relocatable Modules (file type &FFA)
  238.  
  239.   • Absolute Files
  240.  
  241. Although you can add any file to the list, simply by dragging the file to
  242. Protector's icon, this may be removed by subsequent scans. To overcome this
  243. Protector has been written to allow simply extension of the files it will
  244. add to it's list. The final function in the listing ('!RunImage') should be
  245. called 'FNshould_all'. This is passed a file name (name$ (always lower
  246. case)) and the file type (type% (-1 for absolute files)). The function
  247. should contain the tests for the four resident file types shown above, and
  248. by simply adding extra conditions you can extend Protector's range.
  249.  
  250. For example, if you wanted to add all command (exec) files you would need to
  251. add a line :
  252.  
  253. IF type%=&FFE =TRUE
  254.                    
  255. Alternativly to add all files called '!Sprites', you would add a line :
  256.  
  257. IF name$="!sprites" =TRUE
  258.  
  259. Notes:
  260.  
  261.   You must make sure that names are lower case, as name$ only contains
  262.   lower case letters.
  263.  
  264.   All alterations must follow the rules specified in the 'Copyright' file.
  265.   If no such file exists, whoever supplied this program to you has
  266.   BROKEN THE LAW.
  267.  
  268.   The -L (lock) option takes presidence over the -B (banner) option.
  269.   Also if when the banner is being displayed you select the 'Lock' option
  270.   from the main menu, the banner will be converted to a 'Lock'.
  271.  
  272.   During a 'Lock' Protector 'swallows' any mouse events (ie. button clicks).
  273.  
  274.