Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2010-0426 PoC — Sudo sudoedit命令本地权限提升漏洞

Source
Associated Vulnerability
Title:Sudo sudoedit命令本地权限提升漏洞 (CVE-2010-0426)
Description:Sudo是一款允许用户以其他用户权限安全地执行命令的程序,广泛使用在Linux和Unix操作系统下。 sudoedit命令权限提升漏洞,拥有sudoedit权限的本地用户可以以root用户权限执行任意代码。成功攻击要求sudoedit命令没有在sudoers文件中指定完整路径。
Description
sudo 1.6.x before 1.6.9p21 and 1.7.x before 1.7.2p4 - Privilege escalation with sudo and sudoedit
Readme
# CVE-2010-0426

https://www.cvedetails.com/cve/CVE-2010-0426/

sudo 1.6.x before 1.6.9p21 and 1.7.x before 1.7.2p4, when a pseudo-command is enabled, permits a match between the name of the pseudo-command and the name of an executable file in an arbitrary directory, which allows local users to gain privileges via a crafted executable file, as demonstrated by a file named sudoedit in a user's home directory. 

### Usage
Escalate privileges when sudoedit binary has suid permission and a file can be edited as sudo (check with sudo -l)
```
./exploit.sh
```

### Examples
Escalate to root from low-priv revshell
```
www-data@g1vi:/var/tmp$ id
uid=33(www-data) gid=33(www-data) groups=33(www-data)
www-data@g1vi:/var/tmp$ ./exploit.sh
[+] Target is vulnerable
[+] Running stuff...
root@g1vi:/var/tmp$ id
uid=0(root) gid=0(root) groups=0(root)
```

### License
Feel free to use or modify whenever and wherever you like
File Snapshot

[4.0K] /data/pocs/984fa1cd846d40e0e0deebf96c54e447bd9ecfdf ├── [1.0K] exploit.sh └── [ 919] README.md 0 directories, 2 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. If the original source is unavailable, please email f.jinxu#gmail.com for a local snapshot (replace # with @).
    3. Shenlong has snapshotted the POC code for you. To support long-term maintenance, please consider donating. Thank you for your support.