Hey wollte mal fragen, ob jmd nen noch nicht detecteten dll-injector kennt ?
->Bitte um schnelle Antwort !!
Vielen Dank Coladose :mofo:
->Bitte um schnelle Antwort !!
Vielen Dank Coladose :mofo:
/********************************************************************** This file is part of the Navigator library. Navigator is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. Navigator is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Navigator. If not, see <http://www.gnu.org/licenses/>. Navigator is a little library for writing custom gamecheats etc Copyright (C) <2009> <flo8464 ([Only registered and activated users can see links. Click Here To Register...])> **********************************************************************/ #ifndef __INJECTION_HPP__ #define __INJECTION_HPP__ //Definition Include #include "ProcessDef.hpp" namespace Navigator { void Process::injectModuleAndCallExport(const std::wstring& dllPath, const std::wstring& exportName, LPVOID functionParam) const { //Write path into targets memory SafeRemoteMemory remotePathBuffer(allocateMemory((dllPath.length() + 1) * sizeof(wchar_t)), processHandle_); writeWideString(remotePathBuffer, dllPath); //Load kernel32.dll to get LoadLibraryW address SafeModule kernel32(LoadLibraryW(L"kernel32.dll")); if(!kernel32) throw WinException("Process::injectModuleAndCallExport()", "LoadLibraryW()", GetLastError()); //Get LoadLibraryW address DWORD_PTR addressLoadLibaryW = reinterpret_cast<DWORD_PTR>(customGetProcAddress(kernel32, "LoadLibraryW")); if (!addressLoadLibaryW) throw std::runtime_error("Process::injectModuleAndCallExport Error : customGetProcAddress() failed"); //Create remote Thread and wait until its finished SafeHandle remoteThread(createThread(addressLoadLibaryW, remotePathBuffer, false, INFINITE)); //Get remote threads exit code DWORD threadExitCode = 0; if (!GetExitCodeThread(remoteThread, &threadExitCode)) throw WinException("Process::injectModuleAndCallExport()", "GetExitCodeThread()", GetLastError()); //Its zero, LoadLibraryW failed if(!threadExitCode) throw std::runtime_error("Process::injectLibraryAndCallExport Error : LoadLibraryW() in remote process failed"); //Call the export, if wanted if(!exportName.empty() && exportName != L" ") callExport(dllPath, exportName, functionParam); } void Process::ejectModule(const std::wstring& module, bool isPath) const { //Load kernel32.dll to get FreeLibrary's address SafeModule kernel32(LoadLibraryW(L"kernel32.dll")); if(!kernel32) throw WinException("Process::ejectModule()", "LoadLibraryW()", GetLastError()); //Get FreeLibrary address DWORD_PTR addressEjectLibrary = reinterpret_cast<DWORD_PTR>(customGetProcAddress(kernel32, "FreeLibrary")); if (!addressEjectLibrary) throw std::runtime_error("Process::ejectModule() Error : customGetProcAddress() failed"); DWORD_PTR moduleBase = getModuleBaseByName(module, isPath); //Create remote Thread and wait until its finished SafeHandle remoteThread(createThread(addressEjectLibrary, reinterpret_cast<LPVOID>(moduleBase), false, INFINITE)); //Get remote threads exit code DWORD threadExitCode = 0; if (!GetExitCodeThread(remoteThread, &threadExitCode)) throw WinException("Process::ejectModule()", "GetExitCodeThread()", GetLastError()); //Its zero, FreeLibrary failed if(!threadExitCode) throw std::runtime_error("Process::ejectModule() Error : FreeLibrary() in remote process failed"); } /Written by Cypher, credit him FARPROC Process::customGetProcAddress(HMODULE module, const std::string& functionName) const { PIMAGE_DOS_HEADER pDosHeader = reinterpret_cast<PIMAGE_DOS_HEADER>(module); if(!pDosHeader || pDosHeader->e_magic != IMAGE_DOS_SIGNATURE) throw std::runtime_error("Process::customGetProcAddress Error : DOS PE header is invalid."); PIMAGE_NT_HEADERS pNtHeader = reinterpret_cast<PIMAGE_NT_HEADERS>(reinterpret_cast<PCHAR>(module) + pDosHeader->e_lfanew); if(pNtHeader->Signature != IMAGE_NT_SIGNATURE) throw std::runtime_error("Process::customGetProcAddress Error : NT PE header is invalid."); PVOID pExportDirTemp = reinterpret_cast<PBYTE>(module) + pNtHeader->OptionalHeader.DataDirectory [IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress; PIMAGE_EXPORT_DIRECTORY pExportDir = reinterpret_cast<PIMAGE_EXPORT_DIRECTORY>(pExportDirTemp); if(pExportDir->AddressOfNames == NULL) throw std::runtime_error("Process::customGetProcAddress Error : Symbol names missing entirely."); PDWORD pNamesRvas = reinterpret_cast<PDWORD>(reinterpret_cast<PBYTE>(module) + pExportDir->AddressOfNames); PWORD pNameOrdinals = reinterpret_cast<PWORD>(reinterpret_cast<PBYTE>(module) + pExportDir->AddressOfNameOrdinals); PDWORD pFunctionAddresses = reinterpret_cast<PDWORD>( reinterpret_cast<PBYTE>(module) + pExportDir->AddressOfFunctions); for (DWORD n = 0; n < pExportDir->NumberOfNames; n++) { PSTR CurrentName = reinterpret_cast<PSTR>(reinterpret_cast<PBYTE>(module) + pNamesRvas[n]); if(functionName == CurrentName) { WORD Ordinal = pNameOrdinals[n]; return reinterpret_cast<FARPROC>(reinterpret_cast<PBYTE>(module) + pFunctionAddresses[Ordinal]); } } return 0; } DWORD Process::callExport(const std::wstring& moduleName, const std::wstring& exportName, LPVOID functionParam) const { //Get the modules baseaddress DWORD_PTR moduleBase = getModuleBaseByName(moduleName, true); if(!moduleBase) throw std::runtime_error("Process::callExport Error : Module not found"); //Load module as data so we can read the EAT locally SafeModule module(LoadLibraryExW(moduleName.c_str(), NULL, DONT_RESOLVE_DLL_REFERENCES)); if(!module) throw WinException("Process::callExport()", "LoadLibraryExW()", GetLastError()); //Get module pointer DWORD_PTR modulePointer = reinterpret_cast<DWORD_PTR>(module.get()); //Find export std::string exportNameA(exportName.begin(), exportName.end()); DWORD_PTR exportAddress = reinterpret_cast<DWORD_PTR>(GetProcAddress(module, exportNameA.c_str())); if (!exportAddress) throw WinException("Process::callExport()", "GetProcAddress()", GetLastError()); //If image is relocated we need to recalculate the address if(modulePointer != moduleBase) exportAddress = moduleBase + (exportAddress - modulePointer); //Call the remote thread and wait until it terminates SafeHandle remoteThread(createThread(exportAddress, functionParam, false, INFINITE)); //Get thread exit code DWORD exitCode = 0; if (!GetExitCodeThread(remoteThread, &exitCode)) throw WinException("Process::callExport()", "GetExitCodeThread()", GetLastError()); return exitCode; } } #endif //__INJECTION_HPP__
meine güte.Quote:
@General Desert
Jaa DLL können detected werden bei Spielen wie z.B Crossfire oder S4(was wahrscheinlich er spielt ) , bei diesen Spielen gibt es eine zusätzliche Sicherheitssoftware(XTRAP) die das spiel Stoppt wenn man dll injected hat // Ich brauchs zufällig auch für Crossfire wäre gut wenn flo8464 mehr infos dazu geben könnte :)
€dit
GOOGLE SAGT :
[Only registered and activated users can see links. Click Here To Register...]
Versuchs mal mit den , da steht zwar DETECTED aber ich GLAUBE der geht noch :)
MFG albanianstar ♣
-> Ich hab kein VisualBasic (da es so weit ichs erkenne c++/c# ist...)Quote:
Code:/********************************************************************** This file is part of the Navigator library. Navigator is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. Navigator is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Navigator. If not, see <http://www.gnu.org/licenses/>. Navigator is a little library for writing custom gamecheats etc Copyright (C) <2009> <flo8464 ([Only registered and activated users can see links. Click Here To Register...])> **********************************************************************/ #ifndef __INJECTION_HPP__ #define __INJECTION_HPP__ //Definition Include #include "ProcessDef.hpp" namespace Navigator { void Process::injectModuleAndCallExport(const std::wstring& dllPath, const std::wstring& exportName, LPVOID functionParam) const { //Write path into targets memory SafeRemoteMemory remotePathBuffer(allocateMemory((dllPath.length() + 1) * sizeof(wchar_t)), processHandle_); writeWideString(remotePathBuffer, dllPath); //Load kernel32.dll to get LoadLibraryW address SafeModule kernel32(LoadLibraryW(L"kernel32.dll")); if(!kernel32) throw WinException("Process::injectModuleAndCallExport()", "LoadLibraryW()", GetLastError()); //Get LoadLibraryW address DWORD_PTR addressLoadLibaryW = reinterpret_cast<DWORD_PTR>(customGetProcAddress(kernel32, "LoadLibraryW")); if (!addressLoadLibaryW) throw std::runtime_error("Process::injectModuleAndCallExport Error : customGetProcAddress() failed"); //Create remote Thread and wait until its finished SafeHandle remoteThread(createThread(addressLoadLibaryW, remotePathBuffer, false, INFINITE)); //Get remote threads exit code DWORD threadExitCode = 0; if (!GetExitCodeThread(remoteThread, &threadExitCode)) throw WinException("Process::injectModuleAndCallExport()", "GetExitCodeThread()", GetLastError()); //Its zero, LoadLibraryW failed if(!threadExitCode) throw std::runtime_error("Process::injectLibraryAndCallExport Error : LoadLibraryW() in remote process failed"); //Call the export, if wanted if(!exportName.empty() && exportName != L" ") callExport(dllPath, exportName, functionParam); } void Process::ejectModule(const std::wstring& module, bool isPath) const { //Load kernel32.dll to get FreeLibrary's address SafeModule kernel32(LoadLibraryW(L"kernel32.dll")); if(!kernel32) throw WinException("Process::ejectModule()", "LoadLibraryW()", GetLastError()); //Get FreeLibrary address DWORD_PTR addressEjectLibrary = reinterpret_cast<DWORD_PTR>(customGetProcAddress(kernel32, "FreeLibrary")); if (!addressEjectLibrary) throw std::runtime_error("Process::ejectModule() Error : customGetProcAddress() failed"); DWORD_PTR moduleBase = getModuleBaseByName(module, isPath); //Create remote Thread and wait until its finished SafeHandle remoteThread(createThread(addressEjectLibrary, reinterpret_cast<LPVOID>(moduleBase), false, INFINITE)); //Get remote threads exit code DWORD threadExitCode = 0; if (!GetExitCodeThread(remoteThread, &threadExitCode)) throw WinException("Process::ejectModule()", "GetExitCodeThread()", GetLastError()); //Its zero, FreeLibrary failed if(!threadExitCode) throw std::runtime_error("Process::ejectModule() Error : FreeLibrary() in remote process failed"); } /Written by Cypher, credit him FARPROC Process::customGetProcAddress(HMODULE module, const std::string& functionName) const { PIMAGE_DOS_HEADER pDosHeader = reinterpret_cast<PIMAGE_DOS_HEADER>(module); if(!pDosHeader || pDosHeader->e_magic != IMAGE_DOS_SIGNATURE) throw std::runtime_error("Process::customGetProcAddress Error : DOS PE header is invalid."); PIMAGE_NT_HEADERS pNtHeader = reinterpret_cast<PIMAGE_NT_HEADERS>(reinterpret_cast<PCHAR>(module) + pDosHeader->e_lfanew); if(pNtHeader->Signature != IMAGE_NT_SIGNATURE) throw std::runtime_error("Process::customGetProcAddress Error : NT PE header is invalid."); PVOID pExportDirTemp = reinterpret_cast<PBYTE>(module) + pNtHeader->OptionalHeader.DataDirectory [IMAGE_DIRECTORY_ENTRY_EXPORT].VirtualAddress; PIMAGE_EXPORT_DIRECTORY pExportDir = reinterpret_cast<PIMAGE_EXPORT_DIRECTORY>(pExportDirTemp); if(pExportDir->AddressOfNames == NULL) throw std::runtime_error("Process::customGetProcAddress Error : Symbol names missing entirely."); PDWORD pNamesRvas = reinterpret_cast<PDWORD>(reinterpret_cast<PBYTE>(module) + pExportDir->AddressOfNames); PWORD pNameOrdinals = reinterpret_cast<PWORD>(reinterpret_cast<PBYTE>(module) + pExportDir->AddressOfNameOrdinals); PDWORD pFunctionAddresses = reinterpret_cast<PDWORD>( reinterpret_cast<PBYTE>(module) + pExportDir->AddressOfFunctions); for (DWORD n = 0; n < pExportDir->NumberOfNames; n++) { PSTR CurrentName = reinterpret_cast<PSTR>(reinterpret_cast<PBYTE>(module) + pNamesRvas[n]); if(functionName == CurrentName) { WORD Ordinal = pNameOrdinals[n]; return reinterpret_cast<FARPROC>(reinterpret_cast<PBYTE>(module) + pFunctionAddresses[Ordinal]); } } return 0; } DWORD Process::callExport(const std::wstring& moduleName, const std::wstring& exportName, LPVOID functionParam) const { //Get the modules baseaddress DWORD_PTR moduleBase = getModuleBaseByName(moduleName, true); if(!moduleBase) throw std::runtime_error("Process::callExport Error : Module not found"); //Load module as data so we can read the EAT locally SafeModule module(LoadLibraryExW(moduleName.c_str(), NULL, DONT_RESOLVE_DLL_REFERENCES)); if(!module) throw WinException("Process::callExport()", "LoadLibraryExW()", GetLastError()); //Get module pointer DWORD_PTR modulePointer = reinterpret_cast<DWORD_PTR>(module.get()); //Find export std::string exportNameA(exportName.begin(), exportName.end()); DWORD_PTR exportAddress = reinterpret_cast<DWORD_PTR>(GetProcAddress(module, exportNameA.c_str())); if (!exportAddress) throw WinException("Process::callExport()", "GetProcAddress()", GetLastError()); //If image is relocated we need to recalculate the address if(modulePointer != moduleBase) exportAddress = moduleBase + (exportAddress - modulePointer); //Call the remote thread and wait until it terminates SafeHandle remoteThread(createThread(exportAddress, functionParam, false, INFINITE)); //Get thread exit code DWORD exitCode = 0; if (!GetExitCodeThread(remoteThread, &exitCode)) throw WinException("Process::callExport()", "GetExitCodeThread()", GetLastError()); return exitCode; } } #endif //__INJECTION_HPP__
nochmal zum mitlesenQuote:
Den hab ich schon und wenn man mit dme injectet wird man sofort wieder von gamesecurety gekickt
Wenn er das in der Coder-Section schreibt, gehe ich davon aus, dass er es selbst machen möchte.Quote:
wäre besser wenn du ihm die Exe gibts.
Er wird mit dem Code nichts anfangen können