Closed TurkLee closed 2 years ago
Probably the binary you're trying to inject doesn't work or doesn't have a proper DllMain
entrypoint.
You can debug it though to try and see where exactly the issue is. You can also try removing the WipeHeader
flag on the blackbone startup flags.
I will try and share my experience
`DWORD WINAPI OnDllAttach(LPVOID lpParameter) { //features return 1UL;
} `
`BOOL APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpReserved) { if (dwReason == DLL_PROCESS_ATTACH) { // disable DLL_THREAD_ATTACH and DLL_THREAD_DETACH reasons to call DisableThreadLibraryCalls(hModule);
// create main thread
if (auto hThread = CreateThread(nullptr, 0U, OnDllAttach, hModule, 0UL, nullptr); hThread != nullptr)
CloseHandle(hThread);
return TRUE;
}
return FALSE;
}`
its not injecting again.
Could you try copying the original specification for DllMain
here? https://docs.microsoft.com/en-us/windows/win32/dlls/dllmain - If that still doesn't work please run in debug and send a screenshot on where it breaks.
debugging does not show anything, any breakpoint does not just inject, could it be because I downloaded the dll from the internet? here is my download file func `bool CApi::downloadFile(std::string url, std::string filepath) {
std::wstring dwnld_URL = s2ws(url);
std::wstring savepath = s2ws(filepath);
LPCWSTR dwnld_URL1 = dwnld_URL.c_str();
LPCWSTR savepath1 = savepath.c_str();
HRESULT res = URLDownloadToFile(NULL, dwnld_URL1, savepath1, 0, NULL);
if (res == S_OK) {
return true;
}
else if (res == E_OUTOFMEMORY) {
CUtilities::Get().Log("Buffer length invalid, or insufficient memory\n");
return false;
}
else if (res == INET_E_DOWNLOAD_FAILURE) {
CUtilities::Get().Log("URL is invalid\n");
return false;
}
else {
CUtilities::Get().Log("Other error: %d\n", res);
return false;
}
}`
otherwise when i drag&drop the dll its injects perfectly
Needed more clarification, you didn't mention you weren't using the release from master. That's right. If you edited something yourself, I cannot help you.
with your code i just download the dll and inject it
I did not edit
The DLL is either passed wrongly into the function or it's corrupted. Or both.
ill check thanks.
https://dalaredo.is-a-cool-femboy.xyz/5miDe6XiR
why its giving this error