找回密码
 立即注册
相关推荐换一批
  1. 仿互站网JS弹窗页广告代码
  2. 自适应资源网站文字广告位代码
  3. JT/T 301-2019 公路交叉分类与编码规则
  4. SL 261-2017 湖泊代码
  5. QB/T 5273-2018 工业用缝纫机数字控制器功能代码数据格式
  6. GA 557.9-2005 互联网上网服务营业场所信息安全管理代码第9部分:规则动作代码
  7. GA 557.3-2005 互联网上网服务营业场所信息安全管理代码第3部分:审计级别代码
  8. GA 408.1-2003 道路交通违章管理信息代码第1部分:交通违章行为代码
  9. GA 398.7-2002 经济F罪案件管理信息代码第7部分:撤销案件原因代码
  10. GA 398.8-2002 经济F罪案件管理信息代码第8部分:统计立(破)案时间段代码
  11. GA 398.9-2002 经济F罪案件管理信息代码第9部分:F罪主体类型代码
  12. GA 398.2-2002 经济F罪案件管理信息代码第2部分:案件来源代码
  13. GA 398.3-2002 经济F罪案件管理信息代码第3部分:案件督办级别代码
  14. GA 398.4-2002 经济F罪案件管理信息代码第4部分:初查审核结果代码
  15. GA 398.5-2002 经济F罪案件管理信息代码第5部分:侦查工作阶段代码
  16. GA 398.6-2002 经济F罪案件管理信息代码第6部分:补立案件原因代码
  17. GA 777.2-2008 指纹数据代码第2部分:指纹纹型代码
  18. GA 777.3-2008 指纹数据代码第3部分:乳突线颜色代码
  19. GA 777.6-2008 指纹数据代码第6部分:指纹协查级别代码
  20. GA 690.1-2007 民用爆Z物品管理信息代码第1部分:民用爆Z物品品种分类与代码
  21. GA 777.4-2008 指纹数据代码第4部分:被捺印指纹人员类别代码
  22. YD/T 1962-2009 具有复用去复用功能的 10Gbit/s 和 40Gbit/s 光收发合一模块软件技?
  23. GA/T 852.4-2009 娱乐服务场所治安管理信息规范第4部分:娱乐服务场所变更类型代码
  24. GA/T 852.7-2009 娱乐服务场所治安管理信息规范第7部分:娱乐服务场所状态代码
FASMthe代码注入 | C#编程 2021-06-11 544 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
FasmManaged ( managed C++ wrapper for the library version of Flat Assembler)这是 FASM 的作者在此线程中发布的 Flat Assembler 库版本的托管 C++ 包装器。包括完整的 C++ 源代码和 C# 使用示例。在 C++ 源文件 fasmdll_managed.cpp 中,还可以找到如何从非托管代码调用 FASM.OBJ(包含在源代码下载中)的示例。
它有什么作用?
基本上,它允许 C# 和 VB.NET 程序员比普通方法更容易地组装和注入代码到另一个进程中。

你能给我一个逐步使用的例子吗?

1. 使用类构造函数或 fasm.SetProcessHandle(IntPtr) 将进程句柄设置为将注入代码的进程的句柄。
2. 使用 fasm.AddLine(string) 添加到要汇编的助记符列表中。 FASM 使用 Intel 语法。您可以在此处找到 FASM 程序员手册。
3. A.调用 fasm.Assemble() ,它将以字节数组的形式返回字节码。
湾调用 fasm.Inject()、fasm.InjectAndExecute() 或 fasm.InjectAndExecuteEx() 将您的代码注入到进程中。每一个都至少有一个参数:代码将被注入的地址;可选地,您可以指定要注入代码的进程的句柄,在后两者的情况下,指定在注入时传递给代码的参数。


(This is a managed C++ wrapper for the library version of Flat Assembler released by FASM's author in this thread. Included is the full C++ source code and a C# example of use. In the C++ source file fasmdll_managed.cpp, one can also find an example of how to invoke FASM.OBJ (included in source download) from unmanaged code.

What does it do?
Basically, it allows C# and VB.NET programmers to assemble and inject code into another process with far greater ease than normal methods.

Can you give me a step-by-step example of use?

1. Use either the class constructor or fasm.SetProcessHandle(IntPtr) to set the process handle to that of the process into which code will be injected.
2. Use fasm.AddLine(string) to add to the list of mnemonics to be assembled. FASM uses Intel syntax. You can find the FASM Programmer's Manual here.
3. a. Call fasm.Assemble() which will return the bytecode in the form of a byte-array.
b. Call fasm.Inject(), fasm.InjectAndExecute(), or fasm.InjectAndExecuteEx() to inject your code into the process. Each of these takes at least one parameter: the address at which code will be injected; optionally, you can specify a handle to the process into which code will be injected and, in the case of the latter two, a parameter to be passed to the code upon injection.)

1623379831817.rar


上一篇:BlackMagic -- Managed Memory Manipulation
下一篇:WhiteMagic - Injected .NET Helper Library