Re: Unpack Files to memory and then run them (exe protector style)
- From: Murrgon <murrgon@xxxxxxxxxxx>
- Date: Thu, 27 Oct 2005 12:28:24 -0400
Nemok wrote:
Is it possible in anyway to load a file into memory and then run it from there? I am working on a file compressor (www.nemokprod.go.ro/nb.htm) that can compress and encrypt and save multiple files as an exe file that can then run the compressed files after unpacking them to a temp folder. The problem is that I have to unpack the files to the hard-disk and then run them from there, making them vulnerable to user that may try to get the original (unprotected) files.
So the user shouldn't have access to the file operations in the background. So I need to keep the original unpacked files hidden from the user, until after they are opened by the unpacker and then deleted. So users should have no kind of access to the files (should not see them, open them, should not be able to modify or copy them) but the unpacker should be able to run them. (that is why I think that the memory is the best solution)
So is there any way to protect them, like unpacking them directly to memory and then run them from there? Something like a virtual disk in memory?
What you have described is basically refered to as a pack file and has been used by game engines for a long time. A basic description of a system that uses this can be found here:
http://www.drizzle.com/~scottb/gdc/its-still-loading-paper.htm
What you need to do is memory map your compressed and encrypted files into memory and use their content directly. That may, or may not, require some modifications to your application to be able to handle memory pointers to file content instead of using fopen/CreateFile and reading in the data yourself.
Murrgon .
- Follow-Ups:
- Re: Unpack Files to memory and then run them (exe protector style)
- From: Joseph M . Newcomer
- Re: Unpack Files to memory and then run them (exe protector style)
- Prev by Date: CFormView adding GetDocument() functionality results in error C2143: syntax error : missing ';' before '*'.
- Next by Date: OnLButtonDown
- Previous by thread: Re: Unpack Files to memory and then run them (exe protector style)
- Next by thread: Re: Unpack Files to memory and then run them (exe protector style)
- Index(es):