Blocking execution of Autorun with Windows Defender?


  1. Posts : 812
    Win10
       #1

    Blocking execution of Autorun with Windows Defender?


    Is there a way that Windows Defender can automatically block the execution of Autorun commands once a USB flash drive or a DVD is inserted on a computer?
      My Computer


  2. Posts : 42,998
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Autorun was disabled around Vista onwards for reasons of malware risk.

    How AutoRun Malware Became a Problem on Windows, and How It Was (Mostly) Fixed

    To replicate that functionality you need a third party program, as I understand it.
    How to Auto-Run Windows Programs When You Plug In a USB Drive
    How to Make Windows Autorun USB Flash Drives • Raymond.CC

    However, it may be you're asking the converse question- how can it be disabled..?

    What behaviour are you experiencing if you plug in a flash drive?

    I don't think you're referring to Autoplay, which is quite different, as you mention 'Autorun commands'.
      My Computers


  3. Posts : 812
    Win10
    Thread Starter
       #3

    Here is an image shot for example from Symantec Endpoint Protection on how it blocks the Autorun command or feature. Can this be done the same with Windows Defender?
    Attached Thumbnails Attached Thumbnails Blocking execution of Autorun with Windows Defender?-capture.png  
      My Computer


  4. Posts : 245
    W10 Home Version 21H1 Build 19043.1055
       #4

    Windows Defender has an anti ransomware facility called Controlled Folder Access that can help mitigate external USB activity.
    Up to W10 1803 it's a bit clunky as you have to go into Event Viewer to see the full file path of blocked access events (I.D 1123) and then whitelist the file path in Defender if happy it is legit.
    Apparently from 1809 onwards it is all whitelistable from within defender, so much easier. (Thanks to @Bree for that nugget).

    Another option is to use individually switchable USB hubs into your USB sockets, keeping them off until needed.
    It won't stop a malicious actor who knows what they are doing but for casual security to stop kids etc. plugging in random flash drives et al it would work, and also for things like webcams, microphones.
    Last edited by Infrasonic; 28 Apr 2019 at 06:06.
      My Computers


  5. Posts : 3,274
    Win10
       #5

    Another possibility if you have win 10 pro is to set the Group Policy to block autorun.

    see under Set The Default Behavior For AutoRun item:

    How to disable AutoPlay and AutoRun in Windows 10 - TechRepublic
      My Computers


  6. Posts : 42,998
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #6

    If you have Home, there should be registry settings corresponding to the group policy settings, where you could disable Autorun.

    The registry key and information on using it are towards the end of this MS article, which should let you disable Autorun completely.

    See under this heading:
    How to disable or enable all Autorun features in Windows 7 and other operating systems

    https://support.microsoft.com/en-gb/...ity-in-windows


    This is how that group policy is described: Note the default behaviour at the bottom.

    This policy setting sets the default behavior for Autorun commands.

    Autorun commands are generally stored in autorun.inf files. They often launch the installation program or other routines.

    Prior to Windows Vista, when media containing an autorun command is inserted, the system will automatically execute the program without user intervention.

    This creates a major security concern as code may be executed without user's knowledge. The default behavior starting with Windows Vista is to prompt the user whether autorun command is to be run. The autorun command is represented as a handler in the Autoplay dialog.

    If you enable this policy setting, an Administrator can change the default Windows Vista or later behavior for autorun to:

    a) Completely disable autorun commands, or
    b) Revert back to pre-Windows Vista behavior of automatically executing the autorun command.

    If you disable or not configure this policy setting, Windows Vista or later will prompt the user whether autorun command is to be run.


      My Computers


  7. Posts : 812
    Win10
    Thread Starter
       #7

    There is also an option to disable USB removable storage using regedit entirely. But that would be a real pain since I do use my USBs frequently on my PC.

    https://www.tweakandtrick.com/2010/0...n-your-pc.html

    I will just disable Autorun using Group Policy since I am the only one using my laptop.

    The whole idea on the USB restrictions, is that I am concerned is someone breaks into my house and steals my laptop. I don't even use my laptop but only at home. No where else, unless I need to travel with it.
      My Computer


  8. Posts : 245
    W10 Home Version 21H1 Build 19043.1055
       #8

    Look at a BIOS password also...https://www.howtogeek.com/186235/how...uefi-password/

    And U2F keys, FIDO et al with pre-boot authorisation.
      My Computers


  9. Posts : 812
    Win10
    Thread Starter
       #9

    Basically, the AutoPlay dialog will just prompt the user to run a program from the selection. Unless a NON-security cautious user inserts a USB or DVD into their machines that was given to them by their friends or a stranger or even found on the street, then they would get bit by malware if they click on the Run Program from the AutoPlay dialog selection. Of course, hopefully no one should ever do this.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 21:58.
Find Us




Windows 10 Forums