`

CInject - Code Inject & Runtime Intelligence

 
阅读更多

可以拦截C#DLL的神器,比如要给一个现成的系统加个日志啥的。

CInject 

============================================

Project Description
CInject (or CodeInject) allows code injection into any managed assembly without disassembling and recompiling it. It eases the inevitable task of injecting any code in single or multiple methods in one or many assemblies to intercept code for almost any purpose.

When using CInject, you do not require any knowledge of the target application.  You can create your own injectors very easily and inject them in any target assembly/executable.  An example is provided with this application.  If you have an existing code which has no logging or no diagnostics, inject it with CInject and execute it as usual to generate log files. Helps you analyze any code and ease your reverse engineering exercise.

Provides runtime intelligence such as 

  • Values of arguments to the called function
  • Object life time of a method / variables called within the method
  • Allows customization of logging or diagnostics
  • Allows extension of injectors to tailor your own solution as the need be
  • Measure the method execution time to check performance

Build your own plugins using CInject information

  • CInject supports building your own plugins
  • The plugin receives information from the application such as
    • Target assembly & method
    • Injector assembly & method
    • Processing details, results with timestamp
    • Exceptions and errors
  • Customized Plugin menu in CInject application

And its easy to implement a plugin, just implement IPlugin interface and copy it in the Plugins folder.

If you are look at compile time injection, you may want to try dI.Hook at CodePlex or Nuget

It is developed in C# and uses Mono.Cecil for code interception and log4net for logging purposes. 

Perceived and Initiated by : Punit Ganshani [ http://www.ganshani.com ]

 


How do I contribute?

You have an idea? You are a developer? Great!

The project is looking for serious/part contributors to help build the injectors, or optimize the injection techniques.  So please mail me via http://www.ganshani.com/contact-me to be added as a contributor to this project.

 


Quick Guide and Examples

 


FAQ

Can I have the source code?
Yes, the source code is available on codeplex

Can I use it in my organization?
Yes, you can use it.

I have some doubts, how can I ask?
Please use the 'Discussions' tab

Do I get to know the value of arguments at runtime?
Yes, that's the actual beauty of CInject. It lets you know the value of arguments to a function at runtime.

Can I inject static methods?
Yes. In the current release, you can call create a class that implements ICInject interface and call static methods.  In later release, provision for calling static methods directly will be added as well.

What version of .NET is this built on? Can I use it with other versions?
CInject is built on .NET 4.0 runtime.  To use it with other versions, rebuild the Injectors, or create your own using .NET 2.0, 3.0, 3.5.

How do I distribute my plugin?
You have many alternatives to distribute the plugin

  • Host the source code on CodePlex and link it with this project 
  • Provide the source code, and get it hosted on this webpage & www.ganshani.com website
  • Host the source code on GitHub, or other repository websites and provide us the link for promotion purposes

How about code injection at compile time?
If you are looking at dynamic injection based on the code you have written in an assembly, it would be worth while trying dI.Hook  You can define the injections (or called hooks) in configuration file and invoke them wherever required. 

 

Last edited Aug 7, 2012 at 4:36 PM by punitganshani, version 14

分享到:
评论

相关推荐

    cinject_0.4.3.rar

    ipad2 完美越狱工具,具体越狱过程,请参考网络上的教程。

    远程注入DLL公用类

    向指定的进程注入指定的DLL,并调用DLL中指定的方法; DWORD pid = CInjectUtils::GetProcessIdByName("QQ.exe");...CInject c; c.inject(pid,"c:/mydll.dll","startup");//startup为mydll.dll中的一个函数名称

    BlackFox:C ++中的游戏引擎

    ) 使用EnTT框架的ECS范例: 世界:将实体组合在一起的类系统:您可以在应用程序启动时手动创建系统或自动创建系统(类似于ECS在Unity3D上的工作方式) 组件:它们只是简单的结构通过使用CInject以及上下文和安装...

    自动驾驶运动规划(Motion Planning).pdf

    自动驾驶运动规划(Motion Planning)问题分析

    财务数据分析模型6.xlsx

    Excel数据看板,Excel办公模板,Excel模板下载,Excel数据统计,数据展示

    人力资源数据分析看版.xlsx

    Excel数据看板,Excel办公模板,Excel模板下载,Excel数据统计,数据展示

    重庆大学2011-2012(2)数字电子技术II.pdf

    重庆大学期末考试试卷,重大期末考试试题,试题及答案

    随波逐流CTF编码工具 V5.6 20240424.rar

    由随波逐编写开发,CTF编码工具为用户提供丰富的离线加密解密功能,还可以对字符编码进行转换,文件隐写查看,用户可以根据自己的需求来使用功能,非常实用,能够提高大家的工作效率!

    重庆大学电磁场原理08年考题(A).pdf

    重庆大学期末考试试卷,重大期末考试试题,试题及答案

    基于matlab的SUI信道模型内含数据集.zip

    基于matlab的SUI信道模型内含数据集.zip

    年执行校长岗位工作总结.docx

    工作总结,新年计划,岗位总结,工作汇报,个人总结,述职报告,范文下载,新年总结,新建计划。

    Java项目合集

    提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。

    2023产业经济大脑建设方案.pptx

    2023产业经济大脑建设方案.pptx

    基于51单片机设计多功能计算器软硬件资料(包括原理图+仿真+ 软件源程序+文档资料).zip

    基于51单片机设计多功能计算器软硬件资料(包括原理图+仿真+ 软件源程序+文档资料) 本设计是以STC89C52单片机为核心的计算器模拟系统设计,输入采用5×8矩阵键盘,可以进行加、减、乘、除等十几种数字运算,同时支持括号的嵌套使用级浮点数的运算,并在LCD1602上显示操作过程。 本次设计注重设计方法及流程,首先根据原理设计电路,利用keil编程,借助实验开发平台进行仿真实验,进而利用altium designer 制作PCB,最后到焊接元器件,直至调试成功。在设计的同时,特别注重keil软件和altium designer软件的使用方法和技巧以及常用的LCD显示器和矩阵键盘的设计和使用方法。 【关键词】 计算器,STC89C52,矩阵键盘,1602液晶

    年企业个人年度工作总结.docx

    工作总结,新年计划,岗位总结,工作汇报,个人总结,述职报告,范文下载,新年总结,新建计划。

    杭电数据结构期末复习题.pdf

    杭州电子科技大学,期末考试资料,计算机专业期末考试试卷,试卷及答案,数据结构。

    weixin103基于h5移动网赚项目微信小程序+springboot后端毕业源码案例设计.zip

    提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。

    C++开发的图书管理系统

    C++开发的图书管理系统

    ... data》

    提供的源码资源涵盖了安卓应用、小程序、Python应用和Java应用等多个领域,每个领域都包含了丰富的实例和项目。这些源码都是基于各自平台的最新技术和标准编写,确保了在对应环境下能够无缝运行。同时,源码中配备了详细的注释和文档,帮助用户快速理解代码结构和实现逻辑。 适用人群: 这些源码资源特别适合大学生群体。无论你是计算机相关专业的学生,还是对其他领域编程感兴趣的学生,这些资源都能为你提供宝贵的学习和实践机会。通过学习和运行这些源码,你可以掌握各平台开发的基础知识,提升编程能力和项目实战经验。 使用场景及目标: 在学习阶段,你可以利用这些源码资源进行课程实践、课外项目或毕业设计。通过分析和运行源码,你将深入了解各平台开发的技术细节和最佳实践,逐步培养起自己的项目开发和问题解决能力。此外,在求职或创业过程中,具备跨平台开发能力的大学生将更具竞争力。 其他说明: 为了确保源码资源的可运行性和易用性,特别注意了以下几点:首先,每份源码都提供了详细的运行环境和依赖说明,确保用户能够轻松搭建起开发环境;其次,源码中的注释和文档都非常完善,方便用户快速上手和理解代码;最后,我会定期更新这些源码资源,以适应各平台技术的最新发展和市场需求。

    FPGA工程师面试题目2020年7月份

    这是我2020年7月份在海淀参加FPGA工程师面试的题目,选择题、问答题,适用于参加FPGA工程师面试的小伙伴。这是当初我参加某个FPGA开发岗位的面试的考卷,里面有我做的答案。该试卷同样适用于FPGA学习者做能力测验。尤其适合尚未开始FPGA开发工作的小伙伴,用于提前试水,作为了解面试考题的素材之一

Global site tag (gtag.js) - Google Analytics