Use NTFS permission settings to prevent USB flash drives from being poisoned

Source: Internet
Author: User

The USB flash drive virus has become a very serious problem, not to mention how many people cannot identify the virus, even people like me who can identify the USB flash drive virus try again and again to delete the virus and restore the folder properties without patience, so they thought of a permanent solution.
To take care of students who do not quite understand this aspect, let's first explain what the current USB flash drive virus often does.
First, the virus hides the folder under the root directory of the USB flash drive, and then generates an EXE file with the same name. the icon is the folder icon. For example, if there is a folder named "Learning" in the root directory of the USB flash drive, the virus will hide it and generate a "Learning" folder. EXE "executable file, the icon is the same as the default Windows folder icon. This fact can be clearly seen on a computer with "Show Hidden Files" and "show extensions of known types of files" enabled. If you can't see it, it doesn't matter. Check the properties. The properties of folders and files are different. Do not click it at will. Otherwise, the virus will run once.
Then, most viruses Write autorun. inf in the root directory. This file is used to automatically run the virus. For details about the mechanism, see search. With this file, "open" and "Resource Manager" in the right-click USB flash drive are no longer secure, because it may be a way to run viruses. Let's say a few more to prevent Autorun. INF works in many ways. The first is software, 360 security guard, USB cleaner, and many other anti-virus software. The second is to access the USB flash disk from other places, for example, right-click the Start menu to enter the resource manager, press win + e to enter the resource manager, or enter a USB flash drive such as "I:" in the address bar :", or enter the USB flash drive letter in cmd and then enter "start. and so on. Do not double-click the USB flash drive icon or right-click it.
After explaining the virus mechanism, you can take the right remedy. The key step is to prevent the virus from writing files into the USB flash drive. If you just use it on your own computer, it will be very simple. n more software can make windows read-only and do not write, but the USB flash drive is often inserted into others' computers, this article will discuss how to prohibit writing on others' computers.
If your USB flash drive or card reader has a write protection switch, you don't need to read it down, because if you enable write protection, the USB flash drive won't be able to write any files, and of course it won't be poisoned.
How can I operate a USB flash drive without write protection? I have come up with several ideas. First, let the USB flash disk be recognized as a CD in windows and read-only without writing. This method can be implemented, but after implementation, the operations on the files in the USB flash disk will become very troublesome, second, use the encryption software to change the USB flash drive to a non-Windows read/write mode. I didn't try it. I don't know if there is any such software. Third, I will fill up the remaining space of the USB flash drive, it is unrealistic to leave no space for viruses, but it is not very convenient to generate a placeholder file first. Secondly, it is inconvenient for you to operate the file and may cause program exceptions, third, it cannot ensure that small files cannot be written.
Finally, we can only think of the NTFS permission method. I finally succeeded in the experiment one afternoon and shared it with you.
First, you need to format the USB flash drive into the NTFS format. Of course, there is not much to say about backing up your files. We can find that NTFS is not in the format when we right-click the U disk icon to format it! There are several solutions to this problem on the Internet, one is to use software, not to try, the other is to change the settings, the test is successful. Enable the properties of the USB flash drive, hardware, and select the USB flash drive (if you do not know which one is the USB flash drive, you can write it down, and then remove the USB flash drive to see which one is missing, change to "optimize to improve performance" and then format NTFS. We recommend that you do not enable compression because it is slow to copy files.
Step 2: Set permissions, right-click the USB flash drive icon, Set Properties and security, delete all users, and then add common users to your computer, that is, when you log on to the system and enter the password, if you do not know, right-click my computer, manage, local users and groups, and check which one is. Grant all permissions to this user. Add another Everyone user, who does not grant write or modify permissions, but read permissions.
Here, our main work has basically been completed. Try another computer. How can we avoid writing any files?
Well. Anti-virus protection, but apart from our own computers, we can't copy files elsewhere. What should we do with a USB flash drive? The next step is to copy files from another computer.
In fact, I thought for a long time. Later I found that there was no essential difference between virus writing and copying files, but the locations were different. So we had to open a folder to copy files.
Insert the USB flash drive back to your computer and create a new folder to copy files later. Then, set the permission for this folder. The method is the same as the previous one. Open the properties of this folder to ensure security. Click "advanced" directly. There are two options below. The first one is removed to make the folder and root directory have different permissions. Then modify the permissions of everyone. Change "apply to" to "only this folder" and add some write permissions. do not grant permissions such as "Write attribute" and "write extended attribute, otherwise it will be hidden by viruses. This step is to modify the permissions of the folder itself. After confirming, add another permission. the user name is everyone and applies it to "only subfolders and files". You can grant all permissions, except for the last permission change and owner acquisition, of course, there are all the top permissions. This step sets the permissions for the files in this folder. You can also modify the file. For example, if you do not want to delete the file, the file in the folder can only be written and cannot be deleted.
Okay. After the settings are complete, your USB flash drive will be completely anti-virus. When you want to copy a copy, copy it to the specified folder. A little uncomfortable is that you cannot directly use the "send" function to write data to a USB flash drive.

Note: The text in all the menus in this article is written according to Windows XP. If it is a later version of the system, you can do it by yourself. The methods are similar. In addition, the USB flash drive made in this way cannot be read under Win98 and win me, but I believe this system is useless in this era. In addition, UBUNTU supports NTFS mounting, So theoretically it can be read in Ubuntu, and the permission is unclear. This has not been tested in detail. Other Linux systems have not been tested.

 

 

 

 

 

Write a batch file:

 

 

Download and decompress the package to obtain two files. Run "USB flash drive antivirus. Bat" and follow the prompts.
Some steps take a long time. Please wait. We do not recommend using mobile phone cards, MP3, MP4, and other products because data may not be readable.
Final result: the local user name can read and write normally. On other machines, only the specified directory is writable, and other directories are read-only.
There is a little difference from the effect achieved in the article: The specified folder can be deleted, and the subfolders under the specified folder cannot be changed.

In addition, there are several supplements:
1. This is completely boring in my spare time. You can freely modify and spread it, but I am not responsible for the possible consequences.
2. Remind me again that we do not recommend using mobile phone cards, MP3, MP4, and other products.
3. If conversion to NTFS fails, the disk may be faulty. Check the disk first.
4. if you copy the virus to a writable directory, I cannot help you.
5. You cannot use "send" to directly copy files to the USB flash drive.
6. If the system is reinstalled, the USB flash drive won't be able to read and write freely on its own machine. It is best to format it. If you know how to set permissions, you can now grant everyone the "get ownership" permission, so that you can re-obtain the read and write permissions without formatting.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.