Eigener Injector ?

01/06/2010 14:34 sakurito#1
Moinsen, gibt es eine Möglichkeit einen Injector unter VB oder C++ zu Coden ??
und wenn ja, wie ?

Thx im vorraus ^^

mfg
01/06/2010 14:36 Adroxxx#2
:facepalm:

[Only registered and activated users can see links. Click Here To Register...]
01/06/2010 14:58 sakurito#3
habe ich am anfang auch gemacht -.- habe nur ein tut gefunden das von dem ersteller auch gelöscht wurde -.- (
01/06/2010 15:09 *GuideMan*#4
Tutorial hätt ich jetzt gerade nicht für dich, aber ich hab dir mal den Source Code von meinem Injector hochgeladen:
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...] wäre sehr nett ;)

Liebe Grüße, Michael.
01/06/2010 15:19 Adroxxx#5
Quote:
Originally Posted by sakurito View Post
habe ich am anfang auch gemacht -.- habe nur ein tut gefunden das von dem ersteller auch gelöscht wurde -.- (
Willst du mich verarschen?

1. Link den Google anzeigt:
[Only registered and activated users can see links. Click Here To Register...]

2. Link den Google anzeigt:
[Only registered and activated users can see links. Click Here To Register...]

3. Link den Google anzeigt:
[Only registered and activated users can see links. Click Here To Register...]

4. Link den Google anzeigt:
[Only registered and activated users can see links. Click Here To Register...]


Jetzt erzähl mir keinen, dass du nichts findest. Du hast dir sicherlich nichtmal die Mühe gemacht, auf den Link zu klicken den ich im ersten Post geschrieben habe.


[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

Mehr braucht man dazu nicht zu sagen.
01/06/2010 15:49 Medix#6
Code:
bool insertDll(DWORD procID, std::string dll)
{
    //Find the address of the LoadLibrary api, luckily for us, it is loaded in the same address for every process
    HMODULE hLocKernel32 = GetModuleHandle("Kernel32");
    FARPROC hLocLoadLibrary = GetProcAddress(hLocKernel32, "LoadLibraryA");

    //Adjust token privileges to open system processes
    HANDLE hToken;
    TOKEN_PRIVILEGES tkp;
    if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
    {
        LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid);
        tkp.PrivilegeCount = 1;
        tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
        AdjustTokenPrivileges(hToken, 0, &tkp, sizeof(tkp), NULL, NULL);
    }

    //Open the process with all access
    HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);

    //Allocate memory to hold the path to the Dll File in the process's memory
    dll += '\0';
    LPVOID hRemoteMem = VirtualAllocEx(hProc, NULL, dll.size(), MEM_COMMIT, PAGE_READWRITE);

    //Write the path to the Dll File in the location just created
    DWORD numBytesWritten;
    WriteProcessMemory(hProc, hRemoteMem, dll.c_str(), dll.size(), &numBytesWritten);

    //Create a remote thread that starts begins at the LoadLibrary function and is passed are memory pointer
    HANDLE hRemoteThread = CreateRemoteThread(hProc, NULL, 0, (LPTHREAD_START_ROUTINE)hLocLoadLibrary, hRemoteMem, 0, NULL);
    using namespace std;
    cout << hRemoteThread << endl;

    //Wait for the thread to finish
    bool res = false;
    if (hRemoteThread)
        res = (bool)WaitForSingleObject(hRemoteThread, MAXWAIT) != WAIT_TIMEOUT;

    //Free the memory created on the other process
    VirtualFreeEx(hProc, hRemoteMem, dll.size(), MEM_RELEASE);

    //Release the handle to the other process
    CloseHandle(hProc);

    return res;
}
brauchst nur noch

Code:
int main(){
insertDll([PROZESSID hier rein], [PFAD ZUR DLL])
}
fertig :o
01/06/2010 16:30 sakurito#7
Quote:
Originally Posted by Medix View Post
Code:
int main(){
insertDll([PROZESSID hier rein], [PFAD ZUR DLL])
}
fertig :o
könnte man das noch mit Openfiledialog verwirklichen :D ??
01/06/2010 17:31 Ende!#8
Quote:
Originally Posted by sakurito View Post
könnte man das noch mit Openfiledialog verwirklichen :D ??
[Only registered and activated users can see links. Click Here To Register...]
01/06/2010 18:07 Medix#9
Quote:
Originally Posted by sakurito View Post
könnte man das noch mit Openfiledialog verwirklichen :D ??
Das wirst du wohl selber umschreiben müssen. Bisschen eigeninitiative zeigen.

Habe dir ja eh grade einen ganzen sourcecode für einen simplen injector gegeben. :)
01/06/2010 18:32 HardCore.1337#10
naja simpel is er grade für Anfänger nicht gerade :D
01/06/2010 19:01 Medix#11
Quote:
Originally Posted by General Desert View Post
naja simpel is er grade für Anfänger nicht gerade :D

:x

Naja hier das ganze mal compiled bisschen code wurde noch hinzugefügt aber nicht viel (für prozesse anzeigen lassen)

[Only registered and activated users can see links. Click Here To Register...]
01/07/2010 11:52 *GuideMan*#12
Quote:
Originally Posted by Medix View Post
Code:
bool insertDll(DWORD procID, std::string dll)
{
    //Find the address of the LoadLibrary api, luckily for us, it is loaded in the same address for every process
    HMODULE hLocKernel32 = GetModuleHandle("Kernel32");
    FARPROC hLocLoadLibrary = GetProcAddress(hLocKernel32, "LoadLibraryA");

    //Adjust token privileges to open system processes
    HANDLE hToken;
    TOKEN_PRIVILEGES tkp;
    if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
    {
        LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &tkp.Privileges[0].Luid);
        tkp.PrivilegeCount = 1;
        tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
        AdjustTokenPrivileges(hToken, 0, &tkp, sizeof(tkp), NULL, NULL);
    }

    //Open the process with all access
    HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);

    //Allocate memory to hold the path to the Dll File in the process's memory
    dll += '\0';
    LPVOID hRemoteMem = VirtualAllocEx(hProc, NULL, dll.size(), MEM_COMMIT, PAGE_READWRITE);

    //Write the path to the Dll File in the location just created
    DWORD numBytesWritten;
    WriteProcessMemory(hProc, hRemoteMem, dll.c_str(), dll.size(), &numBytesWritten);

    //Create a remote thread that starts begins at the LoadLibrary function and is passed are memory pointer
    HANDLE hRemoteThread = CreateRemoteThread(hProc, NULL, 0, (LPTHREAD_START_ROUTINE)hLocLoadLibrary, hRemoteMem, 0, NULL);
    using namespace std;
    cout << hRemoteThread << endl;

    //Wait for the thread to finish
    bool res = false;
    if (hRemoteThread)
        res = (bool)WaitForSingleObject(hRemoteThread, MAXWAIT) != WAIT_TIMEOUT;

    //Free the memory created on the other process
    VirtualFreeEx(hProc, hRemoteMem, dll.size(), MEM_RELEASE);

    //Release the handle to the other process
    CloseHandle(hProc);

    return res;
}
brauchst nur noch

Code:
int main(){
insertDll([PROZESSID hier rein], [PFAD ZUR DLL])
}
fertig :o
Dieser hier ist halt in C++ geschrieben.
[Only registered and activated users can see links. Click Here To Register...] ist in VB.Net geschrieben.
01/09/2010 12:13 12354#13
Quote:
Originally Posted by *GuideMan* View Post
Dieser hier ist halt in C++ geschrieben.
[Only registered and activated users can see links. Click Here To Register...] ist in VB.Net geschrieben.
Den Code hast du aber schön rauskopiert!
Gut gemacht!
01/16/2010 19:12 NoiiZ#14
<.< link defekt pls neu....