| 服务 | Redis(REmote DIctionary Server) |
|---|---|
| 协议 | TCP(默认 6379;TLS 端口通常 6380) |
| 用途 | 缓存、消息、会话、锁、计数 |
| 安全等级 | 仅应用网段,禁止公网 |
Redis 6 之前无 ACL,默认无密码(requirepass 为空);暴露公网可被写 SSH 密钥或计划任务——历史入侵案例规模巨大。
连接与安全检查
连接与安全检查
redis-cli ping
redis-cli config get requirepass
redis-cli config get bind
redis-cli info server | head -5最小加固配置片段
最小加固配置片段
bind 127.0.0.1 -::1
protected-mode yes
requirepass <强密码>
rename-command FLUSHALL ""
rename-command CONFIG ""6379 公网暴露且无密码:攻击者可写 authorized_keys 或 cron 任务直接接管主机,这是最经典的 Redis 入侵链。