-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable windows defender script appears not working on Windows 10 2004 #273
Comments
Could be. I haven't revisited the script since the introduction of Tamper Protection. I just figured out yesterday. That group policies are ignored if tamper protection is enabled. Following the thread you linked. It doesn't seem to be possible to turn off tamper protection via the shell. Intune is mentioned, but that'd be overkill for this project. |
Same here |
How does sordum does it with his defender control then? Because his application works on 2009 as well. |
@kokotas89 I've never heard of Sordum. Is the application you are referring to open source? |
No it's not open source otherwise I would have provided a link :P I was wondering if you knew how he does it by comparing before and after system snapshots or something like that. |
@kokotas89 ah. So no, I don't know. Maybe I'll take a look at it in the next couple of days. Depends on my time. If it's only different registry keys, that could be adapted easily. However, if it makes use of other things that are not yet part of the scripts, I may be hesitant to add it. Anyways, I'll let you know if I find something. |
Probably lots more going other than changing registry values. It's all cool man thank you for your time and contribution. |
I did some superficial analysis of the mentioned application. Here are the details (see To summarize, it seems like it's manually setting the group policy to disable Windows Defender globally. IIRC we had several issues related to this. It broke a few ways of installation things, mainly through the Windows Store. I tried installing 2 applications through the Windows Store, after running Defender Control, and it worked fine. So, maybe MS has changed something here. Initially I thought that the simple group policy entry wouldn't do anything because of the Windows Defender Anti-Temper setting, but apparently it's working and I haven't found anything that seems to specifically disable the Anti-Temper feature. My takeaway, unless I've missed something, here is that it (simply) uses 1 group policy setting, set via files located in |
That's a great first analysis wow! Hopefully this will lead to something so that we can get rid of what ms forces down our throats. |
For what it's worth, Defender Control doesn't seem to do anything that should result in a major breakage of the system, nor does it seem to be somehow malicious. I am not a security expert and haven't looked into every detail of the program. But so far, it looks fine I'd say. |
That's good news. I guess I will test it when I do a clean installation of w10 2009 along with your ps scripts. |
Since Microsoft decided to deprecate the There are multiple processes involed in keeping the Defender enabled. All of them appear to be residing in a bunch of services that partly reenable each other if you simply disable one of them. The registry keys are owned and controlled by the Setting the following registry keys which will essentially disable all relevant Windows Defender services seems to completly kill all Windows Defender activities. Changing these keys requires
The source of these keys is https://superuser.com/a/1009656 and the post contains a few other registry changes that would probably remove even more parts of the Windows Defender but I tried to be conserative with my changes. The only issue is that with these changes, the security center will notice that something is very wrong and start pestering you. So to prevent it from doing that, you can use the following Group Policy:
So far this seems to have disabled the Windows Defender entirely. I can't find any stray processes. The performance impact from it's real time scan is gone and the context menu entry is also removed and it doesn't appear to reenable itself after a reboot. I assume that major Windows Updates will reset these services but this is as far as we can go I guess. |
On a fresh install of Win 10 LTSC 2019 (Version 1809), I have not been able to find a single script that works, including the one linked in the previous post. The ONLY reliable way of preventing MsMpEng.exe and the WinDefend service from running is to mount the drive in another operating system, bypass the permissions and directly remove the executables (which then immediately get restored on an sfc.exe check or an update). The Group Policy settings turn themselves off after a reboot, and the registry keys cannot be edited from within the operating system, even if I use a third party tool to run regedit.exe under the NT-AUTHORITY\SYSTEM account and attempt to manually set every permission and ownership property that exists. It's kind of funny how Windows Defender itself acts like a rootkit, going to great lengths to ensure that it cannot be deleted from within the system it resides in, even using a cluster of shady, undocumented services and background tasks to replace itself should anything happen. I miss the days when all it took was a single checkbox, and users were assumed to be competent enough to use antivirus software if they want one. I can understand making it a default, but for God's sake, put a hidden setting or registry key somewhere. Make it flash a red popup for 30 seconds or make it an option you can only select during installation on the Enterprise SKU on every third Wednesday of the month if you must, just have SOMETHING. Edit: Turns out, PowerRun v1.4 is able to launch a copy of regedit.exe with the necessary permissions for editing Defender's service keys, and a shell with TrustedInstaller permissions which you can use to rename or remove the executables! As always, it's a half-assed measure which is trivial to bypass once you know how. At least until they lock things down even further, and you really are going to need an offline disk/registry editor. |
I confirm its disabled when I run the script within PowerShell run with TrustedInstaller privileges. That was the only way to turn of defender with latest Windows. |
With latest W10 running as TI produces errors again:
|
I used this script on a freshly installed Windows 10 Enterprise version 2004 build 19041.508. But it shows the following errors even if I have rebooted multiple times.
I heard that windows introduced "Tamper Protection" that makes it hard to turn off windows defender. https://superuser.com/questions/1529000/is-there-any-way-to-turn-off-tamper-protection-using-command-line Is this the reason of the error?
The text was updated successfully, but these errors were encountered: