How to protect a flash drive from viruses without programs. 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 parties, 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 file.inf. 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 this 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.

Everything after that is not like this complex 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 look at them in the root of your flash drive, before turning on the display of hidden windows files, and then delete them and re-create them.

Protecting a flash drive with the Bitdefender USB Immunizer utility

And so the Bitdefender USB Immunizer utility, from one famous 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 the record is tracked malicious code. 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. Its point is to put the necessary rights on 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 the 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

Good day, dear habra reader. I work at a university, in a laboratory computer technology. We administer about a hundred computers. We were faced with the problem of protecting against Autorun viruses on flash drives. Naturally, we have autorun disabled in Windows, but we needed to protect the flash drives themselves so that a worker at home, by inserting a working flash drive, would not infect his computer. Below is the solution to the problem.

Before we begin...

Dear users, the actions described below were performed in the OS Microsoft Windows Xp, in others operating systems the process may differ from that described. I would also like to say that the author of the text is not responsible for equipment damaged as a result of performing the actions described below.

Preparation.

To implement our plan, we will need to format the flash drive in NTFS; there are several methods known to me for this. For me, the easiest is to use Acronis Disk Director.

After launch Disk Director"ah, you will see a list of disks connected to your system. In this list, find your flash drive, right-click and select “Delete partition”, in the new window we leave everything as it is (There is not much difference there). Then again right-click on our disk and select “Create partition”. In the “Create partition” window, select:

  • File system: NTFS.
  • Create as: Main section.

Now click on the “Flag” icon and in the window that appears, click “Proceed”. After making changes, restart your computer.

The flash drive can also be formatted more in a simple way, specified uv. :

Start → Run → cmd →

Convert f: /FS:NTFS< - это если данные на флэшке нужны и их некуда сбэкапить

Format f: /FS:NTFS< - если данные нафик

Setup.

So, the card is ready for setup, go to the flash drive and in the root directory create a directory in which the data will be stored, I called it “DATA”. Right-click on the new directory and go to the Security tab, then click on the “Advanced” button. Here, uncheck the “Allow inheritance of permissions from a parent object to this...” item, in the dialog that appears, click “Copy”, then click “Ok” in both windows. Now let's go to the "Security" section root directory our media and configure the permissions as follows:

In the “Allow” column, leave the following items checked:

  • Read and execute
  • List of folder contents
  • Reading

In the “Deny” column, put a checkmark next to the “Record” item, and in the dialog that appears, click “Yes”.

That's it, in the end we get a flash drive that Autorun cannot write to. For this we sacrifice a small portion of performance, the ability to write to the root directory of the media and, of course, the inability to use the “Send” menu to copy data to the media.

Possible problems and their solutions.

  1. After formatting the drive in NTFS, it is not visible in the system.

    Right-click on “My Computer”, select “Manage”, in the window that appears, go to “Disk Management”, there we right-click on our flash drive and select “Change drive letter or disk path”. Select a letter and click “OK”.

Unfortunately or fortunately, I didn’t find any more problems, if you suddenly find them, write to us and we’ll try to solve them.

Disable autorun.

Except XP Home Edition:
start - run - gpedit.msc - computer configuration - administrative templates - System - disable autorun (choose where to disable). Next, apply the new policy using the gpupdate command in the console.

In Home control equipment group policies missing, but the same effect can be achieved by manually editing the registry:
1) Start -> run -> regedit
2) open the branch HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies
3) Create a new partition
4) Rename the created section in Explorer
5) In this section, create the NoDriveTypeAutoRun key

Valid key values:
0x1 - disable autorun on drives of unknown types
0x4 - disable autostart of removable devices
0x8 - disable autostart of non-removable devices
0x10 - disable autostart of network drives
0x20 - disable autorun of CD drives
0x40 - disable autorun of RAM disks
0x80 - disable autorun on drives of unknown types
0xFF - disable autorun for all disks.

Values ​​can be combined by summing their numeric values.

Default values:
0x95 - Windows 2000 and 2003 (autostart of removable, network and unknown drives is disabled)
0x91 - Windows XP (autorun of network and unknown drives is disabled)

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 method 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 context menu and choose 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.

Viruses cause significant harm to the system, so you should promptly protect your equipment and flash drive in particular from viruses. One of vulnerabilities systems are USB drives that carry malware between devices.

Is the flash drive infected?

Any flash drive that was used on an infected device will also be affected. Most often transmitted in this way Trojans and worms. There are several characteristic characteristics of infection them:

How becomes infectedUSB flash drive? It connects to the system and, along with the files transferred to it, receives malicious software, 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 the infected files, the virus starts working along with them and infects the system of this device. Any flash drive connected to an infected computer contains the body of the virus, which also affects the autorun.inf file, thanks to which it immediately starts working on the new PC.

How to protect a flash drive

Protect your flash drive from possible infection malware can be used using system tools. The most important thing is to turn off automatic start media to prevent a virus from being downloaded to the device.

Disable autorun

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


In addition, when connecting a flash drive, you can hold down a keyShift– this will also prevent autostart.

The second method uses the Registry Editor:



After these procedures have been completed, the media will no longer start on its own.

Using the autorun inf file

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


Private access

Sometimes it’s enough to simply block the device’s access to the drive:


All of these are system tools that help block access to the media for malware.

Applications and antiviruses

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

Bitdefender USB Immunizer

Download free version The utility is available from the official website, it does not require installation and is extremely simple. After launching it, all connected devices will be visible in the window that opens. removable drives. Having selected the required one, the user will indicate to the utility the object to be protected. She immediately disablesautorun viruses and blocks their automatic launch.

Panda USB Vaccine

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


It's quite simple to use:


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 independently, checking each disk.

xUSB Defense

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

The program can:

However, the utility does not distinguish malware from regular 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 “ 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 with the left mouse button opens the settings window, right clicking opens the menu.

Flash drives are primarily valued for their portability - necessary information always with you, you can view it on any computer. But there is no guarantee that one of these computers will not turn out to be a breeding ground for malware. The presence of viruses on removable storage always carries with it unpleasant consequences and causes inconvenience. We will look further at how to protect your storage media.

There can be several approaches to protective measures: some are more complex, others are simpler. In this case they can be used third party programs or Windows tools. The following measures may be helpful:

  • setting up an antivirus to automatically scan a flash drive;
  • disabling autorun;
  • use of special utilities;
  • using the command line;
  • autorun.inf protection.

Remember that sometimes it is better to spend a little time on preventative actions than to face infection of not only the flash drive, but the entire system.

Method 1: Setting up an antivirus

It is because of neglect antivirus protection malware is actively spreading across various devices. However, it is important not only to have installed antivirus, but also produce correct settings for automatic scanning and cleaning of the connected flash drive. This way you can prevent the virus from being copied onto your PC.

Method 2: Disabling AutoPlay

Many viruses are copied to the PC thanks to the file "autorun.inf", where the launch of the executable is specified malicious file. To prevent this from happening, you can disable automatic media startup.

This procedure is best carried out after the flash drive has been scanned for viruses. This is done as follows:



This method is not always convenient, especially if you use CDs with extensive menus.

Method 3: Panda USB Vaccine Program

In order to protect flash drives from viruses, they were created special utilities. One of the best is Panda USB Vaccine. This program also disables AutoRun so that malware cannot use it to do its work.

To use this program, do this:


Method 4: Using the Command Line

Create "autorun.inf" with protection against changes and overwriting, you can use several commands. It's about here's what it's about:



Please note that it is not suitable for all types of media. disabling AutoRun. This applies, for example, bootable flash drives, Live USB and so on. Read our instructions for creating such media.

Method 5: Protect “autorun.inf”

A fully protected startup file can also be created manually. Previously, it was quite easy to create on a flash drive empty file "autorun.inf" with rights "only for reading", but according to many users, this method is no longer effective - viruses have learned to bypass it. Therefore, we use a more advanced option. As part of this, the following actions are assumed:


These commands delete files and folders "autorun", "recycler" And "recycled", which may already "capitalized" virus. Then it is created hidden folder "Autorun.inf" with all protective attributes. Now the virus will not be able to change the file "autorun.inf", because there will be a whole folder instead.

This file can be copied and run on other flash drives, thus carrying out a kind of "vaccination". But remember that it is highly not recommended to perform such manipulations on drives that use AutoRun capabilities.

The main principle of protective measures is to prevent viruses from using autorun. This can be done either manually or using special programs. But you still shouldn’t forget about periodically checking the drive for viruses. After all, malware is not always launched through AutoRun - some of them are stored in files and wait in the wings.