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
closed account (13bSLyTq)
Hi,

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:
http://codeempire.blogspot.co.uk/2013/11/security-process-injection-hooking.html

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

Good Luck.
Okay,
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?
help?
help?, how will I prevent cacls/icacls from unlocking my ACLS/DACLS protected folder???
closed account (13bSLyTq)
Hi,

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.

GL
Topic archived. No new replies allowed.