如何将C#代码注入内存 [英] How do I inject C# code into memory

查看:71
本文介绍了如何将C#代码注入内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究加密器一个多月了,人们似乎对他们想要分享的代码非常保密。我不知道为什么但是这个主题真的很难学,所以我想我来到知识渊博的程序员所在的地方。



我想要学习什么?理解很简单..

我想了解如何将代码注入到Windows进程中。



- 我已经完成了 -



我有一个加密器,我加载有效载荷(有效载荷为任何.exe)

然后,加密器读取字节数组然后加密它。

将加密的字节和密码存储在存根中然后

它应该解密字节并将它们注入内存< - 这是我得到的地方卡住了。



我不知道如何将字节加载到内存中,如果没有我可以阅读和学习的代码片段(我找到的所有内容都已完成)在C ++中)我应该为Google找到最好的结果来学习什么?



我尝试了什么:



我试过googleing这样的东西......

C#代码注入,将代码注入内存c#和类似的东西但我能找到的只是人们展示如何加密和解密字节数组而不是如何将其注入记忆

I've been studying crypters for well over a month now and people seem to be very secretive about the code that they want to share.. I have no idea why but it's really hard to learn about this subject so I thought I'd come to the place where are the knowledgable coders are.

What I want to learn & understand is very simple..
I want to understand how to inject code into a windows process.

--WHAT I'VE DONE--

I have a crypter where I load a Payload (Payload being any .exe)
the crypter then reads the byte array then encrypts it.
Stores the encrypted bytes and the password in a stub and then
it should decrypt the bytes and inject them into memory <-- This is where I get stuck.

I have no idea how to load bytes into memory, if there are no code snippets I can read and learn from (All the ones I found has been done in C++) what should I Google to find the best results for me to learn?

What I have tried:

I've tried googleing things like..
C# code injection, injecting code into memory c# and similar stuff but all I can find is people showing how to encrypt and decrypt a byte array and not how to inject it into memory

推荐答案

你的意思是这样的? 将.Net程序集注入非托管进程 [ ^ ]
You mean like this? Injecting .Net Assemblies Into Unmanaged Processes[^]


这篇关于如何将C#代码注入内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆