| View previous topic :: View next topic |
| Author |
Message |
MooMooCow Newbie cheater
Reputation: 0
Joined: 07 Jun 2007 Posts: 21
|
Posted: Wed Oct 29, 2008 6:30 am Post subject: Loading a DLL from inside of an EXE? |
|
|
I currently have a program that injects a DLL, but I hate distributing the executable with a DLL. The program and DLL is coded in C++ with some ASM. I would like to combine the EXE and the DLL into one file and then launch the DLL at start up. So, is it possible to combine a DLL to the end of an EXE file and have the EXE load the DLL successfully with LoadLibrary? If so, how?
I was thinking of just writting some nops at the end of the original EXE and then copying the DLL hex to the end of it, but I'm not sure where to go from there. I'm sure there will be a problem when I call LoadLibrary because it won't be able to find the DLL. Any ideas?
Thanks for any help and I hope this makes sense.
|
|
| Back to top |
|
 |
Fafaffy Cheater
Reputation: 65
Joined: 12 Dec 2007 Posts: 28
|
Posted: Wed Oct 29, 2008 6:36 am Post subject: Re: Loading a DLL from inside of an EXE? |
|
|
| MooMooCow wrote: | I currently have a program that injects a DLL, but I hate distributing the executable with a DLL. The program and DLL is coded in C++ with some ASM. I would like to combine the EXE and the DLL into one file and then launch the DLL at start up. So, is it possible to combine a DLL to the end of an EXE file and have the EXE load the DLL successfully with LoadLibrary? If so, how?
I was thinking of just writting some nops at the end of the original EXE and then copying the DLL hex to the end of it, but I'm not sure where to go from there. I'm sure there will be a problem when I call LoadLibrary because it won't be able to find the DLL. Any ideas?
Thanks for any help and I hope this makes sense. |
you do make sense
solution:
http://www.mediafire.com/?b3nwbakqa0n
+rep me
i think this is only for vista but you can check
What it does:
1.combines all the .dll's and the main exe all into 1 exe so for example
lets say you need music so you put windows media player on there
and theres a dll. if you renamed it or deleted it, then your program will not work.
But if you used this then the dll with bind with the exe so now you dont see the dll no more!
_________________
| Brillia wrote: | | I FUCKING FUCK SEX |
|
|
| Back to top |
|
 |
Zand Master Cheater
Reputation: 0
Joined: 21 Jul 2006 Posts: 424
|
Posted: Wed Oct 29, 2008 7:18 am Post subject: |
|
|
A more 'complete' solution is to add the DLL as a resource and extract it at runtime.
If you have the source to both, why not do whatever the DLL does in the main executable?
|
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Wed Oct 29, 2008 8:16 am Post subject: Re: Loading a DLL from inside of an EXE? |
|
|
That's very annoying and against the rules.
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Wed Oct 29, 2008 8:18 am Post subject: |
|
|
| Cause he's injecting it.
|
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Wed Oct 29, 2008 11:15 am Post subject: |
|
|
In that case, you can get rid of the exe and make the dll self-injecting. I'm not sure of the coding required for this though.
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
MooMooCow Newbie cheater
Reputation: 0
Joined: 07 Jun 2007 Posts: 21
|
Posted: Wed Oct 29, 2008 11:21 am Post subject: Re: Loading a DLL from inside of an EXE? |
|
|
| fafaffy wrote: |
you do make sense
solution:
http://www.mediafire.com/?b3nwbakqa0n
+rep me
i think this is only for vista but you can check
What it does:
1.combines all the .dll's and the main exe all into 1 exe so for example
lets say you need music so you put windows media player on there
and theres a dll. if you renamed it or deleted it, then your program will not work.
But if you used this then the dll with bind with the exe so now you dont see the dll no more! |
Thanks. It sounds like what I'm looking for, but I keep getting the error:
Could not load assembly from the location
It says it is used for .NET programs and my program is not a .NET program. Maybe that is why.
| Slugsnack wrote: | | Cause he's injecting it. |
Correct.
| --Pillboi-- wrote: | | In that case, you can get rid of the exe and make the dll self-injecting. I'm not sure of the coding required for this though. |
I've never heard of a self injecting DLL, but anyway it won't help in my situation.
|
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Wed Oct 29, 2008 2:15 pm Post subject: |
|
|
| Do what Zand said. Add the dll as a resource.
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Wed Oct 29, 2008 4:51 pm Post subject: |
|
|
| I made a bot for maplestory that does that. Its called MyBot. What it does is it stores the 3 required files as binary in the exe and when it runs, it writes into a file. Look in the maple section if u want to see what it does.
|
|
| Back to top |
|
 |
Slugsnack Grandmaster Cheater Supreme
Reputation: 71
Joined: 24 Jan 2007 Posts: 1857
|
Posted: Wed Oct 29, 2008 5:02 pm Post subject: |
|
|
| --Pillboi-- wrote: | | In that case, you can get rid of the exe and make the dll self-injecting. I'm not sure of the coding required for this though. |
wtf, never heard of that..
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Wed Oct 29, 2008 5:26 pm Post subject: |
|
|
| Slugsnack wrote: | | --Pillboi-- wrote: | | In that case, you can get rid of the exe and make the dll self-injecting. I'm not sure of the coding required for this though. |
wtf, never heard of that.. |
Maybe he's thinking of proxy DLL's
|
|
| Back to top |
|
 |
dnsi0 I post too much
Reputation: 0
Joined: 04 Jan 2007 Posts: 2674
|
Posted: Wed Oct 29, 2008 5:43 pm Post subject: |
|
|
| How the hell would a dll run without a exe wrapper. and what is rundll32.exe? I read something that says it runs dlls as processes.
|
|
| Back to top |
|
 |
smartz993 I post too much
Reputation: 2
Joined: 20 Jun 2006 Posts: 2013 Location: USA
|
Posted: Wed Oct 29, 2008 5:52 pm Post subject: |
|
|
| Quote: | | rundll32.exe is a process which executes DLL's and places their libraries into the memory, so they can be used more efficiently by applications. |
|
|
| Back to top |
|
 |
BanMe Master Cheater
Reputation: 0
Joined: 29 Nov 2005 Posts: 375 Location: Farmington NH, USA
|
Posted: Wed Oct 29, 2008 8:48 pm Post subject: |
|
|
technically your quote smartz is correct except for the addition to the end..
RunDll is exactly like LoadDll.exe that olly uses except that RunDll Executes a funtion specified in the commandline.. it DOES not "place dll's in memory" other then its own.. nor does it "make anything more accessible" except for itself and most definitly not other applications.
|
|
| Back to top |
|
 |
--Pillboi-- Grandmaster Cheater Supreme
Reputation: 0
Joined: 06 Mar 2007 Posts: 1383 Location: I don't understand the question. Is this a 1 to 10 thing?
|
Posted: Thu Oct 30, 2008 3:35 am Post subject: |
|
|
| noz3001 wrote: | | Maybe he's thinking of proxy DLL's |
I'm not really sure what I'm thinking of.
_________________
Enter darkness, leave the light, Here be nightmare, here be fright...
Earth and Water, Fire and Air. Prepare to meet a creature rare.
Enter now if you dare, Enter now the dragon's lair. |
|
| Back to top |
|
 |
|