-4

The project is a security program that locks files and folders using Java
I have two ideas:

First: Hiding the file or folder in Windows Kernel level
I cannot find a way to do this at this moment.
How can I do this? Are there any helpful tips?

Another solution: Create a new extension Windows cannot read and close it with a password.
Transformed the desired file to zip file and then read it as bytes and stored in a file with the new extension I have created. Here are two problems: Reading the bytes takes a long time and if the file size is large (larger than 200 MB) it produces an error as the runtime memory is full.

How do you solve these problems?
Are there ways to protect files and folders except those two methods??

*If anything is not clear ask me please.

thanks for help

André Stannek
  • 7,773
  • 31
  • 52
  • 2
    Can you clarify what you are trying to protect against? E.g. are you trying to prevent access by other local users, or by external users on a network, or against data theft...? – DNA Oct 31 '12 at 13:00
  • i try to prevent access by other local users – yaser haroun Oct 31 '12 at 13:04
  • 1
    As for your second solution: Why don't you use an existing problem to create password protected archive files? There are already a lot of them out there. You could also use a [TrueCrypt](http://www.truecrypt.org/) container. I think even Windows itself provides an access right system that can be used to make files accessible only to certain users. – André Stannek Oct 31 '12 at 13:11
  • if you know folderlock program i want to make app Almost to the same purpose – yaser haroun Oct 31 '12 at 13:18
  • If your only problem with Folderlock is that it is not free, use TrueCrypt. It does basically the same. – André Stannek Oct 31 '12 at 13:21

1 Answers1

0

The only reliable way to "hide" files is to move them away from the disk. For example, you can put them to the container file (with a virtual storage inside) where files and file metadata (directory entries etc.) are encrypted. Then you need to have a kernel-mode driver which exposes container contents as a virtual disk. This is what TrueCrypt does.

There exist another approach - files are both encrypted and "hidden" by the filesystem filter driver. When the driver is not running, files are visible (maybe with obfuscated filenames) but encrypted. When the driver is running, it decides which files and how to expose.

In both cases you need a kernel-mode driver which can not be written in Java (neither in Windows nor in other operating systems). Our company offers several libraries which can be used in your application (but no Java API, sorry).

Eugene Mayevski 'Callback
  • 45,135
  • 8
  • 71
  • 121