Unauthorized Access Vulnerability in Redis

Introduction

Redis is an open source storage system that supports persistent storage of data, supports key-value, list, set and other data structure storage, and supports backup.

However, if redis has unauthorized access, it will lead to the attacker being able to access redis internal resources without authentication, obtain sensitive files, and even execute flushall to clear data, write ssh public key to the root account and directly remote login to the target server.

Environment Setup

wget https://download.redis.io/releases/redis-5.0.14.tar.gz
tar xvf redis-5.0.14.tar.gz
cd  redis-5.0.14
make -j 4
make install

Just run redis-server

redis-server --protected-mode no

Vulnerability Reproduction

root@l-virtual-machine:/opt# redis-cli -h 192.168.32.141
192.168.32.141:6379> keys *
(empty array)
image-20220810110332694

Access SSH private key

Reverse shell

This method failed in ubuntu due to the inability to ignore garbled code.

image-20220810112406540

image-20230130132657554

Last updated