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 


[c#] .dll injection

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

Joined: 07 Dec 2006
Posts: 406

PostPosted: Sun Jul 04, 2010 6:30 pm    Post subject: [c#] .dll injection Reply with quote

Ok, so my question is not how to inject a .dll. I already got that down. My question is once the .dll is injected, what can I do that I could not do before? What methods/info do I have access to now that I am in that app's domain? I know how to make .dll's, and how to use them, just not the stuff associated with injection.

I am hoping for possibly the ability to create a image of the game screen even if it is in the background, mouse hooks, keyboard hooks, or something to help me do some memory reading.

to summarize, how do I make the .dll that I inject?

_________________
Dark Byte wrote:
ce can certainly damage hardware let's say you have a robotarm attached to your computer, and the software limits usually block it from ripping out it's own cpu. If you remove that limit and then issue the command to rip out the cpu, sure, say goodbye to your hardware
Back to top
View user's profile Send private message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Sun Jul 04, 2010 7:50 pm    Post subject: Reply with quote

Injecting your dll into a process has many benefits. The most common reason to inject your dll into a process is having total control over the processes memory, having said so, you can edit memory as if it was your own and is an undetected alternative to ReadProcessMemory() and WriteProcessMemory().
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: Sun Jul 04, 2010 10:09 pm    Post subject: Reply with quote

iPromise wrote:
Injecting your dll into a process has many benefits. The most common reason to inject your dll into a process is having total control over the processes memory, having said so, you can edit memory as if it was your own and is an undetected alternative to ReadProcessMemory() and WriteProcessMemory().


Being injected doesn't mean you are undetected. Altering memory can still be detected regardless if it's from the same process space. Detection depends on how the applications protection [if it has any] is written.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Jul 04, 2010 10:47 pm    Post subject: Reply with quote

iPromise wrote:
Injecting your dll into a process has many benefits. The most common reason to inject your dll into a process is having total control over the processes memory, having said so, you can edit memory as if it was your own and is an undetected alternative to ReadProcessMemory() and WriteProcessMemory().


Hardly undetected, there's more to anti-cheats than just shitty gameguard.

Trying to change even a byte of something you shouldn't will get you kicked by something like Punkbuster for memory corruption, like changing an instruction from JE to JNE.

Injecting a DLL will probably get you automatically kicked within seconds.
Back to top
View user's profile Send private message
sangeli
Master Cheater
Reputation: 0

Joined: 07 Dec 2006
Posts: 406

PostPosted: Sun Jul 04, 2010 10:48 pm    Post subject: Reply with quote

what if I am injecting a .dll but I am not changing any memory, just reading? I just need to be able to view its screen when it is not visible (background) and to send it mouse/key events.
_________________
Dark Byte wrote:
ce can certainly damage hardware let's say you have a robotarm attached to your computer, and the software limits usually block it from ripping out it's own cpu. If you remove that limit and then issue the command to rip out the cpu, sure, say goodbye to your hardware
Back to top
View user's profile Send private message
XaLeX
Expert Cheater
Reputation: 0

Joined: 19 Aug 2008
Posts: 226

PostPosted: Fri Jul 09, 2010 8:36 am    Post subject: Reply with quote

sangeli wrote:
what if I am injecting a .dll but I am not changing any memory[...]

wait, to inject a dll don't you write to the process memory? O.o
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Fri Jul 09, 2010 9:43 am    Post subject: Reply with quote

XaLeX wrote:
sangeli wrote:
what if I am injecting a .dll but I am not changing any memory[...]

wait, to inject a dll don't you write to the process memory? O.o

You're allocating memory inside the process's space memory for your dll and you write the dll into it.
you're not changing any routine of the process itself

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

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Jul 11, 2010 8:28 am    Post subject: Reply with quote

Stylo wrote:
XaLeX wrote:
sangeli wrote:
what if I am injecting a .dll but I am not changing any memory[...]

wait, to inject a dll don't you write to the process memory? O.o

You're allocating memory inside the process's space memory for your dll and you write the dll into it.
you're not changing any routine of the process itself


Depends on the injection technique for that. 'Standard' injection just injects the string name and calls LoadLibrary, which the operating system does the rest from there. You can write everything yourself and avoid LoadLibrary using manual mapping though.

XaLeX wrote:
sangeli wrote:
what if I am injecting a .dll but I am not changing any memory[...]

wait, to inject a dll don't you write to the process memory? O.o


Technically, yes. Granted in most cases people allocate memory for the injection process (writing the path to the module) only, which in turn is only editing the newly allocated memory and not already existing things. (Which you can do but most people don't.)

_________________
- 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