How fast is Microsoft Defender real-time protection at stopping a threat?


If a malicious file download itself onto my laptop:

Will the real-time scanner then scan it immediately?
And the file will be unavavilable / inaccessible, until is has been scanned and declared clean by the scanning software?

Or will the scanner scan the malicious file for the first time, when the malicious file is ran / activated?

Thank you
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
If you have a decent anti-malware program it won't allow you to download hostile pacakages.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2 26100.2894
    Computer type
    Laptop
    Manufacturer/Model
    Acer Swift SF114-34
    CPU
    Pentium Silver N6000 1.10GHz
    Memory
    4GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD
    Cooling
    fanless
    Internet Speed
    150 Mbps
    Browser
    Brave
    Antivirus
    Webroot Secure Anywhere
    Other Info
    System 3

    ASUS T100TA Transformer
    Processor Intel Atom Z3740 @ 1.33GHz
    Installed RAM 2.00 GB (1.89 GB usable)
    System type 32-bit operating system, x64-based processor

    Edition Windows 10 Home
    Version 22H2 build 19045.3570
  • Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
If you want to see how windows defender handles 200new malware samples from 4days ago:

Register to the channel to get updated by new video's.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
It detects the payload or knows the website is dodgy.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2 26100.2894
    Computer type
    Laptop
    Manufacturer/Model
    Acer Swift SF114-34
    CPU
    Pentium Silver N6000 1.10GHz
    Memory
    4GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD
    Cooling
    fanless
    Internet Speed
    150 Mbps
    Browser
    Brave
    Antivirus
    Webroot Secure Anywhere
    Other Info
    System 3

    ASUS T100TA Transformer
    Processor Intel Atom Z3740 @ 1.33GHz
    Installed RAM 2.00 GB (1.89 GB usable)
    System type 32-bit operating system, x64-based processor

    Edition Windows 10 Home
    Version 22H2 build 19045.3570
  • Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
If you want to see how windows defender handles 200new malware samples from 4days ago:
Very interesting!

I had another question, if there is a pop-up message, if Defender stops a threat - and your linked video clearly shows, that a pop-up message appears. There even comes warning messages, if you want to install the malicious software.

Why did Defender not block the download of the malware files?

When he executed / activated the malware files, they almost instantly was blocked by Defender, impressive.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
I think you need to do your own research! My knowledge of how Defender works is very limited.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2 26100.2894
    Computer type
    Laptop
    Manufacturer/Model
    Acer Swift SF114-34
    CPU
    Pentium Silver N6000 1.10GHz
    Memory
    4GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD
    Cooling
    fanless
    Internet Speed
    150 Mbps
    Browser
    Brave
    Antivirus
    Webroot Secure Anywhere
    Other Info
    System 3

    ASUS T100TA Transformer
    Processor Intel Atom Z3740 @ 1.33GHz
    Installed RAM 2.00 GB (1.89 GB usable)
    System type 32-bit operating system, x64-based processor

    Edition Windows 10 Home
    Version 22H2 build 19045.3570
  • Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
I had another question, if there is a pop-up message, if Defender stops a threat - and your linked video clearly shows, that a pop-up message appears. There even comes warning messages, if you want to install the malicious software.
The popups are from the Blocked malware samples.
When you see the Missed item in the console, that sample continues to run, and that can generate the popup, warning messages, to install, or already is installed.
Why did Defender not block the download of the malware files?
Download links are based on reputation of the url, if it's a new malware on a new url, the url still has a good reputation, the more it get investigated/ clouds sample upload scans automated to learn about the file. If the file does bad/hostile things, the url will getting a bad reputation. So then with definition updates, the urls will have bad reputation and will be blocked. Only takes some time... thats why some new malware sample still get trough. Defender definitions updates every 4hours.
When he executed / activated the malware files, they almost instantly was blocked by Defender, impressive.
The script only downloads the file, and when script tries to execute the file, Blocked is shown, if the file is already move to quarentine. If script can run the file, it outputs Missed. So before the code can execute the exe it downloaded, it is already gone.
How this works.
You might have noticed on machines, when you have folder, with big .exe files, it might take a while for all exe's to load there Icons. Just before accessing the file/showing the icon, microsoft defender scans the file. And so can catch/stop before the user or any application that accesses the file to to execute something bad. In this case explorer.exe accesses the .exe file, to retrieve the icon. And so the defender kicks in.
Example what i talk about, with icons still not loaded.
1739802102432.webp

Then Windows Defenders, has functions like EventWatcher, for example for the filesystem.

The FileSystem EventWachters is lisening on all the non-exluded files on the drive.
So when a file is downloaded some where on C: Windows will generate an Event. The programs that listen to those events, will get a notification directly when this happens. So when the file is created at the same moment defenders knows that is happend, and so will scan the file. Even before other application or the user will access the file! Thats why it's catching it so fast!

In the older days, when i made a program, that would check if a file was created in a folder, i would write a loop, and check the folder every second to see if a new file is in there. Now using those EventWatchers to monitor a file location. It does not have to loop, cost less cpu, and the moment the file is created(within a micro/nanosecond), the applications get a notification, and you can execute your code based on that.

This data comes from the kernel it self.

Read more about the filesystemwatcher: FileSystemWatcher Class (System.IO)

Perhaps Microsoft defender, even gets it faster then this filesystemwatcher as, it is a microsoft product, and so maybe can even get faster access directly from the kernal, then the api i write about.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
If you want to see how windows defender handles 200new malware samples from 4days ago:

Register to the channel to get updated by new video's.
So how many ransomware devices out of 200 did Defender catch? The video does not make clear.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2 26100.2894
    Computer type
    Laptop
    Manufacturer/Model
    Acer Swift SF114-34
    CPU
    Pentium Silver N6000 1.10GHz
    Memory
    4GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD
    Cooling
    fanless
    Internet Speed
    150 Mbps
    Browser
    Brave
    Antivirus
    Webroot Secure Anywhere
    Other Info
    System 3

    ASUS T100TA Transformer
    Processor Intel Atom Z3740 @ 1.33GHz
    Installed RAM 2.00 GB (1.89 GB usable)
    System type 32-bit operating system, x64-based processor

    Edition Windows 10 Home
    Version 22H2 build 19045.3570
  • Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
The script only downloads the file, and when script tries to execute the file
I thought the files were already downloaded, and the script was only to execute the file.

So the scripts downloads the file and also executes the file?

Blocked is shown, if the file is already move to quarentine.
Quarantine OR deleted?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
Ah i think your right they where already downloaded, he might have shutdown defender when he copyed them on the machines, then reactivated it, run the script.

Quarantined, only after setting the action in defender it cleans it up. Almost all files are first quarantined, however i have some seen some items in the past that where deleted, and you could not restore those items.
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
Dear all

If a malicious file / threat gets inside my system.

1.
How fast will Microsoft Defender real-time protection detect it?
Instantly?
After a couple of seconds?

2.
Will Microsoft Defender real-time protection scan it immediately?
Or first when the malicious file is ran / activated?

3.
Does Microsoft Defender real-time protection use the online / cloud scanner or offline scanner first?

Thank you

From Microsoft Copilot:

Great questions! Here are the answers:

  1. Detection Speed: Microsoft Defender's real-time protection detects threats instantly as soon as a file is accessed, downloaded, or executed.
  2. Scanning Process: Microsoft Defender real-time protection scans files immediately upon detection, without waiting for the file to be run or activated.
  3. Scanner Used: Microsoft Defender real-time protection primarily uses the online/cloud scanner first. The cloud scanner quickly checks for known threats using up-to-date signatures and behavior-based detection methods.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Dell XPS 16 9640
    CPU
    Intel Core Ultra 9 185H
    Memory
    32GB LPDDR5x 7467 MT/s
    Graphics Card(s)
    NVIDIA GeForce RTX 4070 8GB GDDR6
    Monitor(s) Displays
    16.3 inch 4K+ OLED Infinity Edge Touch
    Screen Resolution
    3840 x 2400
    Hard Drives
    1 Terabyte M.2 PCIe NVMe SSD
    Cooling
    Vapor Chamber Cooling
    Mouse
    None
    Internet Speed
    960 Mbps Netgear Mesh + 2 Satellites
    Browser
    Microsoft Edge (Chromium) + Bing
    Antivirus
    Microsoft Windows Security (Defender)
    Other Info
    Microsoft 365 subscription
    Microsoft OneDrive 1TB Cloud
    Microsoft Visual Studio
    Microsoft Visual Studio Code
    Microsoft PowerToys
    Macrium Reflect X subscription
    Dell Support Assist
    Dell Command | Update
    1Password Password Manager
    Amazon Kindle for PC
    Interactive Brokers Trader Workstation
    Lightroom/Photoshop subscription
    BitLocker
    Copilot
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    Microsoft Surface Pro 7
    CPU
    i5 1035G4
    Memory
    8 GB
    Hard Drives
    256GB SSD
    Mouse
    None
    Internet Speed
    960 Mbps Netgear Mesh + 2 Satellites
    Browser
    Microsoft Edge (Chromium) + Bing
    Antivirus
    Microsoft Windows Security (Defender)
    Other Info
    Microsoft 365 subscription (Office)
    Microsoft OneDrive 1TB Cloud
    Amazon Kindle for PC
    Interactive Brokers Trader Workstation
    Lightroom/Photoshop subscription
    BitLocker
    Copilot
  1. Detection Speed: Microsoft Defender's real-time protection detects threats instantly as soon as a file is accessed, downloaded, or executed.
  2. Scanning Process: Microsoft Defender real-time protection scans files immediately upon detection, without waiting for the file to be run or activated.
  3. Scanner Used: Microsoft Defender real-time protection primarily uses the online/cloud scanner first. The cloud scanner quickly checks for known threats using up-to-date signatures and behavior-based detection methods.
And the file will be unavavilable / inaccessible, until is has been scanned and declared clean by the scanning software?

And if there is no internet connection and it can't use the online scanner.
It will then instantly use the offline scanner?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop
  1. Obviously, Defender would use local before online, can you really believe Windows is expected to wait to find out if you have a workable network connection before it attempts to protect you? This is why definitions and security updates are downloaded to your PC
And if there is no internet connection and it can't use the online scanner.
It will then instantly use the offline scanner?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    Laptop

Latest Support Threads

Back
Top Bottom