内网常用工具密码获取1

2022-08-11 0 613

前言

在拿到系统后,系统中可能存在连接其他服务器的软件,或浏览器等
这时候就需要去解密像ssh这类的连接软件,所有这里我对软件的密码获取做总结

ssh和ftp链接类

xshell

Xshell 是一个强大的安全终端模拟软件,它支持SSH1, SSH2, 以及Microsoft Windows 平台的TELNET 协议。
先找到xshell保存密码的位置,点打开会话文件夹

内网常用工具密码获取1

其中.xsh里面就是保存的链接信息包括账户密码

内网常用工具密码获取1

前提是登录的时候必须勾选了记住账户和密码

内网常用工具密码获取1

离线解密工具:https://github.com/HyperSine/how-does-Xmanager-encrypt-password
python XShellCryptoHelper.py -d -key 123123 zVi7hm/Nsk6y2BGpTNSvXlPRN+/1P+aQ

123132为主控密码在文件导出的时候设置 后面为.xsh文件中的password字段类容

内网常用工具密码获取1

另一种解法 未设置主控密码需要user和sid
whoami /user 查看user和sid

内网常用工具密码获取1

python XShellCryptoHelper.py -d -user aaaa -sid S-1-5-21-4217108860-1001 zVi7hm/Nsk6y2BGpTNSvXlPRN+/1P+aQ

内网常用工具密码获取1

使用在线工具https://github.com/uknowsec/SharpDecryptPwd

内网常用工具密码获取1

该工具只支持在线解密的方式,就是必须要将工具放到目标机器上运行。
xftp一样的

SecureCRT

SecureCRT和xshell一样,很多运维人员会将SSH的账号密码保存在上面。
前提时管理员登录时勾选了记住密码

内网常用工具密码获取1

SecureCRT密码密码存放位置
C:\Users\oneseven\AppData\Roaming\VanDyke\Config\Sessions

内网常用工具密码获取1

打开后 密码是加密的 我们需要对其进行解密

内网常用工具密码获取1

SecureCRT 离线解密工具:
https://github.com/HyperSine/how-does-SecureCRT-encrypt-password
python SecureCRTCipher.py dec -v2 <密码>

内网常用工具密码获取1

MobaXterm

MobaXterm是一款远程终端控制软件,集串口,SSH远程登录和FTP传输三合一的工具,便携版操作简单,使用非常方便。

内网常用工具密码获取1

连接过后会在当前目录生成一个.ini文件

内网常用工具密码获取1

其中就储存着我们登录的账户密码

内网常用工具密码获取1

离线工具:https://github.com/HyperSine/how-does-MobaXterm-encrypt-password
python MobaXtermCipher.py dec -sp <ini文件中的SessionP> <加密的Passwords>

内网常用工具密码获取1

finalshell

FinalShell是一体化的的服务器,网络管理软件,不仅是ssh客户端,还是功能强大的开发,运维工具,充分满足开发,运维需求

内网常用工具密码获取1

连接信息存储在C:\Users\oneseven\AppData\Local\finalshell\conn\ 目录下 有多少条连接就会有多少个xxx_connect_config.json文件

内网常用工具密码获取1
内网常用工具密码获取1

用户登录时必须勾选记住密码,否则不会在xxx_connect_config.json文件中保存密码

内网常用工具密码获取1

离线解密:别人已经写好了的java代码
FinalShellDecodePass.java

import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Base64;
import java.util.Random;

import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;

public class FinalShellDecodePass {
    
    public static void main(String[] args)throws Exception {
    
        System.out.println(decodePass(args[0]));
    }
    public static byte[] desDecode(byte[] data, byte[] head) throws Exception {
    
        SecureRandom sr = new SecureRandom();
        DESKeySpec dks = new DESKeySpec(head);
        SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
        SecretKey securekey = keyFactory.generateSecret(dks);
        Cipher cipher = Cipher.getInstance("DES");
        cipher.init(2, securekey, sr);
        return cipher.doFinal(data);
    }
    public static String decodePass(String data) throws Exception {
    
        if (data == null) {
    
            return null;
        } else {
    
            String rs = "";
            byte[] buf = Base64.getDecoder().decode(data);
            byte[] head = new byte[8];
            System.arraycopy(buf, 0, head, 0, head.length);
            byte[] d = new byte[buf.length - head.length];
            System.arraycopy(buf, head.length, d, 0, d.length);
            byte[] bt = desDecode(d, ranDomKey(head));
            rs = new String(bt);

            return rs;
        }
    }
    static byte[] ranDomKey(byte[] head) {
    
        long ks = 3680984568597093857L / (long)(new Random((long)head[5])).nextInt(127);
        Random random = new Random(ks);
        int t = head[0];

        for(int i = 0; i < t; ++i) {
    
            random.nextLong();
        }

        long n = random.nextLong();
        Random r2 = new Random(n);
        long[] ld = new long[]{
    (long)head[4], r2.nextLong(), (long)head[7], (long)head[3], r2.nextLong(), (long)head[1], random.nextLong(), (long)head[2]};
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        DataOutputStream dos = new DataOutputStream(bos);
        long[] var15 = ld;
        int var14 = ld.length;

        for(int var13 = 0; var13 < var14; ++var13) {
    
            long l = var15[var13];

            try {
    
                dos.writeLong(l);
            } catch (IOException var18) {
    
                var18.printStackTrace();
            }
        }

        try {
    
            dos.close();
        } catch (IOException var17) {
    
            var17.printStackTrace();
        }

        byte[] keyData = bos.toByteArray();
        keyData = md5(keyData);
        return keyData;
    }
    public static byte[] md5(byte[] data) {
    
        String ret = null;
        byte[] res=null;

        try {
    
            MessageDigest m;
            m = MessageDigest.getInstance("MD5");
            m.update(data, 0, data.length);
            res=m.digest();
            ret = new BigInteger(1, res).toString(16);
        } catch (NoSuchAlgorithmException e) {
    
            e.printStackTrace();
        }
        return res;
    }
}

先进行编译javac FinalShellDecodePass.java,在运行java FinalShellDecodePass <password>
其中password就是xxx_connect_config.json文件中的password字段类容

内网常用工具密码获取1

Winscp

一个 Windows 环境下使用的 SSH 的开源图形化 SFTP 客户端

内网常用工具密码获取1

解密:
密码是保存在注册表中
reg query "HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Sessions”

内网常用工具密码获取1

可以看到链接名称,但需要建站点时保存密码

内网常用工具密码获取1

离线工具https://github.com/anoopengineer/winscppasswd
winscppasswd.exe <主机> <用户名> <加密密码>

内网常用工具密码获取1

使用在线工具SharpDecryptPwd可直接获取密码

内网常用工具密码获取1

FileZilla

一款FTP操作类的软件

内网常用工具密码获取1

首先导出记录

内网常用工具密码获取1

导出后是一个xml文件 打开后base64就是密码 直接解密就行

内网常用工具密码获取1

使用在线工具SharpDecryptPwd

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开USDT(trc-20)扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

Ts:本站所有内容均为互联网收集整理和网友上传。仅限于学习研究,请必须在24小时内删除。否则由此引发的法律纠纷及连带责任本站概不承担。

如侵犯到您的合法权益,请联系我们删除侵权资源!

分享驿站 技术文章 内网常用工具密码获取1 https://www.fxe.cc/895.html

常见问题
  • 如何遇到网站源码不会安装,可以尝试搜索“程序名称 教程”,如dedecms 教程。 也可以查看 网站安装常见问题总结。
查看详情
  • 由于下载服务的特殊性,一旦您购买使用了下载服务,就不接受退款申请。详情请参考《分享驿站服务》条例。
查看详情

相关文章

官方客服团队

为您解决烦忧 - 24小时在线 专业服务