home *** CD-ROM | disk | FTP | other *** search
/ Power Hacker 2003 / Power_Hacker_2003.iso / E-zine / Magazines / crh / solaris-toolkit / soltool / soltool25 < prev    next >
Encoding:
Text File  |  2002-05-27  |  1.7 KB  |  73 lines

  1. #!/bin/bash
  2. #   
  3. #  This is the Solaris Tool, version 0.54 for SunOS 5.5.x systems.
  4. #  Scripted by so1o@insecurity.org to save me alot of time ftp'ing exloits
  5. #  around, as well as saving time patching and looking for vunerable programs.
  6. #
  7. #  Thanks to Ultima, TrN, xFli, Darkcyde, special-k, mstrhelix, etc. etc.
  8. #
  9. #  Send suggestions, modifications or flames to so1o@insecurity.org
  10. #
  11. #  Usage : soltool [-scan] [-root] [-fix]
  12. #
  13.  
  14. if [ $1x = x ]; then
  15.     . header.55
  16.     header
  17.     . usage.mod
  18.         usage
  19.     exit 1
  20. fi
  21.  
  22. if [ "$1" = '-scan' ]; then
  23.         . header.55
  24.     header
  25.     . scanner.55
  26.         scanner
  27.     exit 0
  28. fi
  29.  
  30. if [ "$1" = '-root' ]; then
  31.         . header.55
  32.     header
  33.                 if [ -s /tmp/suidprogs ]; then
  34.                 echo ""
  35.                 for i in `/bin/cat /tmp/suidprogs`
  36.                         do
  37.                         . rootit.55
  38.             rootit $i
  39.                         done
  40.                 else
  41.                         echo " "
  42.                         echo " oOo No log files detected, please run with -scan flag first."
  43.                         echo " "
  44.                 fi
  45.      exit 0
  46. fi
  47.  
  48. if [ "$1" = '-fix' ]; then
  49.     . header.55
  50.         header
  51.     if whoami | grep root 1> /dev/null 2> /dev/null
  52.     then
  53.                 if [ -s /tmp/suidprogs ]; then
  54.                 echo " "
  55.                 for i in `/bin/cat /tmp/suidprogs`
  56.               do
  57.                         . chmod.mod
  58.             chmod $i
  59.             done
  60.         exit 0
  61.         else
  62.                         echo " "
  63.                         echo " oOo Please run with the -scan flag first."
  64.                         echo " "
  65.         fi
  66.     else 
  67.                 echo " "
  68.                 echo " oOo You must be root to use the -fix flag."
  69.                 echo " "
  70.         exit 1
  71.     fi
  72. fi
  73.