Sploitus

Exploit for Off-by-one Error in Sudo Project Sudo

gitee Β· 2021-12-20

Exploit Code

MARKDOWN2 lines
## https://sploitus.com/exploit?id=BA41C3A5-08C2-5B2A-9552-BE01A896BC41
This is a PoC exploit for CVE-2021-3156, a sudo vulnerability dubbed Baron Samedit. The exploit is designed to achieve single-shot access to the system, without modifying system files. It is written in C and uses a heap overflow technique to bypass security restrictions. The exploit is typically invoked by running the `sudo-hax-me-a-sandwich` binary with a target number as an argument. The brute force target finding feature is experimental and requires GNU parallel to be installed. The exploit sets the user ID and group ID to 0, allowing for root access.