• USB Disk Security – protect your computer from viruses from USB flash drives

    Hello everyone, today I want to tell you a method that protects a flash drive from viruses 100%. Well, about a hundred percent, of course I’m embellishing it, but at 99 percent, you’ll definitely protect it. Will be described as built-in Windows methods, and with the help of third-party, free utilities, in short it will be interesting, especially in light of the latest sensational encryption viruses, because no one wants to be left without their files and photos.

    Flash drive without viruses

    And so our task is for you to have a flash drive without viruses, with its frequent operation and use, different computers and devices. Let's imagine a situation: Petya has a flash drive, or even a portable device with an SSD drive, what a waste of time. Petya has a lot of software on it, a lot of movies and music. He often goes to see his friends, since the evil Roskomnadzor blocked torrents 🙂, and everyone began to exchange information the old fashioned way, thank God that this is only an example 🙂 and all the torrents are plowing, well, Vasya had a virus on his computer, which, due to security of the flash drive, got to Petya, and he brought it home. If he has an antivirus program, okay, he’ll catch it, but if not, he’ll spread it to all his friends, good Petya. But if he had a flash drive that was 100% protected from viruses, then everything would be different; we’ll look at this below.

    Here are examples of errors you may encounter if you have this virus. The first is Editing the registry is prohibited by the System Administrator

    Or Task Manager has been disabled by your administrator

    If you receive such errors, check with your antivirus

    Methods for protecting a flash drive from a virus

    Disabling the autorun inf file

    And so there are viruses that spread from auto startup, due to autorun.inf file. The virus creates it on a flash drive with the necessary parameters. Knowing this information, we will create our own autorun.inf and prohibit it from being changed by blocking access to it, no access, no virus.

    And so you should have a flash drive, insert it into the computer. Open the command line as administrator, I have already described 10 ways to do this, see the link on the left.

    My flash drive has the letter D.

    In 2011, Microsoft disabled auto-start of flash drives by default due to autorun.inf viruses. To prevent this, we will create a fake directory with the same name and give it certain attributes.

    In the window that opens command line enter the lines one by one

    md d:\autorun.inf

    attrib +s +h +r d:\autorun.inf

    The first command creates a folder on drive D, and the second gives it the necessary attributes, for example h, making it hidden.

    This is what it will look like hidden element, when you enable the display of hidden files. If the display is turned off, then you won’t see the folder, but you don’t need it, you do it and forget it.

    All after these simple methods, you protect the flash drive from viruses, auto launches, if you get an error that a file or folder has already been created, then you can view them in the root of your flash drive, before that you turn on the display of hidden files windows, and then them delete and recreate.

    Protecting a flash drive with the Bitdefender USB Immunizer utility

    And so the Bitdefender USB Immunizer utility, from one well-known manufacturer antivirus solutions. The program is completely free and does not require installation, its operating principle is similar to the method described above, it also creates its own autorun.inf file, installs necessary rights and recording of malicious code is monitored. You can download Bitdefender USB Immunizer (http://labs.bitdefender.com/projects/usb-immunizer/overview/), using the link.

    We go to the site and click on the healthy Download button on the right.

    Launch the utility and click i Accept.

    The program will scan your flash drives and display them full list, unprotected flash drives will be red.

    Click on the flash drive you need and the process of protecting it will begin.

    After a couple of seconds, the flash drive will turn green, which will mean it is safe.

    I advise you to go to settings and set automatic protection for all USB devices.

    As you can see, this is also an excellent method of protecting a flash drive from viruses.

    Security with Ninja Pendisk utility

    We continue further research and computer security and we have the next utility on the way, called Ninja Pendisk. The utility is also completely free and does not require installation; from its functionality it can

    • scan a flash drive for viruses
    • auto detection of flash devices
    • diagnoses flash media for protection

    As soon as you run the utility, it automatically protects your flash drive from viruses. You can download Ninja Pendisk from the link www.ninjapendisk.com, go to the website and click Download.

    After launching Ninja Pendisk, you will see a window prompting you to insert a USB flash drive.

    As soon as you insert it, your program will automatically detect it and install the protection, it will take about 3 seconds, and the output will be a secure flash drive.

    By setting the necessary rights

    So if you don’t need a program to protect your flash drive, then there is another method without using it. The point is to set the necessary rights on the usb device. You must have a flash drive formatted in the NTFS file system; it has long been the default in Windows.

    And so open Start > Control Panel > Folder Options

    In Windows 7, you can open My Computer, press ALT, top menu select Tools > Folder Options

    Go to the View tab and uncheck the box, if you want to use the wizard of course public access(recommended). We save everything.

    Now create a Documents folder on your flash drive, for example. Right-click on the flash drive and select properties. Go to the Security tab, delete everyone there except the group everything, then select it and click change. You will be included in the so-called access list or professional ACL. We only set the checkboxes

    • Read and Execute
    • List of folder contents
    • Reading

    remove everything else.

    Click apply, a warning will pop up, click continue.

    Now go to the folder properties, also via right click, security tab. We delete there, as well as everyone except the Everyone group, and check all the boxes for it.

    Now, store all the files in the documents folder and not a single virus will be able to write to your root. When you try to write something down, this error window will pop up at the root of the flash drive.

    The virus simply does not have rights, and in this way the flash drive is protected from auto-start viruses like autorun.inf. You can return everything back using normal formatting.

    Panda USB Vaccine Utility

    If you thought that was all, then you were mistaken, there is more cool program to protect a flash drive called Panda USB Vaccine. Its principle is the same as its predecessors, but there are also advantages, such as disabling flash auto-launch in the system, although this can be done manually, let's download it, you can do this at research.pandasecurity.com. Let's launch, you will be greeted by the installation wizard.

    We agree with the license

    Set the checkboxes as in the picture below

    All Panda USB Vaccine is installed, let's launch it. As you can see, she found the flash drive and on the right there is a Vaccinate USB button

    The protection will begin. After which you will have the Vaccinated status

    To be honest, in my opinion the most best option, this is the use of a method with rights, for groups, and of course, you must have an anti-virus package installed on your system, from any company you like, which will still protect you, since nothing stands still, including viruses

    USB Disk Security - This free application to ensure complete protection against all kinds of malware, distributed via removable USB media. The application works with external hard drives, memory cards, digital cameras, flash drives, as well as with other devices that can be connected via a USB connector. Disk Security is based on special technology search for threats; like an antivirus program, the utility is able to work in hidden mode, only making its existence known only if malware is detected.

    Basically, a personal computer is infected with viruses at the time of use. global network Internet, a little less often this happens during the installation of a dubious or unverified program. An infected file can also enter a PC through the most ordinary flash drive.

    When connecting an infected flash drive to a personal computer, the malicious software penetrates hard drive, and most importantly, this happens so quickly that installed anti-virus programs do not always have time to react in time. Especially for such cases, it is necessary to use programs that can easily cope with this type of threat. Today Disk Security is one of the best programs to protect against infected files distributed via USB drives.

    When viruses are detected, the application, depending on the settings, will delete or block them, thereby preventing them from executing automatic start. In addition, the utility is able to restore the system after it has been infected with malware, clear the hard drive of temporary files, prohibit copying files from the computer’s hard drive, check URL addresses, completely block USB ports, manage startup, force scanning hard disks.

    The program is equipped with a convenient and simple user interface Russian-language interface. The control panel is located on the left side of the working window, consisting of seven main points. The following sections deserve special attention: data protection, scanning and USB shield.

    The last section is responsible for displaying a full report on all detected threats. You also need to take into account that the utility by default performs automatic removal any malicious application. So in order to avoid deleting important documents, it is better to disable this option, for example, after deleting boot file your USB drive will not be able to start. After disabling, Disk Security will act as follows - it will automatically move the infected file to quarantine or simply mark it.

    In addition to tools for automatically checking flash media, the “Scanning” section is equipped with a vaccination function. Vaccination can be done as follows: removable media, and in fact personal computer. In this case, a special file, which prevents some from starting malicious applications. If desired, vaccination can be turned off.

    The “Data Protection” section is able to provide devices with higher protection; for example, you can set a ban on moving data from the computer to a memory card or even block access to the PC through USB port. To close access, you will need to restart the computer, only after this the settings will take effect.

    Key features of USB Disk Security:

    • Perform a more thorough scan external drives. If malware is detected, it is either deleted or quarantined.
    • Availability of resident antivirus scanner, triggered when connecting a new USB media. Without making changes to the settings, infected files will be automatically deleted.
    • If necessary, you can perform complete shutdown automatic launch on PC.
    • When using the utility, you can view the content without the risk of infecting your personal computer.
    • Sites are scanned for infected applications. The following services are used during the scan: Trend Micro, McAfee, VirusTotal, Symantec and Google.
    • Search service linkzb.com provides the opportunity safe use Internet.
    • The application is able to prevent unauthorized USB connection media to PC.
    • Blocking the copying of unauthorized data to USB is done by using the Access Control tool.
    • Using a system for cleaning temporary files, if the virus is located in temporary directories, it will be deleted immediately.
    • You can set a password in the program settings.
    • Full control over applications included in startup.
    • Availability of a built-in system for restoring important directories in the registry that were affected by malware.
    • You can download Disk Security completely free of charge.
    • Works on Windows XP, 7 and 8.
    • In progress automatic check updates.
    • The application does not need to update the virus database, since it does not work like a standard anti-virus program.
    • Due to its small size, the utility can be installed even on a weak personal computer.
    • Seems to be fully compatible with many modern antivirus programs.
    • Using a multilingual interface, a total of 12 languages ​​are available.

    USB Disk Security is a simple and effective program to use to provide complete protection against malware distributed through removable media.

    Surely every computer user has at least once picked up some kind of virus on their flash drive. And, despite the fact that there are both specialized utilities for protecting drives and entire anti-virus complexes, this does not give confidence in absolute protection. Today we will look at a somewhat labor-intensive, but very effective way Protect your flash drive from viruses once and for all.

    Let's make a reservation right away, it is only suitable for flash drives for computers, USB drives for cell phones or digital cameras this method will not protect.

    So, first of all. We have already considered this issue, so let's move on to further actions.

    Create any folder on the flash drive, call it, for example, Files. From now on, we will store all files only in this folder.

    Right click on the flash drive icon in the My Computer window, open the context menu and select Properties - tab Safety. Here we delete all groups and users, leaving only the group All.

    If you receive an error message when trying to delete a group, click the button [Additionally] and uncheck the Inherit from parent object permissions applicable to child objects checkbox, adding them to those explicitly specified in this window.

    If groups All not in the list, create it by pressing a button [Add] and enter it manually.

    An alternative way to add the Everyone group: click the button [Additionally] in the window Choice: Users or Groups and then [Search], in the list we find the item All, select it and click [OK].

    For a user group All configure access rights - in the column Allow check the following boxes:
    - Reading and execution;
    - List of folder contents;
    - Reading.
    Let us remind you again: we perform these settings for a flash drive.

    Now right-click on the folder Files and choose Properties - Security. In the window already familiar to us, we repeat the steps to delete unnecessary groups, if any, and for the group All enable all options in the column Allow.

    This is where all the settings actually end. Let us now consider several points related to the use of a flash drive protected by the described method. As already mentioned, all files and folders must be saved and copied only in the created folder. Neither we nor viruses can write anything to the root of a USB drive. There is one drawback: the Send menu, although active, will not allow us to copy files to a flash drive; instead of the expected result, we will receive an error message:

    However, any other methods of copying files to a protected flash drive will work (for example Select – Copy – Paste). Only, as already noted, it will not be possible to write data to the root of the disk. And in the folder Files you can perform all the usual actions: create other folders and files, copy, delete, rename, etc.

    Viruses, which usually create an autorun.bat file in the root of a USB drive, will no longer be able to write any data to the flash drive after applying the described protection methods. And therefore, our drive will remain completely protected once and for all: we won’t catch the viruses themselves, and we won’t infect the computers of other users.

    Along with cloud services We very often use regular flash cards to store photos and movies. We connect it to other people's computers and laptops, which carries the risk of infection with viruses and other malware. The statistics are inexorable: every 10th computer is a direct threat. The question arises: how to protect a flash drive from viruses without reducing the comfort of its use?

    Standard Windows Methods

    Most often, a USB drive is infected through a file autorun.inf. This file serves a very specific purpose: automatically launching or installing applications from a flash card to a computer. It is hidden, but is present on any flash drive. As in other areas of life, early protection and prevention are better than time-consuming treatment that does not guarantee a 100% positive result. Therefore, the main task is to make the autorun.inf file invulnerable to attempts to infect it.

    It is extremely important: the methods described below will protect the media from malware that uses USB flash as a means of spreading itself (it is they who seek to overwrite the mentioned file in their own way). Viruses, Trojans and other troubles in program installers will not go away: use antiviruses to detect them.

    Disabling startup

    This is a method of protecting the computer itself from a possibly already infected flash drive, both yours and someone else’s. The easiest way to do this is to follow the steps below. For Windows 7:

    • Press key combination Win+R.
    • In the “Run” window that opens, enter gpedit.msc and click on OK.

    • Click on "Allow" when a message appears asking you to perform an action as an administrator. You may also be required to enter an administrator password.
    • In the local editor window that appears group policy Expand the “Computer Configuration” list, and then “Administrative Templates”.
    • Select "All parameters".

    • In the list that opens on the right, right-click on the line “Disable autorun”.

    • Click “Change”, make the “Enable” item active, the value “All devices” should be set below.

    • Click "Apply".

    Please note: in some Windows versions(8.8.1) the sequence in steps 4-6 may be slightly different and look like this: “Computer Configuration” – “Administrative Templates” – “ Windows components» – “Autorun Policies” – “Disable Autorun”.

    A reboot may be required for the changes to take effect. That's all - now any flash drives connected to the computer will not run on it automatically and will not cause harm without user intervention.

    Autorun file protection

    Now there is a way to protect the flash drive itself from malware spread using physical media information. We are talking about the same autorun.inf.

    In the good old days, it was enough to create an empty write-protected file on a USB drive. That is, with read-only rights. Today such measures are not enough. But the essence of the actions is similar. On a flash drive, verified good antivirus, making sure that there are no dangers, create a special file. Open a regular notepad and copy these lines into it:

    attrib -S -H -R -A autorun.*
    del autorun.*
    attrib -S -H -R -A recycler
    rd "\\?\%~d0\recycler\" /s /q
    attrib -S -H -R -A recycled
    rd "\\?\%~d0\recycled\" /s /q
    mkdir "\\?\%~d0\AUTORUN.INF\LPT3″
    attrib +S +H +R +A %~d0\AUTORUN.INF /s /d
    mkdir "\\?\%~d0\RECYCLED\LPT3″
    attrib +S +H +R +A %~d0\RECYCLED /s /d
    mkdir "\\?\%~d0\RECYCLER\LPT3″
    attrib +S +H +R +A %~d0\RECYCLER /s /dattrib -s -h -r autorun.*
    del autorun.*
    mkdir %~d0AUTORUN.INF
    mkdir "?%~d0AUTORUN.INF..."
    attrib +s +h %~d0AUTORUN.INF

    Save the result to a flash drive, naming the file locker.bat. After the dot there is an extension, it is extremely important and should look exactly like this .bat. Open the USB flash drive through Explorer and run fresh download this file IR normal double click mice. It will run as a small program and create a secure folder called AUTORUN.INF.

    What does this give? By inserting USB Flash Drive into an infected computer, you don’t have to be afraid of the viruses on it that spread via USB. Such a virus will rush to overwrite the autorun.inf file, but it’s not there! Instead, a folder, and one that is protected.

    It is also important: viruses can write themselves to other places on a flash drive by changing other files. Therefore, when inserting it into your computer, check it with an antivirus before opening it.

    Radical way

    If you have to connect a flash drive to someone else's computer, but only to download files from it, the option of switching the file system to read-only mode is suitable. This is an effective, but, in most cases, inconvenient method that makes the “send to” option inoperative. removable disk"and similar operations.

    In order to apply this method you must:

    • Format the USB drive to the NTFS file system. Please note: all data from the flash drive will be deleted! If the flash drive is already in NTFS, skip this step.

    • Write down all the necessary data and put them in one folder.
    • Open the properties of the flash drive (right-click) and in the “Security” tab, click on the “Change” button.

    • In the “Allow” column, uncheck all the boxes except for the “List folder contents” and “Reading” items.
      Click "OK".

    Now no virus can be registered on a flash drive.

    Using third party programs

    You can also protect your USB drive from malware using programs specially created for this purpose. For example, Panda USB Vaccine. This free utility designed specifically to protect removable media.

    After downloading and launching it, connect the flash drive you want to protect to your computer. Follow 2 simple steps:

    1. In the drop-down menu, install the desired USB drive;
    2. Click on the Vaccinate USB button.

    That's all! The flash drive is protected from overwriting the autorun file. Essentially, the program simply disables autorun, but does this by pressing a couple of buttons in a convenient interface.

    Conclusion

    Unfortunately, you will not be able to 100% protect your flash drive from viruses. The measures described in the article only prevent malware from automatically penetrating first onto a USB drive and then onto your PC. Always keep your antivirus up to date and scan flash drives before opening them in Explorer.

    How do viruses spread through flash drives work?

    Since a flash drive is a universal storage medium, absolutely any files can be stored on it, including those that are dangerous. First of all, the main danger is posed by viruses that can launch automatically the moment the media is connected to the computer.

    For these purposes, a special file autorun.inf is created. By itself, it does not cause any harm and its main purpose is to automatically launch applications when reading any device on which it is located. You connect a flash drive and if this autorun file is located on it, the computer, following the instructions in it, launches the desired program.

    Often viruses do not pose any danger until they are launched. This is why such a dangerous space is used with the autorun file. You connect the infected flash drive and the virus starts, happily infecting the system. And you don’t even need to launch it specifically.

    To protect against such malicious programs, use special utilities, and also, do not forget about correct settings systems that can significantly improve safety when working with removable media.

    Disabling autorun

    Since the majority dangerous programs use autorun, then disable this function we deactivate most of them.

    Open the Start menu and right-click on the “Computer” section. IN context menu you need to select “Management” (done on behalf of the Administrator).

    On the left side of the new window, select the “Services” section. And on the right, among the list of services, we find “Shell hardware detection”. Now right-click on this service and click on “Properties”.

    In the properties window, opposite the “Startup type” item, select Disabled. After that, click on Stop and apply the settings you made. In order for the changes to take effect, you must restart the computer.

    This method is very effective, although it also has a disadvantage. For example, if you launch a disc with a game (program, movie), the installation will not start automatically. To start, you will have to open the disk itself, look for the startup file, and only then perform the installation. On the one hand, this is not such a big difficulty, because the system will be much more secure this way, on the other hand, you will have to do a lot of unnecessary steps if you often install software from disks.

    Create your own autorun.inf

    I think that many people know that it is impossible to create two files with the same name in the same folder. We will take advantage of this! If you create your own autorun.inf file and set it to read-only, you can prevent someone else's autorun file from getting onto the flash drive. This method good, but not as effective as the previous one. Many viruses have learned to delete this file and create their own, which is no longer encouraging.

    But don’t give up if the flash drive has a file FAT system, it is possible to create a folder called autorun.inf, which cannot be deleted.

    For this we create a special bat file. To do this, open Notepad (in the Start menu → All Programs → Accessories) and click save as. Save this file to a convenient place, specifying the .bat extension for it and then copy the following program code into the same file:

    attrib -s -h -r autorun.*

    "\\?\%~d0\autorun.inf\name..\"

    attrib +s +h %~d0\autorun.inf

    Save the file and make a copy of it to a flash drive. Run it there, on the flash drive. After this, a folder named Autorun.inf will appear, which cannot be deleted.

    Of course, this method can protect against infection only from your flash drive, but there is still a danger of infection from any other. Also, this will not work if the flash drive is file system NTFS. Typically, such flash drives have a capacity of more than four gigabytes.

    Software protection of flash drives from viruses

    Standard antivirus

    This good remedy to protect your computer from these types of viruses. It should be on every PC. Most antivirus programs automatically scan each piece of media as soon as it is connected to your computer. If anything is detected, the antivirus will instantly intercept malicious file and will remove it, and in some cases even cure it. To choose a good one antivirus program use the antivirus rating.

    USB Disk Security

    A good program that will protect your computer from any threat coming from devices connected via USB (flash drive, external drive etc.). It's a good idea to use it together with your main antivirus.

    Panda USB Vaccine

    Not bad either utility program, which will help protect your computer from threats located on flash media. It allows you to automatically carry out all the actions described above: disable autorun and create a non-deletable autorun.inf. Which actually protects the computer from Trojan programs getting onto it.