Is it possible to create a file that cannot be cop

2020-08-14 02:18发布

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.

标签: windows
13条回答
ら.Afraid
2楼-- · 2020-08-14 02:44

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.

查看更多
三岁会撩人
3楼-- · 2020-08-14 02:45

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.

查看更多
【Aperson】
4楼-- · 2020-08-14 02:47

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 ;)

查看更多
姐就是有狂的资本
5楼-- · 2020-08-14 02:55

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...

查看更多
Explosion°爆炸
6楼-- · 2020-08-14 02:59

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

查看更多
我欲成王,谁敢阻挡
7楼-- · 2020-08-14 02:59

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

查看更多
登录 后发表回答