
利用sudo提权,只针对cnetos7
Exploit sudo privilege escalation, only for CentOS 7
Affected versions: sudo: 1.8.2 - 1.8.31p2 sudo: 1.9.0 - 1.9.5p1
Log in to the system as a non-root user and run the following command: sudoedit -s / If the output is "not a regular file", it is highly likely that this vulnerability exists.
Usage:
First, log in as a non-root user. Then copy all the contents of /etc/passwd into APPEND_CONTENT = b"""\n"""; in CVE-2021-3156.py. Change the uid and gid of the normal user to 0, then run the CVE-2021-3156.py file.
https://github.com/PhuketIsland/CVE-2021-3156-centos7/blob/main/image/1.png https://github.com/PhuketIsland/CVE-2021-3156-centos7/blob/main/image/2.png