Redis enumeration with nmap and redis-cli
Redis on 6379 is frequently exposed with weak or no auth. Confirm auth state, pull server/config details that change your next move, then enumerate DBs and keys to extract secrets.
Service discovery and fingerprinting
PORT STATE SERVICE 6379/tcp open unknown | redis-info: | Version 2.2.11 | Architecture 64 bits | Process ID 17821 | Used CPU (sys) 2.37 | Used CPU (user) 1.02 | Connected clients 1 | Connected slaves 0 | Used memory 780.16K | Role master | Bind addresses: | 192.168.121.101 | Active channels: | testChannel | bidChannel | Client connections: | 192.168.171.101 |_ 72.14.177.105
What you expect:
Redis version, uptime, role, and basic server info.
If
redis-inforeturns nothing useful, still tryredis-clisince some instances restrict INFO but allow basic commands.
Connect and check authentication state
Fast auth check:
Interpretation:
PONGmeans you can run commands without auth.(error) NOAUTH Authentication required.means you need a password or ACL user.
If you have creds:
Pull server info that changes decisions
What to look for:
redis_version,uptime_in_secondsfor fingerprinting.role:master|slaveand replication fields for later pivot options.Persistence signals:
aof_enabled,rdb_last_save_timeto understand whether data survives restarts.
If INFO is blocked by ACLs, you’ll see NOPERM. You can still enumerate keyspace if you can read keys.
Keyspace overview and multiple database detection
# Keyspace db0:keys=1245,expires=812,avg_ttl=3560000 db1:keys=22,expires=0,avg_ttl=0
How to use it:
DBs with lots of
expiresusually contain sessions/cache.Small DBs with
expires=0often contain config, feature flags, tokens.
Configuration enumeration
Full config dump (high signal, but may be blocked by ACLs):
High-value fields to spot immediately:
Interpretation that matters:
protected-mode no+ permissivebindusually means the instance is remotely reachable by design or misconfig.dir+dbfilenameidentifies persistence locations and paths that matter for later write-to-disk style attacks (don’t run those in Enumeration).
If you get NOPERM on CONFIG, stop trying to brute config and move to keyspace/value extraction.
Select database and enumerate keys
Switch DB based on INFO keyspace:
Key listing (KEYS vs SCAN)
Warning
KEYS * can block Redis hard on large datasets. Prefer SCAN unless the keyspace is clearly small.
Small DB quick check:
Safer enumeration:
What to do next:
If patterns hit, pivot to extracting values by type.
If you only see session-like keys, focus on session contents and identifiers rather than trying to dump the entire DB.
Extract values safely by key type
Don’t guess. Identify type first:
Read based on type:
Interpretation:
GET/HGETALLoften yields direct secrets: API keys, DB creds, OAuth tokens, signing keys.LRANGE/SMEMBERS/ZRANGEoften reveals user IDs, job payloads, session IDs, or queue contents.DUMPreturning unreadable bytes usually means app-specific serialization; focus on config-ish keys and hashes, or grab identifiers for later app-side decoding.
Deleting keys (intrusive)
Only if your engagement explicitly allows it.
Deleting session/config keys can break running services or log users out.
References
-
Nmap NSE redis-infonmap.org/nsedoc/scripts/redis-info.html (opens in new tab)
Script output fields and behavior
-
Auth state check behavior
-
Server and keyspace fields
-
Redis CONFIG GETredis.io/docs/latest/commands/config-get (opens in new tab)
Configuration retrieval semantics
-
Cursor-based key iteration to avoid blocking
Was this helpful?
Your feedback helps improve this page.