How will you lock a folder using c++ without ACLS/DACLS?

Hi all,
How will you lock a folder using c++ without ACLS/DACLS?
You know programs like Folder lock, they dont change acls or dacls...
When I tried to unlock one folder using CACLS.EXE i wasnt able...
I also did Icacls...
They have some other way?
can you tell me?
Windows supports file encryption, this program probably calls that with a different key encryption driver.
Last edited on

As computergeek01 said use encryption drivers, however you could block NtOpenFile via placing a hook. Then injecting the code System-Wide.

Additionally, you could either compress the file then place a password nevertheless ACL\DACL's are only really secure way of ensuring the folder is safely locked away.
Look at my blog for Security: Process Injection via Hooking:

This has information about how to place a hook on other processes. This could come useful with this project.

Good Luck.
I made a folder lock program...
that uses ACLS/DACLS to lock and unlock...
I found out that it can be unlocked with cacls/icacls...
How will i prevent users from doing that?
Please help:(
Still, no reply?
help?, how will I prevent cacls/icacls from unlocking my ACLS/DACLS protected folder???

If you are making it hack-proof to a certain extenet, I suggest you brush up on Device Driver programming and hook ZwOpenFile, ZwQueryDirectoryFile, ZwDeleteFile, ZwWriteFile, ZwReadFile

Hook these, and you are ultimately guaranteed *ALMOST* hack-proof program. These are the only real methods available to ensure the protected folder is not somehow accessed.

Topic archived. No new replies allowed.