first commit
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

This commit is contained in:
2025-09-06 16:08:15 +08:00
commit 63285f61aa
2624 changed files with 88491 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
# Neo4j Shell Server 反序列化漏洞CVE-2021-34371
Neo4j是一个开源图数据库管理系统。
在Neo4j 3.4.18及以前如果开启了Neo4j Shell接口攻击者将可以通过RMI协议以未授权的身份调用任意方法其中`setSessionVariable`方法存在反序列化漏洞。因为这个漏洞并非RMI反序列化所以不受到Java版本的影响。
在Neo4j 3.5及之后的版本Neo4j Shell被Cyber Shell替代。
参考链接:
- https://www.exploit-db.com/exploits/50170
- https://github.com/mozilla/rhino/issues/520
## 漏洞环境
如果你使用Linux或OSX系统可以执行如下命令启动一个Neo4j 3.4.18
```
TARGET_IP=<your-ip> docker compose up -d
```
其中,环境变量`TARGET_IP`需要制定靶场环境的IP地址。
如果你是Windows系统请直接修改`docker-compose.yml`,指定`TARGET_IP`环境变量的值。
服务启动后,访问`http://your-ip:7474`即可查看到Web管理页面但我们需要攻击的是其1337端口这个端口是Neo4j Shell端口使用RMI协议通信。
## 漏洞复现
使用[参考链接](https://www.exploit-db.com/exploits/50170)中的Java RMI客户端集成基于Rhino的[Gadget](rhino_gadget/)发送RMI请求
![](1.png)
可见,`touch /tmp/success5`已成功执行:
![](2.png)