用createremotethread注入一个dll [英] injecting a dll with createremotethread

查看:121
本文介绍了用createremotethread注入一个dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

createremotethread如何在进程内执行dll?它使用的一个参数是loadlibraryA。所以我得到了在该过程中执行loadlibrary函数的部分。然后应该将上下文切换到内核模式。 dll是否由loadlibrary函数返回值执行?

how does createremotethread execute a dll inside a process? One of the parameters it uses is the loadlibraryA. So I get the part where it executes the loadlibrary function within the process. It should then make a context switch to kernel mode. Does the dll get executed by the process with the loadlibrary function return value?

推荐答案

就像任何其他 LoadLibrary 调用,动态加载器将调用您注入的DLL的 DllMain 函数与 DLL_PROCESS_ATTACH 原因码您的 DllMain 中的代码可以从那里获取,尽管我强烈建议不要在 DllMain 本身内做太多的事情由于装载机锁定。

Just like any other LoadLibrary call, the dynamic loader will call into your injected DLL's DllMain function with the DLL_PROCESS_ATTACH reason code. The code in your DllMain can take it from there, though I would strongly advise against doing too much from within DllMain itself due to the loader lock.

这篇关于用createremotethread注入一个dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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