小编ner*_*rap的帖子

如何将 DLL 注入任何进程?

我正在研究将 dll 注入 Windows 上的任何进程的方法。我已经有一个适用于我自己的程序的代码,比如 hello world 或类似的东西,但其他程序,比如记事本、calc、chrome 等。

程序可以防止注入dll,所以我不知道我可以做些什么来绕过这个。

我的最终目标是挂钩任何程序的 api 调用。

这个域对我来说是新的,所以我是这里的初学者,如果你有任何关于它的资源或解决方案!

注入器.cpp

#include <iostream>
#include <Windows.h>

int main()
{
    // path to our dll
    LPCSTR DllPath = "D:\\projects\\standardinjection\\release\\testlib.dll";

    INT process_id = 14367;
    // Open a handle to target process
    HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, process_id);

    // Allocate memory for the dllpath in the target process
    // length of the path string + null terminator
    LPVOID pDllPath = VirtualAllocEx(hProcess, 0, strlen(DllPath) + 1,
        MEM_COMMIT, PAGE_READWRITE);

    // Write the …
Run Code Online (Sandbox Code Playgroud)

c++ windows security dll process

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

c++ ×1

dll ×1

process ×1

security ×1

windows ×1