PDA

Click to See Complete Forum and Search --> : for Hardcore programmers!!!


tppradeep18
May 24th, 2001, 12:31 AM
I can see Advapi32.dll file in win98. I want to use a particular function called setFileSecurity found only in this Library. But from the documentation I understand that this can be used only under Windows NT. Can somebody tell me how to use it under win98 through VB. I am particularly trying to hide a file...

thanx

Tygur
May 24th, 2001, 12:43 AM
If the documentation says it only works in windows nt, it probably only works in windows nt. I checked it out, though.

Windows NT supports more security features than Windows 9X/ME. That API function uses some of these security features.

You can try using it in other versions of windows, but it probably won't get you anywhere.

Tygur
May 24th, 2001, 12:45 AM
I'm assuming setting the "hidden" attribute isn't enough for you..

Olly
May 24th, 2001, 05:37 AM
you'd need ntfs for that and only nt and win2k got that

tppradeep18
May 24th, 2001, 07:25 AM
Thanks for the suggestions.

I want to know whether it is possible for me to hide a file in win95/98 in such a way that it should not be shown in windows explorer or DOS shell. Simply hidding would still reveal the file in explorer if the option show all files is set in options. I would be greateful for any suggestions in this direction

jim mcnamara
May 24th, 2001, 11:22 AM
You really should not even try to hide the file. You will not succeed in Win 9X. And only partially in NT. If you don't want it deleted, set it read-only, so the user gets a complaint before they delete it.

If the file has secure information in it consider:

Encrypting the file

Storing the data in the Registry

Naming the file something like .EXE so the user will leave it alone, or create a real runnable .exe (one that you will not use) and append the data to the end of the file. You can read/write the data binary, you just need to hardcode the .exe file length in your code so you can seek to that point.

You cannot hide a file or data from a dedicated hacker. Period.

Tygur
May 24th, 2001, 02:36 PM
I suggest that you move the file to some secret location, rename it, and encrypt it. (or at least encode it, so it doesn't look anything like the original)

Your best defense is that whoever you're hiding the file from doesn't know what was done to hide the file. So I suggest that you try to keep the program from indicating how it is hiding the file.

Sure, there are ways around all that, but the idea is to make it hard to find/restore the file, instead of making it impossible.