SecureCRT会话密码默认是加密存储,某些情况下,忘记了服务器密码,但是可以直接登陆,但是又无法修改原密码,就可以考虑对SecureCRT文件进行解密。
如何使用?
请确保已安装python3和pycryptodome
您可以通过以下方式安装模块:
pip3 install pycryptodome
用法:
先下载解密文件:
wget https://github.com/HyperSine/how-does-SecureCRT-encrypt-password/raw/master/python3/SecureCRTCipher.py && chmod +x SecureCRTCipher.py
$ ./SecureCRTCipher.py
Usage:
SecureCRTCipher.py [-v2] [-p ConfigPassphrase]
"enc" for encryption, "dec" for decryption.
This parameter must be specified.
[-v2] Encrypt/Decrypt with "Password V2" algorithm.
This parameter is optional.
[-p ConfigPassphrase] The config passphrase that SecureCRT uses.
This parameter is optional.
Plaintext string or ciphertext string.
NOTICE: Ciphertext string must be a hex string.
This parameter must be specified.
3.例子
如果您有SecureCRT会话文件,example.com.ini
看起来像
S:"Username"=root
S:"Password"=
S:"Password V2"=02:7b9f594a1f39bb36bbaa0d9688ee38b3d233c67b338e20e2113f2ba4d328b6fc8c804e3c02324b1eaad57a5b96ac1fc5cc1ae0ee2930e6af2e5e644a28ebe3fc
S:"Login Script V2"=
...
...
您可以通过以下方式显示密码
$ ./SecureCRTCipher.py dec -v2 7b9f594a1f39bb36bbaa0d9688ee38b3d233c67b338e20e2113f2ba4d328b6fc8c804e3c02324b1eaad57a5b96ac1fc5cc1ae0ee2930e6af2e5e644a28ebe3fc
DoubleLabyrinth
如果会话文件是由版本7.3.3之前的SecureCRT生成的,则敏感数据应为
...
...
S:"Username"=root
D:"[SSH2] Port"=00000016
S:"Password"=uc71bd1c86f3b804e42432f53247c50d9287f410c7e59166969acab69daa6eaadbe15c0c54c0e076e945a6d82f9e13df2
D:"Session Password Saved"=00000001
...
...
您可以通过以下方式显示密码
$ ./SecureCRTCipher.py dec c71bd1c86f3b804e42432f53247c50d9287f410c7e59166969acab69daa6eaadbe15c0c54c0e076e945a6d82f9e13df2
DoubleLabyrinth
本文转载:刺客博客
投稿时间:2022-05-26 最后更新:2022-05-26
本站资料均由网友自行发布提供,仅用于学习交流。如有版权问题,请与我联系,QQ:4156828
© CopyRight 2008-2022 All Rights Reserved. Powered By Q578.com 闽ICP备11008920号-1
闽公网安备35020302032606号