Batch Processing simple fuck usb flash drive NTFS permission anti-virus settings

Source: Internet
Author: User

Copyright:
Author: zerosoul (zero soul)
Posting time:
The original post of the blogger moved from the original Blog to Baidu for permanent retention. Indicate the source for reprinting.

 

Autorun. inf's USB flash drive Virus Immune method has long been broken through by the virus. I used to do this immune in my USB drive, but a few days ago I inserted it in the school's primary store, I came back and found that all the original data was missing. I only had 6 different types of USB flash drives and an Autorun. inf (six viruses grab an Autorun. inf), my immune file has long been lost ......

Then, the USB flash drive is formatted as NTFS, And the permissions of the Autorun. inf file are set. It is true that there has been no further poisoning recently. However, we can see that we are discussing this issue on November 8. It seems that the NTFS permission method has been broken through by some viruses ....... I rely on it, it's all like this. How can this USB flash drive still defend against viruses.

Then I briefly read the usage of cacls a few days ago and wrote this thing ..... Simply set the NTFS permission ......
This only means that if we use an account in the Administrators group, the USB flash drive is useless even if the permission is set.
The test passes the following permission Configuration:
1. Only Autorun. inf is rejected by all users.
2. Only Autorun. inf is deleted.
3. Autorun. inf and the entire USB flash drive are rejected by all users.
4. Delete all users for Autorun. inf and the entire USB flash drive.
Sadly, I don't want to do this either. My USB flash drive is also always poisoned, so it's hard to set the NTFS permission. As a result, it is now easy to break through by myself.
Can we only disable automatic running? It's inconvenient to use a CD... 555 ......

The following is the batch processing code (comment removed ):


Title FuckNTFS
Rem Made By zerosoul (zero soul) Blog http://www.zerosoul.cn
For/f "tokens = 3 * delims =," % I in ('wmic Path Win32_LogicalDisk Get Description ^, DeviceID ^, FileSystem/format: csv ^ | findstr/I "move" ') do (
// Find the removable disk
Cacls % I/c/e/p administrators: f // the Administrator has full control over the USB flash drive.
Cacls % I/c/e/p everyone: f // give Everyone full control of Permissions
Cacls % iAutorun. inf/c/e/p administrators: f // grant the Administrator full control permissions on Autorun. inf.
Cacls % iAutorun. inf/c/e/p everyone: f // give Everyone full control of Permissions
% I // enter the USB flash drive directory
Attrib-s-h-r autorun. inf // remove the system, hide, read-only attribute
Ren Autorun. inf AUT0RUN. INF // rename Autorun. inf to AUT0RUN. INF (change the letter "o" to the number "0 ")
Attrib + s + h + r AUT0RUN. INF // Add system, hidden, read-only, and other attributes to AUT0RUN. INF.
)

Related Article

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.