home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / MODSUNKN.ZIP / HACKFIX2.MOD < prev    next >
Text File  |  1990-07-23  |  3KB  |  105 lines

  1. Bad Dude #1 @9981
  2. Thu Jul 19 09:44:56 1990
  3. 7Regarding 2: 1BUG FIX 6BUG FIX 7 BUG FIX 3 BUG FIX     7<2Zimmod 77>
  4. 7Written By2: 1Zimmion #1 @3131
  5.  
  6. Mod Name        : Fix dangerous Zmodem backdoor bug v1.0
  7. Mod Filename    : FIXBDOOR.MOD
  8. Mod Author      : Parker Prospect #1 @9964
  9. Mod Description : Many WWIV sysops don't know about this, but if you run a
  10. copy of unregistered DSZ, then you can be subjected to a dangerous backdoor
  11. to WWIV.  All a user has to do is enter "????????.???" as a filename, and
  12. then he can batch upload DIRECTLY TO YOUR MAIN BBS DIRECTORY!!  This means
  13. he can overwrite BBS.EXE, NETWORK.EXE, and other important files such as
  14. CONFIG.DAT.  This mod simply corrects the problem by not allowing wildcards
  15. to be used on the upload filename prompt line.
  16.  
  17. NOTE:  I realize this fix has been done before, but I wanted to do it again
  18. to let new WWIV sysops be informed of this problem, and also I did it
  19. because I couldn't find the older mod.
  20.  
  21. ************** Legend **************
  22. * %% Delete Line                   *
  23. * -- Search for Line, DON'T CHANGE *
  24. * ++ Add Line                      *
  25. * -+ Modify Line                   *
  26. * ## Line is part of another mod   *
  27. ************************************
  28.  
  29. ------------------------------------------------------------------------
  30. Step #1 <XFER.C>: Add the following code immediately after int okfn.
  31.  
  32. int okfn1(char *s)
  33. {
  34.   int i,l,ok;
  35.   unsigned char ch;
  36.  
  37.   ok=1;
  38.   l=strlen(s);
  39.   for (i=0; i<l; i++) {
  40.     ch=s[i];
  41.     if ((ch==' ') || (ch=='/') || (ch=='\\') || (ch==':') ||
  42.         (ch=='>') || (ch=='<') || (ch=='|')  || (ch=='+') ||
  43.         (ch==',') || (ch==';') || (ch > 126) || (ch=='?') ||
  44.         (ch=='*'))
  45.       ok=0;
  46.   }
  47.   return(ok);
  48. }
  49.  
  50.  
  51. ------------------------------------------------------------------------
  52. Step #2 <XFER.C>: Add/modify the follow code in void upload.
  53.  
  54. --    closedl();
  55. --    return;
  56. --  }
  57. --  prt(2,"Filename: ");
  58. --  input(s,12);
  59. -+  if (!okfn1(s))
  60. --    s[0]=0;
  61. --  align(s);
  62. --  strcpy(u.filename,s);
  63. --  u.ownerusr=usernum;
  64.  
  65.  
  66. ------------------------------------------------------------------------
  67. Step #3 <FCNS.H>: Add the following line.
  68.  
  69. -- double freek1(char *s);
  70. -- int exist(char *s);
  71. -- void add_ass(int i, char *ss);
  72.  
  73.  
  74. -- /* File: xfer.c */
  75.  
  76. -- int okfn(char *s);
  77. -- int okfn1(char * s);
  78. -- void get_arc_cmd(char *out, char *arcfn, int cmd, char *ofn);
  79. -- int list_arc_out(char *fn, char *dir);
  80. -- void list_temp_arc();
  81.  
  82.  
  83. ------------------------------------------------------------------------
  84. Final Step
  85.  
  86. Compile the BBS and update your menus to reflect the changes you made...
  87.  
  88.  
  89. ------------------------------------------------------------------------
  90. Disclaimer
  91.  
  92. I, Jeff Garzik, claim no liability for this mod, or for any damage that
  93. may have resulted from the use of this mod.  I also attach no warranty,
  94. expressed OR implied, to this product.  This type of warranty and
  95. liability disclaimer is prohibited by law in certain states, and is
  96. therefore void in those states.
  97.  
  98. If you like this mod, you can call my board at:
  99.  
  100.   The East Carolina Connection
  101.   919-756-2939 :::: 2400 baud MNP level 4
  102.   24hrs a day -- 7 days a week
  103.   Autovalidation of WWIV sysops (first call)
  104.  
  105. Thanks to Wayne Bell for writing such great software!