All Projects → saelo → Cve 2014 0038

saelo / Cve 2014 0038

Linux local root exploit for CVE-2014-0038

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Cve 2014 0038

Trinity
Trinity Exploit - Emulator Escape
Stars: ✭ 371 (+92.23%)
Mutual labels:  kernel, exploit
Exploit-Development
Exploit Development - Weaponized Exploit and Proof of Concepts (PoC)
Stars: ✭ 84 (-56.48%)
Mutual labels:  kernel, exploit
H Encore 2
Fully chained kernel exploit for the PS Vita on firmwares 3.65-3.73
Stars: ✭ 237 (+22.8%)
Mutual labels:  kernel, exploit
Windows Kernel Exploits
windows-kernel-exploits Windows平台提权漏洞集合
Stars: ✭ 5,963 (+2989.64%)
Mutual labels:  kernel, exploit
Byepg
Defeating Patchguard universally for Windows 8, Windows 8.1 and all versions of Windows 10 regardless of HVCI
Stars: ✭ 467 (+141.97%)
Mutual labels:  kernel, exploit
Kernel Exploits
Various kernel exploits
Stars: ✭ 397 (+105.7%)
Mutual labels:  kernel, exploit
HEVD Kernel Exploit
Exploits pack for the Windows Kernel mode driver HackSysExtremeVulnerableDriver written for educational purposes.
Stars: ✭ 44 (-77.2%)
Mutual labels:  kernel, exploit
Linux Kernel Exploits
linux-kernel-exploits Linux平台提权漏洞集合
Stars: ✭ 4,203 (+2077.72%)
Mutual labels:  kernel, exploit
Anticheat Testing Framework
Framework to test any Anti-Cheat
Stars: ✭ 481 (+149.22%)
Mutual labels:  kernel, exploit
H Encore
Fully chained kernel exploit for the PS Vita on firmwares 3.65-3.68
Stars: ✭ 968 (+401.55%)
Mutual labels:  kernel, exploit
Butthax
lovense hush buttplug exploit chain
Stars: ✭ 180 (-6.74%)
Mutual labels:  exploit
Pluto
An x86 kernel written in Zig
Stars: ✭ 172 (-10.88%)
Mutual labels:  kernel
Mouse
Mouse Framework is an iOS and macOS post-exploitation framework that gives you a command line session with extra functionality between you and a target machine using only a simple Mouse payload. Mouse gives you the power and convenience of uploading and downloading files, tab completion, taking pictures, location tracking, shell command execution, escalating privileges, password retrieval, and much more.
Stars: ✭ 186 (-3.63%)
Mutual labels:  exploit
Androrat
A Simple android remote administration tool using sockets. It uses java on the client side and python on the server side
Stars: ✭ 187 (-3.11%)
Mutual labels:  exploit
Garhal csgo
A project that demonstrates how to screw with CSGO from Kernel Space. (CSGO Kernel Cheat/Hack) All cleaned up, and with updated offsets.
Stars: ✭ 179 (-7.25%)
Mutual labels:  kernel
Cyjon
A simple, clean code, multi-tasking operating system written in pure assembly language for 64-bit processors from the AMD64 family.
Stars: ✭ 184 (-4.66%)
Mutual labels:  kernel
Linux Samus
Linux 4.16 on Chromebook Pixel 2015
Stars: ✭ 179 (-7.25%)
Mutual labels:  kernel
Shadow Box For X86
Shadow-Box: Lightweight and Practical Kernel Protector for x86 (Presented at BlackHat Asia 2017/2018, beVX 2018 and HITBSecConf 2017)
Stars: ✭ 178 (-7.77%)
Mutual labels:  kernel
Zen
Experimental operating system written in Zig
Stars: ✭ 177 (-8.29%)
Mutual labels:  kernel
Libhermit
HermitCore: A C-based, lightweight unikernel
Stars: ✭ 190 (-1.55%)
Mutual labels:  kernel

Local root exploit for CVE-2014-0038

Bug:

The X86_X32 recvmmsg syscall does not properly sanitize the timeout pointer passed from userspace.

Exploit primitive:

Pass a pointer to a kernel address as timeout for recvmmsg, if the original byte at that address is known it can be overwritten with known data. If the least significant byte is 0xff, waiting 255 seconds will turn it into a 0x00.

Restrictions:

The first long at the passed address (tv_sec) has to be positive and the second long (tv_nsec) has to be smaller than 1000000000.

Overview:

Target the release function pointer of the ptmx_fops structure located in non initialized (and thus writable) kernel memory. Zero out the three most significant bytes and thus turn it into a pointer to an address mappable in user space. The release pointer is used as it is followed by 16 0x00 bytes (so the tv_nsec is valid). Open /dev/ptmx, close it and enjoy.

Not very beautiful but should be fairly reliable if symbols can be resolved.

Tested on Ubuntu 13.10

See also http://blog.includesecurity.com/2014/03/exploit-CVE-2014-0038-x32-recvmmsg-kernel-vulnerablity.html

Run:

Retrieve addresses from /proc/kallsyms and run the exploit:

./build.sh && ./timeoutpwn

If you would like to build the binary for a remote server, try this:

ssh [email protected] 'cat /proc/kallsyms' > syms.txt
CFLAGS=-static ./build.sh syms.txt
scp timeoutpwn [email protected]:
...

If ptmx_fops cannot be found in kallsyms, try extracting it from the vmlinux as provided with the headers package (linux-headers on Arch Linux):

nm /lib/modules/$(uname -r)/build/vmlinux > syms.txt
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].