![]() ![]() returns pointer to LoadLibrary address, same in every process. Printf(" WriteProcessMemory unsuccessful.\n") Printf(" VirtualAllocEx unsuccessful.\n") īOOL pathWrote = WriteProcessMemory(hProcess, dllPathAlloc, dllPath, strlen(dllPath), NULL) ![]() LPVOID dllPathAlloc = VirtualAllocEx(hProcess, NULL, strlen(dllPath), MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE) Printf("Press Enter to attempt DLL injection.") Printf(" Failed to open process %s.\n", argv) HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, atoi(argv)) ProcessInjector.exe C:\Users\wsam\Documents\Process-Injection\bad_dll.dllĮDIT: I noticed if I take out all code in the bad_dll.dll while loop it succeeds in creating a thread and doesn't crash the process, why is that? Here is the command I use if that helps (Bash): I have created a process DLL injector in C for detection engineering purposes, it seems to work great on test processes I spawn in a shell (maybe because they are in the same path, or something with non-shells and printf) but whenever I test it on a random process it crashes said process at the CreateRemoteThread step, wondering if any of you could help thanks. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |