Run .EXE from Resource/Memory
Hi,
A while ago there was a thread about being able to run a File embedded as a resource from Memory without extracting it to a temp location.
I can't seem to find that thread... any ideas?
*Before anyone asks, no it's not a virus, but I need to protect a file from being taken by 3rd party.
Re: Run .EXE from Resource/Memory
Data can be extracted from memory as well as from a temp file. A google search found some info you are looking for at the stack website.
Re: Run .EXE from Resource/Memory
I thought we'd pretty much established that:
- Resources are fairly trivial to extract, so they offer little in the way of privacy or security.
- Doing this kind of thing is a huge red-flag to antivirus software, making it fail for most users.
- Since the primary use of such techniques is injecting malware and there is no significant legitimate reason for doing it we don't discuss such things here.
I seem to recall some suspicious rationale like "I have to restrict this 3rd party software I'm using so people can't just use it themselves."
If a vendor sells a software product subject to this kind of restriction they would provide some sort of enforcement mechanism like automated licensing to enforce it. Such a "reason" just leads to more suspicion about the motives behind this request.
But perhaps you can tell us what you really need to accomplish. We might have more viable alternatives to suggest.
If this is another "I don't want to use a proper installer" issue I have nothing more to offer. It just isn't worth the trouble to reinvent the wheel.
Re: Run .EXE from Resource/Memory
After reading dilettante's post, I'm thinking the original thread the OP asked for is in the trash for the reasons stated. I could not think of a valid reason for what was asked for.
Re: Run .EXE from Resource/Memory
I am quite aware of the security issues this may cause with AntiVirus softs etc..
But the idea here is that I have an App given to me by a 'COMPANY' which encrypts/decrypts things. SO I need to run my side of this through this tool. Yes currently I'm extracting it to a temp and running it through there, but we don't want this to pass to others/3rd partys etc..
Yes I can hide the window etc.. but anyone smart enough would be able to obtain a copy of this tool etc.. so need to think of a smart way so it becomes un-obtainable.
Re: Run .EXE from Resource/Memory
Doing what you are trying to do here is a bad idea for so many reasons. Even if you get it working I (imho) can see it causing problems down the line.
Does the 'COMPANY' provide a *.dll or some such?
Can you achieve the same using more trusted methods?
Re: Run .EXE from Resource/Memory
Quote:
Does the 'COMPANY' provide a *.dll or some such?
It is an .exe with a DOS prompt which accepts commands.