Register for your free account! | Forgot your password?

Go Back   elitepvpers > Off-Topics > Tutorials
You last visited: Today at 12:36

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Code/Dll Injection Tutorial

Discussion on Code/Dll Injection Tutorial within the Tutorials forum part of the Off-Topics category.

Reply
 
Old 02/14/2010, 19:17   #16
 
flo8464's Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 161
Received Thanks: 38
Quote:
Originally Posted by P-a-i-n View Post
du hast aber was vergessen das man im linker Unicode auf Multi byte zeichensatz stellen muss
sonst gibt es 2 fehler
Im Linker? Es muss nur die Präprozessordefinition UNICODE entfernt werden, Visual Studio definiert es automatisch, da muss man die Projekteinstellungen editieren. Mit dem Linker hat das absolut nichts zu tun

Quote:
#include "windows.h"//Für spätere Funktionen nötig
#include <iostream>//Für spätere Funktionen nötig

using namespace std;//Für spätere Funktionen nötig

int main(int argc, char* argv)//Programm Einstieg
Warum kommentierst du das? Wem das nicht klar ist, der hat Null Nutzen von dem Tutorial.
flo8464 is offline  
Old 02/14/2010, 19:36   #17
 
P-a-i-n's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 1,258
Received Thanks: 396
bei VC++ ist das so
das benutz ich aber nicht groß ich mag da mehr notepad++
P-a-i-n is offline  
Old 02/14/2010, 20:19   #18
 
flo8464's Avatar
 
elite*gold: 0
Join Date: Nov 2008
Posts: 161
Received Thanks: 38
Quote:
Originally Posted by P-a-i-n View Post
bei VC++ ist das so
das benutz ich aber nicht groß ich mag da mehr notepad++
Du benutzt Notepad + makefiles statt einer IDE? *********
flo8464 is offline  
Old 02/15/2010, 03:08   #19
 
P-a-i-n's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 1,258
Received Thanks: 396
ich brauch keine ide ich arbeite nicht mit forms anwendungen mir reichen meine lib's und includes für eine dll
P-a-i-n is offline  
Old 03/02/2010, 16:25   #20
 
Deathly Assassin's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 4
Received Thanks: 63
Quote:
Originally Posted by flo8464
*********
/sign
.. Arbeite auch kaum mit forms.. Eine IDE ist trotzdem wesentlich bequemer, übersichtlicher und erhöht so das Arbeitstempo um einen nicht unbeträchtlichen teil
Deathly Assassin is offline  
Old 03/19/2010, 23:54   #21
 
elite*gold: 0
Join Date: Feb 2010
Posts: 282
Received Thanks: 43
lol
POINT121 is offline  
Old 05/26/2010, 17:32   #22
 
Lazeboy's Avatar
 
elite*gold: 0
Join Date: Jun 2008
Posts: 451
Received Thanks: 410
hi
Ich habe mir das Tutorial angeguckt und versucht zu benutzen und es hat nicht funktioniert also hab ich geguckt warum nicht.

Code:
int main(int argc, char* argv)
{
    HANDLE hWnd, hProcess, AllocAdresse, hRemoteThread;
    DWORD PID;

    hWnd = FindWindow(0,"Untitled - Notepad");
    GetWindowThreadProcessId((HWND)hWnd, &PID);
    
    hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, PID);

    AllocAdresse = VirtualAllocEx(hProcess, 0, sizeof(Path), MEM_COMMIT, PAGE_EXECUTE_READWRITE);
    WriteProcessMemory(hProcess, (void*)AllocAdresse, (void*)Path, sizeof(Path), 0);
    hRemoteThread=CreateRemoteThread(hProcess, 0, 0, (LPTHREAD_START_ROUTINE) GetProcAddress(GetModuleHandle("kernel32.dll"),"LoadLibraryA"), AllocAdresse, 0, 0);
    
	if(!hRemoteThread) MessageBox(0,0,0,0);

    WaitForSingleObject(hRemoteThread, INFINITE);

    VirtualFreeEx(hProcess, AllocAdresse, sizeof(Path), MEM_DECOMMIT);
    CloseHandle(hProcess);

return 0;
}
ich habe rausgefunden das der fehler beim Remotetrhead liegt könnt ihr mir da helfen?
Lazeboy is offline  
Old 11/13/2010, 16:46   #23
 
aj1987's Avatar
 
elite*gold: 1003
Join Date: Feb 2010
Posts: 791
Received Thanks: 709
sieht gut aus... nur dein angegebenes besispiel zu verwirklichen wäre interessanter... also eben die uhr ins menü einzubauen xD
ich verstehe zwar eine dll auszuführen sie zu injecten aber wie manipuliere/erweitere ich ein vorhandenes menü (jetzt mal zum beispiel)...?
dabei muss die dll ja "wissen" wie sie das eigentliche programm erweitern soll bzw wo sie das tun soll...
dazu vl auch n beispiel? wäre interessant...
und/oder vl n beispiel wo die funktionen einer dll erst später durch das programm aufgerufen wird.. also zb man klickt im programm auf "weiter" und anstelle des normalen programmablaufes wird dann eine funktion der dll aufgerufen...
aj1987 is offline  
Thanks
1 User
Old 12/08/2010, 17:44   #24
 
elite*gold: 0
Join Date: Dec 2010
Posts: 1
Received Thanks: 0
DLL Code wird nicht ausgeführt

Erstmal thx für das geniale Tut!

Die DLL wird bei mir zwar erfolgreich injiziert (wenn ich sie löschen will,
meldet Windows dass sie vom Zielprozess verwendet wird), jedoch erscheint
keine MessageBox.

Ich hab auch bereits andere Injectors ausprobiert, jedoch wird der Code
der injizierten DLL nie ausgeführt...

Kann da jemand weiterhelfen?

mfg vredezbyrD

btw: Ich verwende Win7 x64 Home Premium und Codeblocks mit MinGW.
vredezbyrD is offline  
Old 03/11/2011, 00:50   #25
 
elite*gold: 0
Join Date: Mar 2011
Posts: 1
Received Thanks: 0
hey,

vielen dank für das großartige tutorial. mich würde allerdings ebenfalls interessieren wie man die dll per CreateRemoteThread() in einem 64-bit system injecten kann (die Funktion gibt immer 0 zurück).

danke.
newuser111 is offline  
Old 03/11/2011, 09:46   #26
 
elite*gold: 1
Join Date: Jan 2009
Posts: 224
Received Thanks: 35
Super TuT danke
Terrorhahn is offline  
Old 02/07/2013, 00:57   #27
 
elite*gold: 0
Join Date: Feb 2013
Posts: 1
Received Thanks: 0
bitte Hilfe

Ich hab mich mit dem Dll-Code ausernandergesetzt und gemerkt das es mit Copy&Paste nicht getan ist. Nachdem ich die Messagebox-strings zu wchar geändert habe, habe ich noch immer Fehlermeldungen,die ich nicht verstehe.

Daher würde ich euch bitten den Code so zu überarbeiten, damit er auch für die Dummies unter uns verwendbar ist - am Besten als Headerdatei-upload

Danke

Soweit bin ich selbst gekommen:
Das ist der Code ergänzt mit dem wchar...
Code:
#include "windows.h"

void InjNachricht()//der erstellte Thread
{
    MessageBox(0, L"Siehe da! Es klappt :P", L" Whohoo", 0);//4. Eine Message Box
}

int WINAPI DllMain(HINSTANCE hInst,DWORD reason,LPVOID reserved)//1. Beim öffnen der Dll wird diese funktion ausgeführt
{
    if(reason==DLL_PROCESS_ATTACH)//2. Falls der Grund des Aufrufes der DllMain-Funktion das Anhängen an ein Prozesses ist..
    {
        CreateThread(0, 0, (LPTHREAD_START_ROUTINE) InjNachricht, 0, 0, 0);//3.erstelle einen SubProzess, der die übergebene Funktion ausführt
    }
    return true;
}
Pyropanda is offline  
Old 08/14/2013, 16:01   #28
 
elite*gold: 0
Join Date: Apr 2006
Posts: 70
Received Thanks: 19
Anmerkung: Funktioniert nur bei 32bit Anwendungen.
LuckyLuke is offline  
Old 12/13/2014, 15:40   #29
 
elite*gold: 0
Join Date: Aug 2005
Posts: 80
Received Thanks: 13
Es geht so auch bei 64-Bit Anwendungen man muss sowohl den Injector als auch die DLL in 64-Bit Modus kompilieren. Dann funktioniert der Injector aber auch nur bei 64-Bit Programmen also brauch man für Anwendung mit unterschiedlicher Architektur auch unterschiedliche Injectoren.
teto is offline  
Reply

Tags
code, dll, injection, injector, udf


Similar Threads Similar Threads
[tutorial]Injection & Function Hooking
11/06/2010 - Tutorials - 5 Replies
First let me say this: This is not written by me, i found it posted on game deception a while ago and just rediscoverd it on my hd. Thought it might be interesting for some ppl here. Credits go to whoever originally wrote it. This contains a demo project for vc 2003 and a tutorial. You can find the tutorial in the readme folder!!!!!! oh, if you don't trust me, don't download it....
Can anyone help me with generic code injection?
06/16/2009 - General Coding - 1 Replies
Sorry for English, I see this part of e*PvP is mainly in German, but my German sucks badly (although I spent 5 years trying to learn it with little success). My question is not related that much to game hacking/coding and such, but code injection in general. Here is the background - we have a core system client, which is basically a big GUI framework over plain telnet screens. Client also has a built-in OLE and DDE servers, which we are using to extract data from system in most simple...
Code Injection Problem
01/03/2009 - General Coding - 4 Replies
Der Original Code im Assembler ist "mov esi, "(read) und müsste auf die Adresse der Aktuell aktivierten Waffe zeigen. Der Wert esi hat für jede Waffe einen festgelegten Wert während ecx eine Adresse(verändert sich bei waffenwechsel nicht) beinhaltet. Mir geht es darum den Wert während die Schleife durchläuft wieder um 1 zu erhöhen wobei ich ein kleines Problem mit dem Syntax habe. Wie ändere ich den Code so um das er den Wert an der Adresse (esi, ) um 1(oder mehr) erhöht? Der Interpreter in...
OMG SQL INJECTION TUTORIAL
11/12/2008 - RF Online - 3 Replies
... k now that i got all of ur undivided attention~~ this for all u dam leechersand about everyone talking about sql injection... from knowing multiple people that can sql inject, tell me do u even know what it stands for or how to do it...
Code injection
12/28/2005 - General Coding - 2 Replies
Just to gathering a 'feeling' of bestpractise/standards from the elite .. ... is madcodehook de facto standard if you wanna thread inject ? or what other alternatives exists ? Thanks !



All times are GMT +1. The time now is 12:36.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.