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

  1. function scanner {
  2. echo " oOo Scanning for all known exploitable programs now, Please be patient..."
  3.  
  4. if [ -s /tmp/report ]; then
  5.         cp /tmp/report /tmp/report.old
  6.         echo " oOo Moving old report file to /tmp/report.old"
  7. else
  8.         echo " oOo Preparing report file at /tmp/report"
  9. fi
  10.  
  11. if [ -s /tmp/suidprogs ]; then
  12.         rm /tmp/suidprogs
  13.         echo " oOo Deleting old log files..."
  14. else
  15.         echo " oOo No old log files detected..."
  16. fi
  17.  
  18. echo " "
  19. echo "  The CodeZero Solaris Security Tool Version 0.54 Report :" > /tmp/report
  20. echo "  ========================================================" >> /tmp/report
  21. echo " " >> /tmp/report
  22.  
  23. if [ -s /bin/passwd ]; then
  24. echo " oOo /bin/passwd exists, checking for vunerabilities..."
  25.         if test -u /bin/passwd
  26.         then
  27.                 echo " oOo /bin/passwd is suid and seems exploitable."
  28.                 echo "  oOo The scanner found /bin/passwd could be exploitable." >> /tmp/report
  29.                 echo "/bin/passwd" > /tmp/suidprogs
  30.         else
  31.                 echo " oOo /bin/passwd is not exploitable."
  32.         fi
  33. else
  34.         echo " oOo /bin/passwd doesn't exist!"
  35. fi
  36.  
  37. if [ -s /bin/eject ]; then
  38. echo " oOo /bin/eject exists, checking for vunerabilities..."
  39.         if test -u /bin/eject
  40.         then
  41.                 echo " oOo /bin/eject is suid and seems exploitable."
  42.                 echo "  oOo The scanner found /bin/eject could be exploitable." >> /tmp/report
  43.                 echo "/bin/eject" >> /tmp/suidprogs
  44.         else
  45.                 echo " oOo /bin/eject is not exploitable."
  46.         fi
  47. else
  48.         echo " oOo /bin/eject doesn't exist!"
  49. fi
  50.  
  51.  
  52. if [ -s /bin/fdformat ]; then
  53. echo " oOo /bin/fdformat exists, checking for vunerabilities..."
  54.         if test -u /bin/fdformat
  55.         then
  56.                 echo " oOo /bin/fdformat is suid and seems exploitable."
  57.                 echo "  oOo The scanner found /bin/fdformat could be exploitable." >> /tmp/report
  58.                 echo "/bin/fdformat" >> /tmp/suidprogs
  59.         else
  60.                 echo " oOo /bin/fdformat is not exploitable."
  61.         fi
  62. else
  63.         echo " oOo /bin/fdformat doesn't exist!"
  64. fi
  65.  
  66. if [ -s /usr/sbin/ffbconfig ]; then
  67. echo " oOo /usr/sbin/ffbconfig exists, checking for vunerabilities..."
  68.         if test -u /usr/sbin/ffbdonfig
  69.         then
  70.                 echo " oOo /usr/sbin/ffbconfig is suid and seems exploitable."
  71.                 echo "  oOo The scanner found /usr/sbin/ffbconfig could be exploitable." >> /tmp/report
  72.                 echo "/usr/sbin/ffbconfig" >> /tmp/suidprogs
  73.         else
  74.                 echo " oOo /usr/sbin/ffbconfig is not exploitable."
  75.         fi
  76. else
  77.         echo " oOo /usr/sbin/ffbconfig doesn't exist!"
  78. fi
  79.  
  80. if [ -s /usr/X11/bin/xlock ]; then
  81. echo " oOo /usr/X11/bin/xlock exists, checking for vunerabilities..."
  82.         if test -u /usr/X11/bin/xlock
  83.         then
  84.                 echo " oOo /usr/X11/bin/xlock is suid and seems exploitable."
  85.                 echo "  oOo The scanner found /usr/X11/bin/xlock could be exploitable." >> /tmp/report
  86.                 echo "/usr/X11/bin/xlock" >> /tmp/suidprogs
  87.         else
  88.                 echo " oOo /usr/X11/bin/xlock is not exploitable."
  89.         fi
  90. else
  91.         echo " oOo /usr/X11/bin/xlock doesn't exist!"
  92. fi
  93.  
  94. if [ -s /usr/vmsys/bin/chkperm ]; then
  95.         echo " oOo The chkperm program exists, the chkperm technique should work..."
  96.         echo "  oOo The scanner found /usr/vmsys/bin/chkperm could be exploitable." >> /tmp/report
  97.         echo "/usr/vmsys/bin/chkperm" >> /tmp/suidprogs
  98. else
  99.         echo " oOo /usr/vmsys/bin/chkperm doesn't exist!"
  100. fi
  101.  
  102. echo " "
  103. echo " " >> /tmp/report
  104. echo "  End of report, this scanner was scripted by so1o@insecurity.org" >> /tmp/report
  105. echo " "
  106. echo " oOo The scan is now complete, a report has been written to /tmp/report  oOo"
  107. echo " "
  108. exit 0
  109. }
  110.