cmc5410 发表于 2014-8-13 18:41

.NET CLR Injection 运行时修改IL代码

本帖最后由 cmc5410 于 2014-8-13 18:45 编辑

即使程序已经运行 修改IL代码支持发行模式 x86 x64
支持net版本 2.0-4.5

dome演示






使用方法参照 http://www.codeproject.com/Articles/463508/NET-CLR-Injection-Modify-IL-Code-during-Run-time


2014.8.7 更新第二版

2012 Sep 22 - First Version
2012 Oct 5 - Added the LoadedMethodDescIterator for generic method
2012 Oct 8 - Added x64 support
2012 Oct 10 - Added support for .Net4.5
2012 Oct 11 - Added cache feature to speedup the initialization procedure
2012 Oct 13 - Embed the address offset cache in the resourse.   
2012 Oct 14 - Corrected the code to ensure it can be compiled in VS2012.   
2014 Aug 7 - Released the 2nd version : use web service to lookup virtual address in PDB as backup. Changed from hash to symbol ID from PE file to identify the binary.
源码转自 codeproject
http://www.codeproject.com/Articles/463508/NET-CLR-Injection-Modify-IL-Code-during-Run-time
作者是个中国人13岁就开始编程了{:1_921:}

Jerry is from China. He was captivated by computer programming since 13 years old when first time played with Q-Basic.


Windows / Linux & C++
iOS & Obj-C
.Net & C#
Flex/Flash & ActionScript
HTML / CSS / Javascript
Gaming Server programming / video, audio processing / image & graphics


Chinese Blog: http://blog.csdn.net/wangjia184


a1014 发表于 2014-8-13 18:51

马甲下的蛋 发表于 2014-8-13 19:19

果然很厉害啊

野生的沫沫 发表于 2014-8-18 07:28

支持一下

showwindows 发表于 2014-8-18 09:30

.net 下的注入,值得学习,谢谢

courageous 发表于 2015-1-22 00:00

本帖最后由 courageous 于 2015-1-22 13:27 编辑

首先我没有得到楼主演示的动画效果!
运行“Test_x86_DotNet40_Release.exe” 初始化错误

下载2012年版的运行成功!

我很疑惑!!

文章中“In the current version, I have made a web service to parse the addresses on the server and return the virtual addresses to clients. This will reduce the initialization time.”

查看源码,2014版的源码中没有web service,2012版的有web service。

                            // collect the cache and upload to my server to improve the initialization speed
                            string url = string.Format( "http://jerrywang.zoka.cc/cache/upload.php?hash={0}", Path.GetFileNameWithoutExtension(file));
。。。。。



疑惑:
1、2012源码中使用了web,可以运行
2、2014源码中没有使用web,不能运行

哪位高手可以把 2014版的修改了可以运行。。。。

页: [1]
查看完整版本: .NET CLR Injection 运行时修改IL代码