[Question] Dll injection.

12/17/2008 17:29 _fobos_#1
I got a simple question, If a dll is injected into the CO process could i make another aplication use that Dll and functions within it? to send like data to those functions.

For example my dll contains the item dropping function my program has to send info to that dll to decide wich item to drop and on turn that same dll containing the right info now must do action within CO -> dropping the item.

If anyone can answer that and maybe provide me with some pointers that would be very appreciated!
I have searched google over and over, all i find is how to do a dll injection wich i already know how, All i need is somehow to make those 3 communicate together :)
12/17/2008 20:21 giacometti#2
_fobos_

Nice to see your evolution. Here are some tips about what you asking: (1) make your full program inside the dll, so no need to external communication; (2) You can use windows registry or even codecaves to comunicate with your "main" application.

I went throught number 2 indeed, but (1) is cleaner and nicer, and you can improve it faster if you are migrating to an injection approch.

Good luck,
Giacometti.
12/17/2008 21:52 _fobos_#3
Quote:
Originally Posted by giacometti View Post
_fobos_

Nice to see your evolution. Here are some tips about what you asking: (1) make your full program inside the dll, so no need to external communication; (2) You can use windows registry or even codecaves to comunicate with your "main" application.

I went throught number 2 indeed, but (1) is cleaner and nicer, and you can improve it faster if you are migrating to an injection approch.

Good luck,
Giacometti.
Thanks for your answers, and yes i have been thinking of putting the whole app. inside the DLL, My main point would be tho is the creation of forms -> Hotkey -> form.create or something, I have choise to write this app in two ways C++ or delphi, VB just wouldnt cut it for this, i do know theres a way to write normal dll's in VB but last i know is that it's not very stable.
Another reason why i asked if it could be possible to have a 3 way communication is because i want it to also function like a loader, have everything in 1 project -> load game (Inject dll, make multi etc.. etc..) -> call functions from dll wich then respond in game.

The only info i found about forms is creating the app like would do as an executable and only change the building format to dll, i have not tested this yet, but i will try this out.
Thanks for your help once again :D
If you have any further information that you think i could use i can use all the help i can find :p

Thanks :)
12/18/2008 01:54 high6#4
I was doing this is CoPlugin but lost interest because no one showed interest.
12/18/2008 12:45 _fobos_#5
Quote:
Originally Posted by high6 View Post
I was doing this is CoPlugin but lost interest because no one showed interest.
Yeah people dont really show interest for these kind of things, because well dll injection is also used for other things.
But its the only way to create a good hack now tho :p
As you are familiar with it, any tips?
12/20/2008 06:22 Ian*#6
That is what I was doing with my CLSBot, but like high6, lost interest.
I read what you said quickly, so I may have understood incorrectly.
What you're trying to do is get a main program (The Gui?) to load a dll which from there can load another dll containing different functions, correct?
04/21/2009 14:36 clintonselke#7
Why not use network sockets, have ur injected DLL host on localhost port 1234 or whatever, then have your other program to establish connection on localhost port 1234 to talk to the dll / send it (serialised) parameters / trigger functions / etc.. I know alot of the linux applications use this method to talk to one another.
04/21/2009 15:43 high6#8
Quote:
Originally Posted by clintonselke View Post
Why not use network sockets, have ur injected DLL host on localhost port 1234 or whatever, then have your other program to establish connection on localhost port 1234 to talk to the dll / send it (serialised) parameters / trigger functions / etc.. I know alot of the linux applications use this method to talk to one another.
That would be a stupid waste of a socket. Might as well use pipes.
04/21/2009 16:15 clintonselke#9
Yea, pipes sound good if ya can get that going.

Another option is to use LPC (Local Procedure Call). It is similiar to RPC (Remote Procedure Call), but it is designed for communication between threads and processes running on the one machine.

heres a link that also contains example source down the bottom: [Only registered and activated users can see links. Click Here To Register...]

Good Luck ppl
04/21/2009 17:08 _fobos_#10
Woah thats an old topic I solved the problem i was having tho!

Besides that im not that great with network coding :)
when i have the time I will study up on that.
Any 'must read' documentation is welcome :P

What i wanted to do was having a GUI talking with a dll thats loaded/injected in Conquer.
that way the GUI could for example set x and y coordinates which the injected dll would use for the functions it was mimicing.
anyway I solved that with Ian*'s help :p
and decided to go like he said, putting the whole application in 1 dll, inject it and trigger the 'main' app with a hotkey.
04/23/2009 00:07 tao4229#11
Why don't you just create a GUI inside the DLL?
04/23/2009 00:39 high6#12
Quote:
Originally Posted by tao4229 View Post
Why don't you just create a GUI inside the DLL?
That is what he did to solve it.

Also there is a problem with that. What if conquer.exe closes? Then your app is forced to close.
04/23/2009 00:46 tao4229#13
Quote:
Originally Posted by high6 View Post
That is what he did to solve it.

Also there is a problem with that. What if conquer.exe closes? Then your app is forced to close.
Possibly handle the DLLMain with the unload parameter? (I'm not experienced in DLL injection, but it has some logic in there)
Go on from there.
04/23/2009 00:50 _fobos_#14
Quote:
Originally Posted by high6 View Post
That is what he did to solve it.

Also there is a problem with that. What if conquer.exe closes? Then your app is forced to close.
That's okay tho as the dll with the functions must be injected in conquers memory space, better the app to close with it then.
thru a loader load the dll on game start-up so always a new instance of the bot.
Only problem really are the hotkeys to bring up the main app. because for example if you run 2 clients you can only open your bot on the first, but thats just a small problem can set global hotkeys other then that it worked fine I dont know if you tested SkillerSlut when i still updated it, botted perfectly in the background :)