home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / RCPM / SECURSYS.DOC < prev    next >
Text File  |  2000-06-30  |  10KB  |  164 lines

  1. SECURSYS.DOC as of 7/10/81
  2.  
  3.      Doesn't  it  really burn you when some jerk logs  into  your 
  4. remote  CP/M  system (that  you've spent hundreds  of  hours  and 
  5. thousands  of dollars to put on-line for public use) and promptly 
  6. tries to steal you blind and crash or ruin your system?   In  the 
  7. (almost)  2  years  that Technical CBBS has been  on  line,  I've 
  8. compiled  a user log about 6 feet high (no kidding,  5  boxes  of 
  9. 3000 sheets each) that probably has at least one example of every 
  10. possible  thing that a system crasher can try to steal or  screw-
  11. up.  I've been keeping a list of the "top-10" solutions that I've 
  12. found  since TCBBS has been in operation,  which might be of some 
  13. use to new SYSOP's.  There is nothing amazing in the  file,  it's 
  14. mostly  just  common sense,  but it is very easy to forget  these 
  15. ideas.  I know that from many painful experiences.
  16.      SYSOP'S, here are some things you can do to stop a potential 
  17. system crasher:
  18.  
  19. 1.      Keep a CRCK file for ALL of the .COM files that you leave 
  20.     on-line  (And also any other files that get loaded  into  the 
  21.     TPA  and  executed,  like MINICBBS.OBJ).   If  you  have  any 
  22.     password files (like the PWDS file used by RBBS),  CRCK those 
  23.     too.  For obvious reasons, don't leave the CRCK file on-line.  
  24.     (CRCK.ASM  is  a program that produces  a  cyclic-redundancy-
  25.     check value for any specified files.)
  26.  
  27. 2.      Use  MDIR.COM frequently to see what goodies the jerk may 
  28.     have left you in certain user  areas.   Note;  however,  that 
  29.     MDIR.COM  will NOT find files that are "hidden" in the  "user 
  30.     areas" above 20H!  The best way to see everything on the disk 
  31.     is  to  use  the MAP (M) function of DU.COM.   It  will  show 
  32.     EVERYTHING on the disk, even the remains of any erased files.  
  33.     I  routinely Map the disks on TCBBS and SYSOP CBBS and  have, 
  34.     on occasion, found special files and other no-no's on both.
  35.  
  36. 3.      Don't  leave any .COM files on the system that can  allow 
  37.     a remote user to find .SYS files.   Most directory  programs, 
  38.     and  also  WHATSNEW allow anybody to list .SYS files by  just 
  39.     typing  an extra character or two.   The best thing to do  is 
  40.     remove the .SYS list options altogether.   (A quick fix is to 
  41.     DDT  the  .COM  file and change the character  to  a  control 
  42.     character  like  ^C which can't be entered into  the  command 
  43.     buffer.)
  44.  
  45. 4.      Keep  a hard-copy log of all remote input to the  system.  
  46.     Although  a log won't actually make your system more  secure, 
  47.     it will give you an opportunity to see how anybody "gets in", 
  48.     and will,  hopefully, insure that the same break-in procedure 
  49.     can't be used twice.   Installing a log is really easier than 
  50.     it sounds, since it only requires printing the stuff typed by 
  51.     the  remote  user,  not the stuff typed by  the  system.   An 
  52.     inexpensive (i.e.  cheap) printer is perfect, since you don't 
  53.     need  letter-quality type to see who's been screwing up  your 
  54.     $3000-and-up  computer  system.    Many  BYE  programs  (like 
  55.     BYE69.ASM) already include the option for a hard-copy log.  
  56.  
  57. 5.      Of  course,  you  should also change the  CP/M  commands.  
  58.     Again,  the  best  thing is to REMOVE commands like  ERA  and 
  59.     SAVE,  but if you're not that ambitious,  or if you think you 
  60.     can't do without them, just change them as usual, with SYSGEN 
  61.     and DDT.  Try to pick new commands that aren't easy to guess, 
  62.     although  it's  impossible to guarantee that no one  will  be 
  63.     able to figure them out in time. (I have a listing from TCBBS 
  64.     log  where some idiot spent about 8 hours trying to find  one 
  65.     of  the commands.)  If you want to eliminate a  command,  you 
  66.     can  embed a control character into the command word and make 
  67.     it impossible to use.
  68.  
  69. 6.      Don't leave any .COM files out that would allow a  remote 
  70.     user to examine or modify memory, or to load a .HEX file.  It 
  71.     is perfectly safe to leave out ASM.COM, because it can't make 
  72.     a  .COM  file,  but to leave LOAD.COM or L80.COM  out  is  to 
  73.     invite a remote user to download his favorite debugger to see 
  74.     what  he  can do.   BASIC.COM and DDT.COM are also bad  news, 
  75.     since  both  could  allow a remote user to  make  changes  in 
  76.     memory.   Even a compiler can be left safely on-line, as long 
  77.     as  its associated loader program is  not  available.   Also, 
  78.     don't  leave out any files that would allow a remote user  to 
  79.     send a .COM file over to your system.   XMODEM.COM checks for 
  80.     .COM  files  and won't allow them,  but many other  programs, 
  81.     like MODEM.COM and BSTAM,  will allow ANY file to be sent  or 
  82.     received.  Once a system crasher has a way to download a .COM 
  83.     file to your system, all is lost.
  84.  
  85. 7.      In  CP/M 2.x,  an illegal drive request might also change 
  86.     the current user area!   In other words,  a remote caller who 
  87.     is  logged  into A:  user 0 could type "Q:" and end up on  A: 
  88.     user  1!  Digital  Research doesn't think of this as  a  bug, 
  89.     because  in an unmodified CP/M system,  a disk  select  error 
  90.     will  cause a PERMANENT BDOS error.   The problem arises when 
  91.     the  user  changes his BIOS to allow a warm-boot  on  a  disk 
  92.     select  error,  instead  of  a permanent  BDOS  error.   CP/M 
  93.     doesn't  reset  the user/drive  byte  properly.   That's  the 
  94.     reason for the strange results.  This problem can be fixed in 
  95.     your  BIOS  by properly handling a SELDSK error,  but if  you 
  96.     don't have the source for your BIOS, you could be in trouble.  
  97.     Another  way to protect yourself against this problem  is  to 
  98.     keep  "private" stuff in user 5 or 16-32.   Strangely enough, 
  99.     all  other  user areas can be entered with an  illegal  drive 
  100.     code.   Putting things in user 5 will make them pretty  safe, 
  101.     and,  of course, putting things in user areas 16-32 will make 
  102.     them even safer,  but the CCP can't get YOU into those areas, 
  103.     so  their use is a bit restricted.   Most BYE programs have a 
  104.     MAXUSER  equate that will keep remote users out of  any  area 
  105.     greater than a preset value,  so they can also protect you to 
  106.     a certain extent from an illegal drive select.
  107.  
  108. 8.      You  can protect licensed or private software by  keeping 
  109.     it  in  an unaccessible user area,  and using a short  loader 
  110.     program  like  Keith Petersen's  SECURITY.ASM.   This  really 
  111.     works,  and makes the SYSOP feel good when he sees in the LOG 
  112.     that  some  BOZO who thinks he has just  successfully  stolen 
  113.     MINICBBS has actually just stolen a short loader program.
  114.  
  115. 9.      Probably  the  biggest  security  problem  is  INCREDIBLE 
  116.     STUPIDITY.   It is rumored that some SYSOP's have  actually 
  117.     done  really dumb things like leave PIP.COM or  MODEM.COM  or 
  118.     FORMAT.COM  (shiver...) out in a public user  area!   If  you 
  119.     absolutely  have  to leave one of these  (potentially)  nasty 
  120.     little  programs on your system,  put it in a user area  that 
  121.     can't  be  accessed remotely (or at least a non-public  area) 
  122.     and rename it to a .OBJ file.  Then even if someone gets into 
  123.     the user area with the program, he can't run it (.OBJ).
  124.  
  125. 10.     Don't leave your system or CP/M passwords anywhere on the 
  126.     system.   Use  TAG.COM to make sure that someone can't XMODEM 
  127.     your BYE.COM program and other goodies.  Don't leave a SYSGEN 
  128.     image  (CPM56.COM) laying around either,  since it  could  be 
  129.     downloaded  and  DDT'ed to find the system  commands.   Also, 
  130.     don't  leave your system PW's on another system in a  private 
  131.     message  to  a  friend thinking that his  message  system  is 
  132.     private,  because it probably isn't.  I'm not being paranoid, 
  133.     everybody REALLY IS trying to break into my system...
  134.  
  135. Some  of these things may seem like a pain in the neck,  but  the 
  136. more  prevention you do,  the less you have to worry about the  1 
  137. jerk in a thousand callers who wants to mis-use your system.   NO 
  138. SYSTEM  is  absolutely  secure,  but with these  suggestions  you 
  139. should be able to run a system that is almost absolutely  secure, 
  140. which isn't really that bad.  
  141.  
  142.    Good luck,  Dave Hardy   Sysop, TECHNICAL CBBS (313) 846-6127
  143.                             Sysop, SYSOP CBBS (313) 885-0506
  144.  
  145. P.S.  Please pass any additions or corrections on to me at one of 
  146. the above systems.  -thanks
  147.  
  148. COROLLARIES:
  149.  
  150. 11.     Watch out for booby-trapped .COM files!  If someone sends 
  151.     down  an  .OBJ file suggesting that you leave it out on  your 
  152.     system,  be sure to check that file for any hidden  functions 
  153.     that may allow someone to break into your system later.   One 
  154.     way  to  prevent this would be to only leave out  .COM  files 
  155.     that you have assembled from SOURCE files.   In any case,  be 
  156.     suspicious  of  any files left you for public use that  don't 
  157.     have  the source with them.   A good programmer could hide  a 
  158.     secret function in a .COM file so well that it could only  be 
  159.     found  with  a great deal of  difficulty.   In  addition,  an 
  160.     unknown  .COM file might also have many other terrible hidden 
  161.     functions  (See  BANZAI.ASM for some ideas) that  could  even 
  162.     destroy other files on the system's disks, so be careful.
  163.                          -Dave Hardy (as suggested by Ron Fowler)
  164.