Re: Execute Stream?
- From: erewhon@xxxxxxxxxx (J French)
- Date: Wed, 20 Jul 2005 10:13:43 +0000 (UTC)
On Wed, 20 Jul 2005 10:14:48 +0200, "didi" <didi@xxxxxxxxxxxxxxx>
wrote:
>Yes the last one is the true purpouse of my interes...
>
>So if my customer will not register then no
>exe will be saved... but he must test it. (trial)
>
>Now you can understand why I search it for.
>
>My first idea was to save it to unknown
>place.. like WIN TEMP creating a labyrint of folders.
>But isn't a good job for client folders...
Let me get this right
You aim to send out an EXE
- within that EXE is embedded another EXE
- you want to dig out the second EXE and unmangle it
- then you want to run it
You know that Windows will happily run a file with any extension ?
- it looks inside the header to determine if it is a PE
Personally I suggest that you convert your second EXE into a DLL
- no great problem there
Then your EXE fishes out the DLL, unmangles it, stores it in the Temp
directory as some .TMP or .$$$ file name, perhaps as two + files
Then you use LoadLibrary on it, invoke procedures in the DLL that
activate Callbacks into your first EXE that confuse the issue so that
it is hard to write a new loader for the DLL.
On termination of the App you do a FreeLibrary and then delete the
file(s) in the Temp directory
Even if someone detects that you've created a .TMP file in the
(perfectly reasonable) Temp directory, and that they've figured that
it is really a DLL in drag, copied the file elsewhere
- they'll still have one heck of a job making the DLL function
- although a lot of the code is in the DLL, vital bits are in the EXE
and it is pretty easy to ensure that the EXE will only work with a DLL
that it just created.
If anyone is good enough to crack that sort of mess, then frankly they
are very smart.
CreateFile also has an interesting Flag : FILE_FLAG_DELETE_ON_CLOSE
There is also something else that is interesting, I've never tried it,
but an EXE can Export functions and can be invoked with LoadLibrary
- not really necessary - but an interesting layer of obfuscation
.
- References:
- Execute Stream?
- From: didi
- Re: Execute Stream?
- From: J French
- Re: Execute Stream?
- From: didi
- Execute Stream?
- Prev by Date: Re: Execute Stream?
- Next by Date: Re: Execute Stream?
- Previous by thread: Re: Execute Stream?
- Next by thread: Re: Execute Stream?
- Index(es):
Relevant Pages
|