Advice Request Windows Defender disabled by malware

Please provide comments and solutions that are helpful to the author of this topic.

silversurfer

Level 85
Verified
Honorary Member
Top Poster
Content Creator
Malware Hunter
Well-known
Aug 17, 2014
10,275
I found this thread on Reddit, where a user is claiming that Windows Defender can be easily disabled by malware and even trusted applications.



Thoughts?


My first doubt is the source... there we can find a lot of threads where people complaining about free AVs or even paid AV.
Everyone should always searching for certain information on different places on the web!

To be more on topic, I trust more what is said by real experts (working for AV companies) than to believe what is reported by average users.

Here in the forum, MD users already knows to increase protection against malicious scripts by using Simple Windows Hardening:

 

struppigel

Moderator
Verified
Staff Member
Well-known
Apr 9, 2020
661
Seems you misunderstand how this has been abused in the past, which forced Microsoft hand with Anti-Tamper (which is still useless to an extent), Windows Defender can indeed be easily disabled.

Is pretty obvious the payload is only downloaded after disabling WD, the script that disables WD itself is not supposed to be detected, nor it is the real malware.

That is not a contradiction. The script itself is malware and needs to evade detection by Defender before it can disable Defender.
 

Andy Ful

From Hard_Configurator Tools
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
8,201
Windows Defender protection against scripts is poor by default, so is not stopping anything unless it's flagged as known malware.
You should not say this. It is clear that your knowledge about the current Defender's anti-script protection requires the update. :)
Anyway, it is true that any popular Home AV on default settings has only mediocre anti-script protection.
Tamper Protection is useless cause you can still disable WD in the current session (it won't turn back on, already tested), only after a restart that WD is back on (and only if not corrupted by malware already), and by then is too late.
Microsoft knows better if it is useless or not on the basis of successful attacks in the wild. It can be probably sufficient for now, but far from being a comprehensive solution - still, the attack surface is too big. Some other AVs (like Kaspersky) have stronger anti-tampering (the AV services cannot be disabled even with TrustedInstaller privileges).
Microsoft had to go as far as removing regedit entries for WD, cause it was that easy to bypass Tamper Protection, and it still is unfortunately.
You are right that the method of the attack from the OP is clearly a kind of vulnerability. It could be used in the wild as a primary infection vector (sometimes even successfully). Fortunately, it has also many drawbacks as the primary infection vector so it is very unpopular despite the fact that it is known for many years.(y)
Do you know any example of such an attack in the wild? I know only the examples where this method was used by the malware as one of many post-infection actions (not primary infection vector).
Furthermore, this method can be easily detected by behavior-based modules. If it is not for now (I do not know) then this would strongly suggest that it is not used in the wild as a primary infection vector (or used very rarely).
 
Last edited:

Andy Ful

From Hard_Configurator Tools
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
8,201
Let's look at two methods of theft:
  1. Sneak into the house with weapons, kill the host, and steal what you want.
  2. Sneak into the house, avoid the family members, and steal what you want.
The first method is very noisy, unpredictable, and very unpopular among professional thieves. The same is true for the method from the OP (as the primary infection vector). Although the first method is possible, most people do not use additional protection to prevent it.:unsure:
One example of such prevention would be installing the weapon detector and do not allow entering people with weapons. This would be analogous to use script blocking, SmartScreen, etc.

The situation is different when professional criminals want to attack the house with strong protection to get something very precious (worth killing). They can use another strategy:
Sneak into the neighbor's house which is not protected so well, and kill the host. Observe the target house, gather information, concentrate more people and more weapons. Use the weak point in the security to attack the target house at a suitable moment.(y)
This method is analogous to the lateral movement in Enterprises.
 
Last edited:

wat0114

Level 12
Verified
Top Poster
Well-known
Apr 5, 2021
575
It is clear that your knowledge about the current Defender's anti-script protection requires the update. :)
Anyway, it is true that any popular Home AV on default settings has only mediocre anti-script protection.
Hi Andy,

isn't Defender's script protection only available to Enterprises via the Attack Surface Reduction (ASR) component? Also if I'm not mistaken, many threats will obfuscate the script sent in a .zip file that often evades AV. Sodinokibi Ransomeware, for example, does this.
 

Andy Ful

From Hard_Configurator Tools
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
8,201
Hi Andy,

isn't Defender's script protection only available to Enterprises via the Attack Surface Reduction (ASR) component? Also if I'm not mistaken, many threats will obfuscate the script sent in a .zip file that often evades AV. Sodinokibi Ransomeware, for example, does this.
Script protection via ASR rules and AMSI behavior-based detections (also post-execution detections) are available in all Windows editions.
 

Andy Ful

From Hard_Configurator Tools
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
8,201
Because this thread was rather speculative, I created the POC. Unfortunately (but fortunately for users), Microsoft recently patched most of UAC bypasses on Windows 10 (also fodhelper and cleanmgr), so I could not prepare the POC with UAC bypass. If one knows a working UAC bypass then please send me one and then I will create the new POC. I am not sure if the modified POCmight work because UAC bypass can make it more suspicious and can trigger Defender actions.

The POC should be downloaded from email or URL, unpacked, and executed. The user has to allow elevation. It fully disables Defender on default settings and runs payload which is hidden in a password-protected archive (password is hardcoded). In my POC the payload file is named pld.exe (renamed powershell.exe). Defender cannot check this payload on access and the payload is run after deactivating Defender.
In the POC folder, the Defender Control is included (dc.exe file with hidden attribute), so one can easily enable Defender.

Please let me know If someone from MalwareHub wants to try this POC. After few days I will submit it to Microsoft.(y)
 
Last edited:

Nagisa

Level 7
Verified
Jul 19, 2018
341
Don't understand why they not adding something like this.

1618248245560.png
 

blackice

Level 39
Verified
Top Poster
Well-known
Apr 1, 2019
2,825
Hi Andy,

isn't Defender's script protection only available to Enterprises via the Attack Surface Reduction (ASR) component? Also if I'm not mistaken, many threats will obfuscate the script sent in a .zip file that often evades AV. Sodinokibi Ransomeware, for example, does this.
You can take a look here and here if you are wanting to use powershell to enable ASR rules for Windows 10 Home instead of Andy's tool. He just makes it a lot easier.
 
L

Local Host

You should not say this. It is clear that your knowledge about the current Defender's anti-script protection requires the update. :)
Anyway, it is true that any popular Home AV on default settings has only mediocre anti-script protection.

Microsoft knows better if it is useless or not on the basis of successful attacks in the wild. It can be probably sufficient for now, but far from being a comprehensive solution - still, the attack surface is too big. Some other AVs (like Kaspersky) have stronger anti-tampering (the AV services cannot be disabled even with TrustedInstaller privileges).

You are right that the method of the attack from the OP is clearly a kind of vulnerability. It could be used in the wild as a primary infection vector (sometimes even successfully). Fortunately, it has also many drawbacks as the primary infection vector so it is very unpopular despite the fact that it is known for many years.(y)
Do you know any example of such an attack in the wild? I know only the examples where this method was used by the malware as one of many post-infection actions (not primary infection vector).
Furthermore, this method can be easily detected by behavior-based modules. If it is not for now (I do not know) then this would strongly suggest that it is not used in the wild as a primary infection vector (or used very rarely).
I do not require any update on Windows Defender script protection, if you relying on AMSI you already lost.

Crippling Windows Defender is pretty much a basic feature most malware has nowadays, considering it comes pre-installed with Windows 10, so it is more popular than you believe.
Let's look at two methods of theft:
  1. Sneak into the house with weapons, kill the host, and steal what you want.
  2. Sneak into the house, avoid the family members, and steal what you want.
The first method is very noisy, unpredictable, and very unpopular among professional thieves. The same is true for the method from the OP (as the primary infection vector). Although the first method is possible, most people do not use additional protection to prevent it.:unsure:
One example of such prevention would be installing the weapon detector and do not allow entering people with weapons. This would be analogous to use script blocking, SmartScreen, etc.

The situation is different when professional criminals want to attack the house with strong protection to get something very precious (worth killing). They can use another strategy:
Sneak into the neighbor's house which is not protected so well, and kill the host. Observe the target house, gather information, concentrate more people and more weapons. Use the weak point in the security to attack the target house at a suitable moment.(y)
This method is analogous to the lateral movement in Enterprises.
Most malware targeted at Home Users is not hidden, nor it needs to, they simply wanna do as much damage as possible.
 

Templarware

Level 9
Thread author
Verified
Well-known
Mar 13, 2021
420
The way I see it, Windows Defender is the most popular/used in the world, due to being built in, so not only is more susceptible AV crippling attacks but Windows crippling attacks as well. Having the best prevention and tempering protection is really a must.
 
Last edited:

Andy Ful

From Hard_Configurator Tools
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
8,201
The way I see it, Windows Defender is the most popular/used in the world, due to being built in, so not only is more susceptible AV crippling attacks but Windows crippling attacks as well. Having the best prevention and tempering protection is really a must.
Yes, I hope that Microsoft remembers about it. But for now, it is doing pretty well:
There is no basis for saying that it is a top AV, but I cannot see why one might insist that its default protection is worse as compared to many commercial Home AVs.:unsure:
Of course, Defender has its own cons not related to pure protection.
 

Andy Ful

From Hard_Configurator Tools
Verified
Honorary Member
Top Poster
Developer
Well-known
Dec 23, 2014
8,201
Crippling Windows Defender is pretty much a basic feature most malware has nowadays, considering it comes pre-installed with Windows 10, so it is more popular than you believe.
The AV testing Labs do not support your claims.
Defender (default settings) seems to be as effective as most other Home AVs (default settings) and the chances of infection are not great.
So the AV "crippling" is not especially effective (or it is unpopular) and crippling Defender does not differ much from other AVs (so far).
Of course, Defender anti-tampering is weaker compared to many AVs. This could be exploited by malc0ders, If they want.
 
Last edited:

TairikuOkami

Level 36
Verified
Top Poster
Content Creator
Well-known
May 13, 2017
2,528
Don't understand why they not adding something like this.
I can already hear people complaining: I am installing 3rd party AV and MS does not want to let me, arghhh! Majority of users do not care about security, extra popup = bloatware.

 

wat0114

Level 12
Verified
Top Poster
Well-known
Apr 5, 2021
575
Script protection via ASR rules and AMSI behavior-based detections (also post-execution detections) are available in all Windows editions.
Thanks Andy,

good grief, I should have known this :( I actually have those rules enabled in Group Policy, done a long time ago I guess. Still I think for some reason I had some doubt that they were fully effective for non-enterprise users, but I take your word for it that they are.

ASR Rules.png
 
L

Local Host

Which better anti-script solution is applied in popular Home AVs?
In Home AVs, you better off relying on Behaviour Blockers like System Watcher.

I don't even need to go far to see both Kaspersky and WD in action on the Malware Hub, which confirms how poor WD is against scripts even with your configuration, in comparison to Kaspersky.

We even had a recent example here, Q&A - Drive-by downloads: Can you get malware just from visiting a website?

Kaspersky blocked the custom script I wrote for testing that, while WD didn't even flinch as I expected, so much for that superior script protection you rely so much on.

AMSI is pretty basic and it won't detect a good chunk of scripts, there's a good reason AMSI is complemented by Windows Defender ATP monitoring in the Enterprise, in the case of Kaspersky they have Adaptive Anomaly Control.
 
Last edited:

About us

  • MalwareTips is a community-driven platform providing the latest information and resources on malware and cyber threats. Our team of experienced professionals and passionate volunteers work to keep the internet safe and secure. We provide accurate, up-to-date information and strive to build a strong and supportive community dedicated to cybersecurity.

User Menu

Follow us

Follow us on Facebook or Twitter to know first about the latest cybersecurity incidents and malware threats.

Top