惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
阮一峰的网络日志
阮一峰的网络日志
云风的 BLOG
云风的 BLOG
D
Docker
Vercel News
Vercel News
IT之家
IT之家
Recent Announcements
Recent Announcements
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Engineering at Meta
Engineering at Meta
腾讯CDC
Google DeepMind News
Google DeepMind News
I
InfoQ
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
The GitHub Blog
The GitHub Blog
博客园 - Franky
The Cloudflare Blog
A
About on SuperTechFans
有赞技术团队
有赞技术团队
Y
Y Combinator Blog
T
Tenable Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Security Latest
Security Latest
H
Hackread – Cybersecurity News, Data Breaches, AI and More
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Simon Willison's Weblog
Simon Willison's Weblog
The Last Watchdog
The Last Watchdog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
U
Unit 42
The Hacker News
The Hacker News
Martin Fowler
Martin Fowler
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
F
Full Disclosure
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
V
V2EX
Project Zero
Project Zero

博客园 - Calendar

windows平台下用C#访问HBase Hbase常用命令 CuteEditor测试 Windows 7使用问题 小问题之动态调用另一个程序集里的方法 GM的Hybrid MapPoint批量导入Pushpin的方法 - Calendar - 博客园 通过两个点的经纬度计算距离 地震了 下载试用IE 7.0 Beta 3.0 google maps可以支持地理信息查询了(附上功能介绍) - Calendar - 博客园 prototype理解 - Calendar - 博客园 google maps的脚本值得看看 - Calendar - 博客园 google卫星地图的url计算 linux下运行的eclipse的说明 用socket连接pop3服务器遇到的小问题 google maps又更新了 对J2ME的想法 MiniQQ与LumaQQ
我是如何取得Reflector的真实程序的
Calendar · 2006-04-05 · via 博客园 - Calendar

我是如何取得Reflector的真实程序的

使用Reflector有很长时间了,但它经常会提示时间过期,不能使用,需要进行网上升级。觉得有点麻烦,因此想对它进行修改,去掉过期判断。

首先用Reflector来查看它自己的代码,首先找到它的入口函数:

大致意思就是从资源中读入一个流,对其进行DES解密,再对这个流进行一系列运算,得到byte[],再把它个byte[]调入Assembly,从Assembly中动态取得一个类型,并调用类型的方法运行。

看来这里头的资源很有“问题”哦!

程序中的字符串都加密了,但通过点击它前头的函数可以转到解密函数,但是:

什么也看不到。在网上查了查,说是可以对ildasm.exe进行修改,之后可用来查看所有程序集。又拿UltraEdit对其开刀,改动了一个字节,得到了ildasm.exe修改版。再看解密函数,得知:

函数也不能直接使用,只好编写一个控制台小程序test1进行字符串解密。Main函数中调用test函数进行解密,再打印出来:

       /// <summary>

       /// 应用程序的主入口点。

       /// </summary>

       [STAThread]

       static void Main(string[] args)

       {

           string bb = test("\u14bb\u14ce\u14cf\u14d5\u14ce\u14cc\u14dd\u14d8\u14db\u1497\u14aa\u14d9\u14d9\u14d5\u14d2\u14cc\u14ca\u14dd\u14d2\u14d8\u14d7\u14b6\u14ca\u14d7\u14ca\u14d0\u14ce\u14db");

           Console.WriteLine(bb);

       }

       public static string test(string sss)

       {

           return sss;

       }

这里的test先用空函数代替,编译得到test1.exe。用ildasm把它加载进来,转储为test1.il

UltraEdit打开test1.il进行编辑,把test函数中的内容用上面解密出来的il代码代替。

保存后,再运行 ilasm test1.il 进行编译,得到test1.exe,运行它即可得到解密后的字符串。

所以得到Reflector中资源解密的Key值居然是为“The_Thief_You_Are”。

把资源导出来,调用DES对它进行解密,但得到的还是不能运行的exe文件,因为它还要调用Reflector.exe内部的方法进行其它运算才能得到正确结果,想直接调用方法吧,又不行,因为类名和函数名都是乱码,而且还是它的内部类,无法调用。这可怎么办?

后来,我用Reflector进行升级,发现它在temp目录下会生成一个tmpnnn.exe文件,我用Reflector打开它,奇迹出现了!

这个Archive类的结构和Reflector中乱码的那些类和函数是何等的相似啊!

马上又拉出我的.net进行了coding

FileStream fs = new FileStream("d:\\test\\reflector.resource2", FileMode.Open, FileAccess.Read);

byte[] bytes = new byte[(int)fs.Length];

fs.Read(bytes,0,bytes.Length);

fs.Close();

MemoryStream ms = new MemoryStream(bytes);

Assembly asm = Assembly.LoadFrom("d:\\test\\tmp746.exe");

Type t = asm.GetType("Reflector.Archive");

ConstructorInfo cinfo = t.GetConstructor(new Type[]{Type.GetType("System.IO.MemoryStream")});

object obj = cinfo.Invoke(new object[]{ms});

Type t2 = obj.GetType();

MethodInfo[] info2 =  t2.GetMethods();

MethodInfo info = t2.GetMethod("MoveNext");

object obj2 = info.Invoke(obj, new object[]{});

info = t2.GetMethod("get_Current");

object obj3 = info.Invoke(obj, new object[]{});

MethodInfo[] infos2 = obj3.GetType().GetMethods();

info = obj3.GetType().GetMethod("get_Value");

object obj4 = info.Invoke(obj3, new object[]{});

byte[] bytes2 = (byte[])obj4;

fs = new FileStream("d:\\test\\reflector_2.exe", FileMode.OpenOrCreate, FileAccess.Write);

fs.Write(bytes2, 0, bytes2.Length);

fs.Flush();

fs.Close();

顺利得到了解密后的Reflector_2.exe

Reflector.exe打开它查看,正确,有Reflector.ApplicationManager.
但是它无法直接运行,让我很郁闷。

/Files/panyee/reflector_2.rar 这是带图片的word文档.