b1scoito / cozinha_loader

An injector focused on undetectability that automatically injects a DLL into the target process with VAC3 bypass.
https://github.com/b1scoito/cozinha_loader
GNU General Public License v3.0
128 stars 14 forks source link

Failed to inject #17

Closed TurkLee closed 2 years ago

TurkLee commented 2 years ago

https://dalaredo.is-a-cool-femboy.xyz/5miDe6XiR

why its giving this error

b1scoito commented 2 years ago

Probably the binary you're trying to inject doesn't work or doesn't have a proper DllMain entrypoint.

b1scoito commented 2 years ago

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.

TurkLee commented 2 years ago

I will try and share my experience

TurkLee commented 2 years ago

`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.

b1scoito commented 2 years ago

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.

TurkLee commented 2 years ago

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;
}

}`

TurkLee commented 2 years ago

otherwise when i drag&drop the dll its injects perfectly

b1scoito commented 2 years ago

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.

TurkLee commented 2 years ago

with your code i just download the dll and inject it

TurkLee commented 2 years ago

I did not edit

b1scoito commented 2 years ago

The DLL is either passed wrongly into the function or it's corrupted. Or both.

TurkLee commented 2 years ago

ill check thanks.