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

BIN
redis/4-unacc/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

31
redis/4-unacc/README.md Normal file
View File

@@ -0,0 +1,31 @@
# Redis Post Exploitation Due to Master and Slave Synchronisation
[中文版本(Chinese version)](README.zh-cn.md)
Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache, and message broker.
Redis which version starts from 4.0, prior to 5.0.5, can be exploit through the synchronisation between master and slave by an authenticated visitor.
Reference:
- <https://2018.zeronights.ru/wp-content/uploads/materials/15-redis-post-exploitation.pdf>
## Vulnerability Environment
Execute following command to start a Redis server 4.0.14:
```
docker compose up -d
```
After server is started, you can connect to this server without credentials by `redis-cli`:
```
redis-cli -h your-ip
```
## Exploit
Use [this script](https://github.com/vulhub/redis-rogue-getshell) to execute arbitrary commands:
![](1.png)

View File

@@ -0,0 +1,25 @@
# Redis 4.x/5.x 主从复制导致的命令执行
Redis是著名的开源Key-Value数据库其具备在沙箱中执行Lua脚本的能力。
Redis未授权访问在4.x/5.0.5以前版本下我们可以使用master/slave模式加载远程模块通过动态链接库的方式执行任意命令。
参考链接:
- <https://2018.zeronights.ru/wp-content/uploads/materials/15-redis-post-exploitation.pdf>
## 环境搭建
执行如下命令启动redis 4.0.14
```
docker compose up -d
```
环境启动后,通过`redis-cli -h your-ip`即可进行连接,可见存在未授权访问漏洞。
## 漏洞复现
使用[这个POC](https://github.com/vulhub/redis-rogue-getshell)即可直接执行命令:
![](1.png)

View File

@@ -0,0 +1,6 @@
version: '2'
services:
redis:
image: vulhub/redis:4.0.14
ports:
- "6379:6379"