Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[VB6][Question]Injecting Code Into .EXE Programs

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Elec0
Expert Cheater
Reputation: 0

Joined: 21 Nov 2007
Posts: 188
Location: Out of my mind, back in five minutes.

PostPosted: Tue Jan 29, 2008 9:10 am    Post subject: [VB6][Question]Injecting Code Into .EXE Programs Reply with quote

How would you go about doing this? It would be kind of like making a trainer, but you would, instead of a .swf file, you would use a .exe file. If that makes any sense.


~Elec0

_________________
Back to top
View user's profile Send private message MSN Messenger
Losplagos
Expert Cheater
Reputation: 0

Joined: 21 Mar 2006
Posts: 172
Location: Knee deep in a c++ book

PostPosted: Tue Jan 29, 2008 9:34 am    Post subject: Reply with quote

You would have to program a .dll and inject it into the game. To start look up readprocessmemory() and writeprocessmemory(). You will have to write the dll in another langauge since vb6 if i remember correctly does not let you make dlls. That should be enough to start.
_________________

Earthbound = 31337


Last edited by Losplagos on Tue Jan 29, 2008 9:38 am; edited 1 time in total
Back to top
View user's profile Send private message
Elec0
Expert Cheater
Reputation: 0

Joined: 21 Nov 2007
Posts: 188
Location: Out of my mind, back in five minutes.

PostPosted: Tue Jan 29, 2008 9:36 am    Post subject: Reply with quote

Oh...I think you can write DLLs in C++, but I don't know C++ very well.
Okay, thanks though.

_________________
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Tue Jan 29, 2008 10:52 am    Post subject: Reply with quote

Losplagos wrote:
You would have to program a .dll and inject it into the game. To start look up readprocessmemory() and writeprocessmemory(). You will have to write the dll in another langauge since vb6 if i remember correctly does not let you make dlls. That should be enough to start.


Correct, by default VB cannot make standard Win32 dlls, but you can hack the linker to do it.

As for other injection, you can write to memory, make caves, etc without the need to inject a DLL.

Elec0 wrote:
Oh...I think you can write DLLs in C++, but I don't know C++ very well.
Okay, thanks though.


Yes, you can make DLLs in C/C++

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Elec0
Expert Cheater
Reputation: 0

Joined: 21 Nov 2007
Posts: 188
Location: Out of my mind, back in five minutes.

PostPosted: Wed Jan 30, 2008 10:41 am    Post subject: Reply with quote

Wiccaan wrote:
Losplagos wrote:
You would have to program a .dll and inject it into the game. To start look up readprocessmemory() and writeprocessmemory(). You will have to write the dll in another langauge since vb6 if i remember correctly does not let you make dlls. That should be enough to start.


As for other injection, you can write to memory, make caves, etc without the need to inject a DLL.


I didn't get that.

_________________
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Jan 30, 2008 10:56 am    Post subject: Reply with quote

Injection doesn't always mean that you inject a DLL into a process. There is also code injection. Just like what CE scripts do, they inject code into the process.

You can do this via WriteProcessMemory by rewriting code, replacing jumps, creating caves, etc like I said above.

You can also execute code via threads, again like CE 5.4 does, by injecting a cave and having the thread call to it.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites