2 Ways to Prevent Writing Data to USB Drives

Jon Fisher

2-Ways-to-Protect-USB-Drives-From-Being-Modified

It’s important to protect ourselves from viruses and other harmful software exploits. A common pipeline malware uses is USB drives. We may plug these in day after day, moving from computer to computer without knowing a worm is also travelling with us. An easy way to avoid this would be to scan your drive every once in a while, but this isn’t always what we do. Another simple way is to disable the ability for files to be written to the drive.

To disable writing to a USB drive is a hassle if you frequently need to put new information on them. However, if you’re using an external drive to scan for viruses on an infected computer, it’s important to to disable the ability of the malware to penetrate your drive. This is when you’d want to disable that function. Also, if you’re on a computer with sensitive files, disable writing to ensure no one can copy off the material with the ease portable drives offer.

We’ll look at two ways to enable protection from writing data to USB drives. One involves a small program and the other is a registry edit.

Enable Write Protection With Ratool

Open-Ratool.exe

Sordum.org has a tool called Ratool that enables a removable drive to be read-only. Download Ratool here. This tool is portable, so there aren’t any installation files except the Ratool.exe program. Launch this to open the software.

There are three options to choose from. Select the first to enable both reading and writing. This is the default state of any USB device. Selecting this just resumes the natural state of the drive. The second option is Allow Read Only, which is what we’re looking for to enable write protection.

Make-USB-read-only-with-Ratool

Click Apply Changes to continue. The result for read-only access is only effective when the USB drives have been reinserted.

Enable-write-protection-on-USB-drives-with-Ratool

The result is evident immediately after unplugging any devices. Now any new USB devices plugged in will be protected.

The-disk-is-write-protected-with-Ratool

Ratool works great until someone recognizes the program is what’s blocking their access. They can easily turn it off the same way it was turned on. Unless, however, you set a password. Create a password from the Options > Change Password menu item.

Password-protect-Ratool

Cool Tip: Learn how to create a hidden partition on a USB drive in this post.

Now close Ratool so the next time it’s launched a password is required to make any changes.

Enter-a-password-to-change-USB-writing-settings-with-Ratool

Now if you or anyone else is wanting to change the settings Ratool has set in place, a password is required to do so.

Tweak the Windows Registry to Disable USB Write

While Ratool is great at what it does, maybe a registry edit is something you’d prefer. No extra downloads and quite a straightforward change where you recognize what’s happening behind the scenes. (ensure you backup the registry first)

Open Regedit from the Start menu or Run dialog box (Windows Key + R).

Open-regedit-from-the-Run-dialog-box

Navigate to this folder: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies.

Find-the-folder-StorageDevicePolicies-in-the-Windows-Registry-to-disable-USB-writing

If the folder StorageDevicePolicies does not exist, right-click the Control folder and create it there.

Make-a-new-key-in-the-Windows-Registry-to-prevent-USB-writing

Name the new key StorageDevicePolicies.

Create-a-new-key-in-the-Windows-Registry-called-StorageDevicePolicies-to-disable-USB-writing

Right-click the newly created folder and choose New > DWORD (32-bit) Value.

Create-a-new-DWORD-in-the-Windows-Registry-to-enable-USB-write-protection

Name this new value WriteProtect. Open the new value and make it’s Value Data be the number one (1).

Modify-the-WriteProtect-Windows-Registry-value-to-enable-USB-write-protection

Now any newly entered device plugged in via USB will be unable to have data written to it. You must remove any presently plugged in devices for the registry change to take effect. To restore full functionality of writing, just delete this WriteProtect entry or change the value back to zero (0).

Conclusion

No matter what the reason for wanting to protect your USB drive is, either of these methods will work. I recommend Ratool for a temporary disable because it’s easily editable. The registry change is a bit more permanent in that you need to dive into the editor to make changes.

Also See
#security #Software

Join the newsletter