If you plug a USB drive into Microsoft Windows, in many cases it will try to do things “for you” with the drive. Not a great idea. There could be malware lurking on that USB drive.

There are a couple of things you can do to help mitigate the issue. These tips assume Windows 11.

Turn off Autoplay

  • Open Settings. Press Windows + I to open the Settings app.
  • Go to Bluetooth & devices. In the left sidebar, click on “Bluetooth & devices.”
  • Select Autoplay. Scroll down and click on “Autoplay.”
  • Turn Off Autoplay. You’ll see a toggle switch labeled “Use Autoplay for all media and devices.” Turn this off.

This will turn it off completely. You can, if you want, make individual settings for different types of devices.

Deny Execute Access (Pro or Enterprise versions of Windows 11)

  • Open Group Policy Editor. Press Windows + R, type gpedit.msc, and press Enter.
  • Navigate to the Removable Storage Access Policies. Go to Computer Configuration > Administrative Templates > System > Removable Storage Access.
  • Modify Policies. You can enable the policy “Removable Disks: Deny execute access” to prevent execution from removable drives.
  • Apply and Reboot.

Note, there are some cases where you may want to execute scripts or programs from a removable drive. If that’s the case, you may not want to do this, or make a note of it so you can re-enable if needed.

  • rtxn@lemmy.world
    link
    fedilink
    English
    arrow-up
    18
    ·
    edit-2
    25 days ago

    I recently had to rescue the SSD of a data science PhD student. While dumping the files, I noticed that he had a dozen copies of identically named large CSV files (I mean 20+ gigabytes each). I compared their checksums - they were copies of the same raw data file, just sitting there in the downloads folder. When I asked, he said he’d made several backups of the project. Including the data.

    Unfortunately Windows somehow fucked up the partition table and took the “backups” with it.

    • TheImpressiveX@lemmy.ml
      link
      fedilink
      arrow-up
      17
      ·
      24 days ago

      He’s just following the 3-2-1 backup strategy - at least three copies of the data, two on different formats (.csv and .xls) and at least one copy in a different location (saved in the “Backup” folder instead of the “Documents” folder).