Tutorial :Is it possible to create a file that cannot be copied?



Question:

To restrict the scope, let assume we are in Windows world only.

Also assume we don't want to play with permission policy.

Is it possible for us to create a file that cannot be copied?

Thank you in advance.


Solution:1

No. You can't create a file that a SYSADMIN can't copy. You could encrypt it, though.


Solution:2

"Trying to make digital files uncopyable is like trying to make water not wet." ~ Bruce Schneier


Solution:3

Well, how about creating a file that uses up more than 50% of the total space on that machine and that is not compressible? For instance, let us assume that you want to save a boolean (true or false) in such a fashion. Depending on its value, you could then write a bit stream of ones or zeroes and encrypt said stream using some kind of encryption algorith, such as AES in CBC mode. This gives you the added advantage of error correction. Even in case of massive data corruption, you should be able to recover your boolean by checking whether ones or zeroes are prevalent in the decrypted stream. In that case you cannot copy it around (completely) on the machine... Of course, any type of external memory that can be added to the system would pose a problem in this scenario. But the file would be already encrypted, so don't worry about it too much...


Solution:4

Any file that can be read can have its contents written to another location (such as another file, i.e. copied).

The only thing you can do is limit who/what can read the file.


Solution:5

What is the motivation behind? If it is a read-only file, you can have it as embedded resources within your assembly.


Solution:6

Nice try, RIAA.

But seriously, no you can not. It is always possible to copy, you can just make it it more difficult for people to make sense of the file or try to hide it using like encryption. Spotify does it.

If you really try hard thou, you cold make a root-kit for windows and use it to prevent windows from even knowing about the file and also prevent copies. The file will still be there and copy-able by other tools, or Linux accessing the ntfs.


Solution:7

If in a running process you open a file and hold an exclusive lock, then other processes cannot read the file until you close the handle or your process terminates. However, as admin you could forcibly remove the lock handle.


Solution:8

Short answer: No.

You can, of course, use security settings to limit who can read the file. But if someone can read it, then they can copy it. Even if you found some operating system trick to disable "ordinary" copying, if someone can read the file, they can extract the contents, store it in memory, and then write it somewhere else.

You can encrypt the contents so it's only useful to your own program, that knows how to decrypt it.

That's about it.


Solution:9

When using Windows 7 to copy some files from a hard drive, certain files popped up a message saying they could not be copied in their entirety; certain data would be omitted from the copy. I suspect that had something to do with slack space at the end of the files, though I thought the message was curious. I would have expected the copy operation to just ignore the slack space.


Solution:10

If you are running old (OLD) versions of windows, there are certain characters you can put in the filename that make it invalid, not listed in folders, etc. They were used a lot in the old pub ftp days of filesharing ;)


Solution:11

In the old DOS days, you used to be able to flag disk sectors as bad and still read from them. This meant the OS ignored the sector in question but your application would know where to look and be able to get the data. Not sure this would work these days.

Another old MS-DOS trick was to put a space character in the middle of the filename (yes, spaces were valid characters for filenames). Since there was no method on the command line to escape a space, the file couldn't be copied using the DOS commands.


Solution:12

This answer is outside Windows so yeah

Dont know if its already been said but what about a file that is an inseperable part of the firmware so that it is always on AND running, perhaps it has firmware that generates a sequence that is required for the other . AN incedental effect of its running is to prevent any 80% or more of its code from being replicated. Lets say its on an entirely different board, protected by surge protectors, heavy em proof shielding and anything else required to make it completely unerasable.
If its possible to make a program that is ALWAYS on and running as long as the copying software is running then yes.

I have another way and this IS with windows. I will come to your house and give you a disk, i will then proceed to destroy every single computer you put the disk into. This doesnt work on XP


Solution:13

Well technically you could create and write to a write-only network share.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »