PDA

View Full Version : Is it possible to Secure the exe file contents ?


Alejo
05-31-2006, 06:53 PM
Hi everybody,

As you all know on running AMS exe file all the contents will be all present in the temp directory! .. and it is simple to copy the contents to any other location! .. i.e: a sort of decompilion!

I wonder if it is possible to secure the contents of the exe file from being copied from the temp directory?

Thank you.

Wonderboy
05-31-2006, 10:02 PM
Welcome to the forum
Yes it is, well sort of anyway, it all depends on how you would want to go about doing so!
and with ams you can protect certain content in certain ways,

Alejo
06-01-2006, 07:29 AM
Thank you Wonderboy, this is very nice of you indeed.

Well, for example on excuting an audio compiled file (encrypting data segment is selected) you can esily find all audio files in audio temp folder... this also applied for data compiled file that will also appear in Doc temp folder...

I understand that the temp folder contents are temporory till the exe file is closed but I was wondering about the possibility of making such a temp folder inaccessible to the user or at least redirect the temp folder to another location so that it won't be found that easily? or at least make it a hidden or encrypted sort of file... is there any sort of action or code to be embeded during the design to make this idea true?

Thank you once again for all your wonderful contributions on this very helpful site.

Wonderboy
06-01-2006, 11:21 AM
Hello np, il put together an example for you, so you can see if you like it or not, and il explain how it works.

longedge
06-01-2006, 11:47 AM
I don't want to dissuade you from experimenting with AMS (after several years I still enjoy creating projects) but to be realistic, there's no way that you can allow people to hear an audio file and prevent it being copied/recorded.

I've been proved wrong quite a few times so someone might want to challenge my thoughts .... :D ??

TJS
06-01-2006, 12:04 PM
AFAIK Longedge is right. At some point the files you intend to play are going to need to be exposed to the media player in their native format (unencrypted). You can pull a few tricks to obfuscate the presence of those files but its mostly smoke and mirrors.

I too am regularly proven wrong though...

rhosk
06-01-2006, 12:51 PM
I'll raise my hand on this one as well, can't be done. If you can hear it/see it, you can copy it.

Wonderboy
06-01-2006, 01:48 PM
Ofcourse it cant be 100% secured, but some files that user wants keep intact in his / her temp folder can be made very hard to get,even extreemly hard to get,since you can rename decrypt move disable the users possiblility to do what ever he would like to do with/on his/her, system whenever this application is running, so no you cant make it totaly impossible,but what you can is make it extreemly hard for most users to be able to get your files, and no i am not talking about audio and text, cause anyone can copy that, but certain things that you want to keep intact, can be kept intact very well,
its just a mather of knowing what to disable for the user,
and knowing where to set the correct scripts,

longedge
06-01-2006, 02:33 PM
Don't misunderstand me. I'm not being critical just, as I said, realistic.

The example that Alejo mentioned was an audio file, in which case you don't need to even know that the file has been extracted to your temp directory. Audacity or lots of other software packages will record what you are listening to and you can then save it out again in whatever format you want. Even if you could disable this method with some system level stuff, then what's stopping a user connecting a recording device to the earphone socket and recording direct.

Similar arguments apply to images, text and to a lesser extent video. Flash files are easier to protect for their text and graphic content.

I'd be the last person to dissuade anyone from trying it as an excercise in using AMS in fact it's the sort of thing I do myself all the time - just creating a project for fun and hopefully learning a useful trick or two along the way :yes :lol

Intrigued
06-01-2006, 05:58 PM
Flash files are easier to protect for their text and graphic content

With two (2) simulataneous key-clicks one can copy viewable text, images via a screenshot (aka. screencapture).

longedge
06-02-2006, 03:11 AM
With two (2) simulataneous key-clicks one can copy viewable text, images via a screenshot (aka. screencapture).

:lol - yep - too many words there, how about - Flash files are easier to protect.

Alejo
06-02-2006, 09:49 AM
Well, what about using sort of indirect way of protection by making the applicaion stats in a full screen mode and in the same time disable keyboard functions that will allow the user to minimize the screen... in this way it will not be possible for the user to reach the temp directory and copy files whether it is audio, software, flash or whatever....

This will eliminates the possibility of recording the audio files (for example) using some other software... as well as screen capture... etc.

Thank you.

rhosk
06-02-2006, 09:57 AM
If you disable my keyboard, I exit your app (or end task). Not a lucrative solution IMO.

Like longedge alluded to ... if you have something that is that Top Secret, then AMS is probably not your answer.

longedge
06-02-2006, 10:02 AM
Or just run music software first, set and leave it recording and then run your app. Of all multimedia I reckon that audio is the most difficult (read as impossible) to protect.

Sony thought they had devised a way recently didn't they :eek: :D :eek:

Alejo
06-02-2006, 11:12 AM
I'm not talking about Top Secret materials here! ... I'm just simply asking about the possibility of a way to protect exe file contents (any contents) from being decompiled... is it technically possible or not? ...

I raised the above mentioned idea only as a last resort (I'm not an AMS expert) in case it is technically not possible to protect anything in AMS.... Anyways let us see what Wonderboy will come up with in this regard as he mentioned in his reply.


If you disable my keyboard, I exit your app (or end task).
BTW, if disabling certain key functions will not allow the user to reach the temp directory and the only choice is to exit the application, then the idea well be succceful as regards protection!.... as you know that almost all copy protection techniques are not welcomed by some users but sometime it is highly needed.

Or just run music software first, set and leave it recording and then run your app. Of all multimedia I reckon that audio is the most difficult (read as impossible) to protect.
surely, you are right.


Once again thanks for your help...

longedge
06-02-2006, 11:37 AM
Alejo - my apologies. I've diverted your thread into a negative discussion which is not what I meant to do at all and it isn't what a newcomer to the forum should expect. Sorry.

Just as a final word from me on the subject - I don't believe that it is viable to protect content. I'd say that as a programming excercise, you can put obstacles in the way of users but there's always a way around them.

rhosk
06-02-2006, 11:52 AM
Shoot, I didn't mean to sound negative as well. My apologies too :)

I think that for audio, the most you could do is maybe change the extensions of the files to something obscure, use the crypto plugin to protect them when they're not playing, and maybe wrap all of that into a protected zip file.

But, once the audio is playing, it must be decoded from the hard drive, there's no way around that.

Good luck.

Wonderboy
06-03-2006, 08:26 PM
if you just want to keep people out of the temp folder then you could use
this On Timer
-- Get the titles and window handles of all open windows.
windows = Window.EnumerateTitles();

-- A variable containing text in the title you want to search for.
window_name = "Temp";

-- Loop through the table of windows.
for handle, title in windows do

-- Check if the window title has the target text.
result = String.Find(title, window_name, 1, false);

-- if the string was found in the title, send the window a close message.
if (result ~= -1) then
Window.Close(handle, CLOSEWND_SENDMESSAGE);
end
end


Allso you could disable a few keys combinations, withe_key and e_Modifiers,
and use some other close handles if you want the user to only be able to exit your application with a exit button in your application,
and you could use the clipboard plugin and do a
Clipboard.CopyText(""); witch makes anything the user would copy un pasteable,if put on Timer event aswell, there you have a few examples of what you could do,

Alejo
06-05-2006, 02:59 PM
Thank you for your time and effort Wonderboy ... working great :yes

Worm
06-05-2006, 03:10 PM
So I simply share my hard drive and use another PC to grab the contents... now what?

Wonderboy
06-05-2006, 03:44 PM
thinking about the normal situations,the casual user wounldent perhapse think that far, allso am pretty sure ,that shared drives can be disabled, and if you think in those longshot terms, there are meny possibilitys to grab the files, but the casual user, ussualy does not, go thrue every imaginal possiblilitys to try to get files that probably aint that important to them,unless it would be,

Worm
06-05-2006, 09:59 PM
Thats kinda my point. I think its extreme to punish the "casual" user by hijacking their machine, keeping them from their own files or other applications just because yours is running. The "casual" user wouldn't care to look for the files in the temp folder so why even bother.

rhosk
06-06-2006, 05:25 AM
The "casual" user wouldn't care to look for the files in the temp folder so why even bother.This was my point all along as well.

The "non-casual" user will get the files, no matter how many steps you take. Like your tenacity though :)

TJS
06-06-2006, 06:36 AM
Are casual users familiar with command line (DOS prompt)? This solution doesn't stop access to the temp from that angle... though I applaud wonderboy for the innovative attempt.