How to set up smartphones and PCs. Informational portal
  • home
  • Tips
  • An easy way to protect your flash drive from viruses. How to protect a flash drive from viruses? Helpful Hints

An easy way to protect your flash drive from viruses. How to protect a flash drive from viruses? Helpful Hints

It often happens that with regular use of a flash drive or other portable drive, we put our computer at risk.
This is especially dangerous when someone else's USB device is connected, the contents of which we can only guess. Thus, the probability of infecting your PC with viruses is very high.

USB Disk Security (Russian version) is an excellent software solution that can automatically check flash drive for viruses immediately after connecting it to the computer. The occupied amount of RAM is so small that you can use the utility on low-power PCs and laptops.

The program is fully compatible with most antiviruses, such as DrWeb, Kaspersky, Nod32, so there will be no software failures or system conflicts, and installation will take a matter of seconds, because the size of this software is small.

The main objective of the USB Disk Security utility is maximum online protection against most types of viruses and computer threats that are distributed through USB drives, memory cards, portable hard drives and other external USB devices.

Now, you can check your computer for viruses online (when a flash drive is connected) without user intervention - everything happens automatically.

Attention: USB Disk Security is not a full-fledged antivirus, but only complements its functions in relation to external drives and is activated when they are connected to a computer. In other words, to achieve reliable protection against hacking and infection of the system, you need to have a fully functioning antivirus with up-to-date databases and support for the firewall (firewall) function. Only in this case, you can be sure of the relative security of your computer from viruses and other potentially unwanted software.


The highlight in Russian can be called her ability to check your computer for viruses online for free - the developers have created a special module that allows you to check suspicious sites for malware. In addition, the program allows you to adjust the list of startup applications and clean up memory from garbage. All this adds up to this wonderful and free utility. You can download the program for free from the official website, or you can follow the link below (we have already done this for you).

All malicious files that intend to enter the user's computer will be isolated and cured of the virus.

Checking the flash drive for viruses is required, but if it's inconvenient to do it manually, we recommend installing the USB Security Disk!

The most common cause of PC infection occurs due to an outdated anti-virus database, which has no information about new threats. USB DISK SECURITY has its own unique algorithm for detecting malicious sections of code, allowing you to respond online to security threats.

Along with cloud services, we very often use ordinary 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 relentless: every 10th computer is a direct threat. The question arises: how to protect a flash drive from viruses without compromising the comfort of using it?

Standard Windows Methods

Most often, infection of a USB drive occurs through a file autorun.inf. This file serves a very specific purpose: automatically launching or installing applications from a flash drive to a computer. It is hidden, but present on any flash drive. As in other areas of life, early protection and prevention is 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 the USB-flash as a means of distributing itself (they are the ones who seek to overwrite the mentioned file in their own way). Viruses, trojans and other troubles in program installers will not go anywhere: use antiviruses to detect them.

Disabling autoload

This is a method of protecting the computer itself from a possibly already infected flash drive, both from yours and from 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 prompting you to take action as an administrator appears. You may also need to enter an administrator password.
  • In the Local Group Policy Editor window that appears, expand the "Computer Configuration" list, and then "Administrative Templates".
  • Select "All Settings".

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

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

  • Click "Apply".

Please note: in some versions of Windows (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" - "Turn off 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 start automatically on it and will not cause harm without user intervention.

Autorun file protection

Now a way to protect the flash drive itself from malware that spreads using physical storage media. 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 action is similar. On a flash drive checked by a good antivirus, making sure that there are no dangers, create a special file. Open notepad and copy these lines into it:

attrib -S -H -R -A autorun.*
delautorun.*
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.*
delautorun.*
mkdir %~d0AUTORUN.INF
mkdir "?%~d0AUTORUN.INF..."
attrib +s +h %~d0AUTORUN.INF

Save the result to a USB flash drive, naming the file locker.bat. After the dot - the extension, it is extremely important and should look exactly like .bat. Open the flash drive through the explorer and run the newly created file with the usual double click of the mouse. It will run as a small program and create a protected folder called AUTORUN.INF.

What does it give? By inserting a USB Flash Drive into an infected computer, you can not be afraid of the viruses present on it that spread via USB. Such a virus will rush to overwrite the autorun.inf file, but it does not exist! Instead, a folder, and even under protection.

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

radical way

If you have to connect a USB flash drive to someone else's computer, but only to drop 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 way, making the “send to removable disk” option and similar operations inoperative.

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, 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 checkboxes except for the "List folder contents" and "Read" items.
    Press OK.

Now not a single virus will be able to register on the flash drive.

Using Third Party Programs

You can also protect a USB drive from malware with the help of programs specially created for this. For example, Panda USB Vaccine. This free utility is designed specifically to protect removable media.

After downloading and running it, connect the USB flash drive you want to protect to your computer. Take 2 easy steps:

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

And that's it! The flash drive is protected from overwriting the autorun file. In fact, the program simply disables autorun, but does it by pressing a couple of buttons in a user-friendly 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 to a USB drive, and then to your PC. Always keep your antivirus up to date and scan flash drives before opening them in File Explorer.

In this article, you will learn how to protect your flash drive from all kinds of viruses and malware. Let's choose a reliable tool to protect the flash drive from viruses and cure the infected usb flash drive, using effective antiviruses for this.

The first signs of infection with viruses. What is dangerous autorun

On flash devices, unlike CD and DVD, you can perform any file operations, up to formatting. So, the virus is copied to the flash drive. The first sign of this is the autorun.inf file that appeared in the root of the disk.

As soon as you insert the media into the USB connector, the autorun mechanism is triggered. By double clicking on the flash drive icon in Explorer, the application starts, the path to which was specified in autorun.inf. The virus is loaded into RAM and copies files to the system area of ​​the disk. It is most often impossible to calculate a program in the task manager processes, since viruses disguise themselves as important processes: services.exe, lsass.exe, etc., without which the OS cannot work in principle.

Infection occurs instantly and is invisible to the user. Take, for example, the actions of the Trojan-Downloader.Win32.VB.hkq virus. It makes all folders on the flash device hidden and replaces them with executable files of the same name. If the file extension is disabled in Explorer, it is impossible to distinguish a file from a directory with the naked eye, because exe files are assigned icons with images of Windows folders.

When searching for traces of virus activity on your own, first of all, you need to enable the display of hidden files. To do this, go to Windows Explorer and in the menu Tools -> Folder Options, in the “View” tab, in the advanced options, check the box “Show hidden files and folders”.

If after that you see the autorun.inf file in the root of the disk, then this is a sure indication that your flash drive is infected. In addition, folders and files with names that you obviously did not create are written to the disk. Which files need to be deleted without fail:

  • autorun.* files, where * is any file extension;
  • unknown files with extensions .inf .com .sys .tmp .exe;
  • RECYCLER or RECYCLED folders.

Advice: if you want to erase an infected file from a flash drive, but it cannot be deleted in any way, use the Unlocker program.

It is not a fact that this method will help you cope with the task, but you may be “very lucky” and the virus will not recover.

Be careful: you can fearlessly delete only those files that are of no importance to you. At the same time, we do not recommend copying data to your computer, because subfolders may contain infected data. Make sure that there are no files with an incomprehensible extension in the folders, as a virus can replace folders with executable files and hide them from your eyes. In Explorer, you need to set the display of file extensions: menu Tools -\u003e Folder Options, tab “View”, in the additional parameters, uncheck the box “Hide extensions for known file types”.

There may be a problem with file attributes, namely: hidden files are not displayed, even if you enable their display. This is another trick of viruses. Open the Registry Reactor and in the CheckedValue branch key, change the value "0" to "1".

For reliability, the flash drive can be formatted. However, there will be no benefit from this: delete / do not delete, and the next time you insert the flash drive, the virus, like the Phoenix, will be reborn.

There is one way to protect the media from certain autorun viruses. It is quite simple and, according to user reviews on software forums, allows you to forget about this problem altogether (but this is a false argument). On the flash drive, you need to create a folder (namely a folder!) autorun.inf. In this case, the operating system, theoretically, will not allow any process to create a file with the same name. But there are smarter viruses that bypass this type of protection by deleting the directory and overwriting the autorun file instead. Therefore, the described method, alas, is useless, because it does not completely insure against the penetration of viruses on a USB flash drive ...

As you can see, we have listed several tips, but each of them individually is unsuccessful. In general, the mechanism for searching for viruses is rather complicated, and manual removal and protection is sometimes a routine and unsuccessful task. In addition, if you are not an experienced user, you run the risk of deleting "something is wrong." Erroneously deleting an important system file or registry key can be disastrous. But - you should be happy! It is not necessary to remove viruses manually. There are programs much more effective than our activities.

Choosing a reliable antivirus for a flash drive

Avast Free

1. - free antivirus with updated virus databases. Able to scan removable devices for viruses). The virus scan is done automatically. As soon as a virus tries to start from a flash drive, Avast Free antivirus detects the threat and blocks it. However, before opening a USB drive, we advise you not to use autorun and check the USB drive for viruses by pointing it to an antivirus.

Dr Cureit

Another great antivirus for a flash drive. It is convenient for one-time scanning of removable media, hard drive, memory areas for viruses. It is recommended to download the latest version of Dr Cureit with each scan, as it contains the necessary anti-virus databases. That is, this is quite a good option for protecting a flash drive.

USB Disk Security - antivirus on a USB flash drive

Developer: Zbshareware Lab.
License: shareware
Short description: a program to protect a USB flash drive from viruses and prevent malware from running

Practice shows that not every antivirus - even with updated databases - is able to detect potential danger in automatically launched applications. Now the number of infected flash key fobs has increased dramatically. This proves that there is still a need for a program that will protect your computer from malware.

After installation, the program offers to disable autorun - as a potential danger to the computer. In fact, it is: any application or action can be disguised as Autorun (even "Open in Explorer").

USB Disk Security is a kind of antivirus for a flash drive. Protection works as follows. If a program is found on the flash drive that is trying to start, the user will be informed about this. The information will be displayed in the corresponding section, and an attempt to launch the application will be stopped. The hazardous element can be removed immediately.

Among other things, we note the option "Memory protection". It refers to monitoring, which monitors potential pests that are in RAM. They can also be easily downloaded. The "System" section contains the tools "Registry Cleanup" (restoring settings) and "Disk Cleanup" (deleting temporary Internet Explorer files from the cache).

Despite the fact that USB Disk Security is less than 4 megabytes, its anti-virus effectiveness is not in doubt. Although checking a flash drive for viruses with its help is not possible, Disk Security will perfectly complement any antivirus program. If you are constantly working with removable media, the application should always be in the tray.

Panda USB Vaccine

One of the auxiliary programs for protecting a flash drive from viruses is Panda USB Vaccine. It is recognized as one of the most effective of its kind. The essence of the method is that the program writes “its own” autorun.inf to the flash drive, which can no longer be rewritten by viruses, no matter how hard they try to infect the media.

Panda Research USB Vaccine is a popular USB flash drive antivirus

Let's take a look at the program in action. You do not need to install it, just agree to the terms of the license. After launch, a window appears prompting you to select a device for processing. As a rule, you do not need to select anything if you are currently working with only one removable media. Just in case, making sure that the drive letter is correct, click Vaccinate USB - and you're done, the virus protection of the flash drive is enabled. You can forget about infection via autorun.

The Panda USB Vaccine program has one drawback: the program only works with devices formatted in the FAT and FAT32 file system.
Advice. You can transfer from one file system to another using the operating system as follows: Start - Run, "convert x: / FS: NTFS", where "x" is the letter of the removable media.

Similar functions for modifying autorun.inf are provided by programs Flash Disinfector and USB Disk Security. The first one creates an AUTORUN .INF folder in the root of the disk with a file that cannot be deleted in a simple way. The second creates an autorun.inf folder with a modified path, which confuses any virus. Thus, both programs protect the flash drive from writing viruses to it.
Another useful and small anti-virus program worth mentioning is Autostop.

Protecting a flash drive from writing new files and viruses

This utility (script) has 3 functions in stock:

  1. Disabling autorun on the computer,
  2. Flash drive protection from autorun viruses,
  3. Protection against writing new files to the flash drive.

Working with the program is incredibly simple. Run the script and see the list of functions. Then press one of three keys: 1, 2 or 3. You can press them in order to turn on all the options at once.

Separately, they should talk about function number 3. Why protect the key fob from writing if there are commands 1 and 2? And how to work with a flash drive if its main function is, in fact, curtailed? Everything is explained simply. In special cases, a flash drive is used as a boot drive. If , then she will not be able to fulfill her duties. In this case, function number 2 will come in handy. In this case, all the free space of the flash drive will be filled, which will prevent it from arbitrary writing files.

Antivirus Flash Guard

Flash Guard is another antivirus designed to be installed on a flash drive. The program divides computer devices into removable, non-removable, network and others. Flash Guard allows you to flexibly configure autorun. So, in the settings you can enable / disable autorun in general or configure actions when media is inserted in particular:

  • Removing items added by the Autorun.inf file in the disk context menu
  • Informing the user about the presence of the Autorun.inf file on the disk
  • Removing the Autorun.inf File
  • Deleting all Autorun.* files

Flash Guard runs almost invisibly, minimizing to the Windows notification area.

USB program

Let's mention the "smallest" - the USB program (http://sputnik70.narod.ru/usb.html). Even in a modest 10 Kb of code, as it turned out, you can fit the most necessary things to fight viruses. Again, the program is designed to keep track of autorun.inf files. USB is in RAM and when new drives are connected, it automatically renames the autorun.inf files on the flash drive to autorun.inf_renamed. As a result, "the probability of infecting a computer with viruses that spread through flash drives is significantly reduced" - as the manual says.

How to check a flash drive for viruses online

By the way, the aforementioned anti-virus complexes (Kaspersky and), through the official website, also offer to check the flash drive for viruses online. The convenience of online checking is that you do not need to install resource-intensive antiviruses on your computer. In addition, this service is free.

As practice has shown, updating the antivirus does not hurt. Developers are on the alert, and the most common flash drive autorun pests are already in the database. With a high degree of probability, they can even be found and eliminated. However, antivirus is not a panacea for all ills.

In essence, autorun viruses can be practically harmless (except for the effect on the nervous system of users) and not be recognized by antivirus programs. In this case, you can and should use programs that process the usb-drive in such a way that information for autorun cannot be copied to it. It's not exactly a virus remover (see the list above), but it's still a great alternative to keep your flash drive safe.

This and the previous programs are united by the fact that they protect not a flash drive, but a single computer. In general, we strongly recommend combining methods of protection against autorun viruses: firstly, vaccinate the USB flash drive, and secondly, install an antivirus on your computer and, without fail, one of the above programs.

Finally, a few tips on the topic. By following them, you will surely protect your computer from autorun viruses.

  1. If possible, do not give your flash key to anyone for personal use. Thus, you protect yourself from autorun viruses. And if you really want to share, do not forget to copy all the important data from the USB flash drive to your computer.
  2. If viruses have blocked access to files or writing to the flash drive has become impossible, see
  3. Scan the drive for viruses immediately after inserting it into the USB socket by selecting the scan command from the context menu.
  4. If possible, do not open removable media by double-clicking or through the "Open ..." window. Use the Total Commander file manager or other file managers when working.
  5. Now this is a rarity, but on some flash devices, manufacturers put a file write protection button. If you are copying information from a flash drive to a computer (and not vice versa), it would not be superfluous to switch to this mode.
  6. If you hold down Shift for 10 seconds while connecting removable media, autorun will not work, even if this function is activated on the computer.

It is very easy to infect a computer with a virus, and an external storage device is even easier. How to protect a flash drive from viruses, they know special programs and banal precautions: this article will tell you in detail about each option. The effectiveness of the method depends on many factors, but even if the flash card is used in full and regularly, it is possible and necessary to ensure its safety.

Basic Rules

Before you can secure a flash drive from viruses, you must make sure that at the moment it and your device are not carriers of malware. You should start with a device that regularly interacts with the carrier. After checking it with the program, disable autoloading files on all hard drives: this can be done through the usual settings, or using programs.

Since it is more difficult to protect data on a flash drive from virus infection, at this stage you need to be especially careful, and you need to devote as much personal time to the process as the protection method requires. Many advise to close access to the card for all outsiders, and this helps in 99 percent of cases. However, it will still be faster to use special programs, which are described below in the article.

Additional protection

If the above methods could not tell you how to make a USB flash drive protected from viruses, for example, because there is no access to a desktop computer to carry out the necessary manipulations, contact a specialist. In the course of their work, they install protection programs, or deny access to the media for all programs that are not approved by device administrators. Although this procedure does not cost a lot of money, you can do all the same yourself.

Protecting with autorun inf

Viruses mainly spread their influence precisely on this file in an external drive, so the most common way to deal with them is to work with autorun.

Instruction:

  • Open notepad;

  • Copy and paste the following commands into it:

"attrib -S -H -R -A autorun.*
delautorun.*
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.*
delautorun.*
mkdir %~d0AUTORUN.INF
mkdir "?%~d0AUTORUN.INF.."
attrib +s +h %~d0AUTORUN.INF"

  • Save the file to a flash card in the ".bat" format;

  • Run this file.

Popular programs

After the usb flash drive has been protected from autorun inf viruses, additional defenders can be used as a preventive measure. For example, free "Bitdefender USB Immunizer", "Panda USB Vaccine", "Ninja Pendisk" and others. Since programs for protecting flash drives from viruses have different functionality, it is impossible to say unequivocally which one is better.

Checking for viruses

It is important to be interested not only in the presence of a problem in the media itself, but also in how to protect your computer from viruses from a flash drive. This will make the process more efficient, so both options for searching for malicious files are analyzed below.

Flash card check:


Computer check

The best way is to install an antivirus. This is due to the fact that it is more difficult to track new files here, which means that it will be much more convenient and faster if a robot does this work for you. Any well-known antivirus will do.

Viruses cause significant harm to the system, so you should protect your equipment and flash drive in particular from viruses in a timely manner. One of the system's vulnerabilities is USB drives that carry malware between devices.

Is the flash drive infected?

Any flash drive that has been used on an infected device will also be affected. Most often transmitted in this way trojans and worms. There are several typical features of infection them:

How gets infectedUSB stick? It connects to the system and, along with the files transferred to it, receives malware, since it is contained in the files and system code that is involved at the time of copying. As soon as the media is connected to the device and the system launches infected files, the virus that infects the system of this device also starts working with them. Any flash drive connected to the infected computer contains the body of the virus, which also infects the autorun.inf file, making it work immediately on a new PC.

How to protect a flash drive

You can protect your flash drive from possible malware infection by using system tools. The most important thing is to disable the automatic launch of the media in order to prevent the virus from downloading to the device.

Disable autoplay

This can be done in 2 ways. The first one includes group policies:


In addition, when connecting a USB flash drive hold down a keyShift- this will also prevent autoplay.

The second way involves the registry editor:



After the procedures done, the media will stop starting on their own.

Using the autorun inf file

The virus usually gets on the media with the autorun.inf startup file, but if it is already created on the media, then this will not happen:


closed access

Sometimes it's enough to simply close the device's access to the drive:


All these are system tools that help block access to the malware carrier.

Applications and antiviruses

In addition to system tools, there are also programs that protect USB drives from infection.

Bitdefender USB Immunizer

You can download the free version of the utility from the official website; it does not require installation and is extremely simple. After its launch, all connected removable drives will be visible in the window that opens. By selecting the required one, the user will indicate to the utility the object to be protected. She immediately disablesautorun viruses and block them from starting automatically.

Panda USB Vaccine

After downloading the program from the official site, you need to install it on your PC. It is more complicated than the previous utility and has a wider range of actions:


Using it is quite simple:


The procedure must be repeated with each USB drive.

Ninja Pendisk

After downloading the program, you do not need to install it. It works automatically and is capable of:


After downloading, it works on its own, checking each disk.

xUSB Defense

You can download the program from the official website, it's free. Installation is quick and easy, the program itself "weighs" only 1 MB and immediately after installation appears on the notification panel.

The program can:

  • automatically delete or quarantine viruses;
  • do hidden files visible;
  • restore virus-hidden data.

At the same time, the utility does not distinguish malware from ordinary programs, so you should rename all their files in advance. In addition, it can automatically delete documents from the media, so in the settings it is better to disable the item " Work with documents».

When working with the utility, just left-click on the icon for the settings window and right-click to open the program menu. Clicking the left mouse button opens the settings window, the right mouse button opens the menu.

Top Related Articles