Using dnot.sh to Replace Windows Defender
dnot.sh stuffs a fake AV signature into Security Center, and Defender obediently clocks out—at least as far as the monitoring UI is concerned. In practice you still have to run extra-strip.bat to actually turn it off; both steps are indispensable, which is honestly a bit of a hassle. Once it's done you're running naked, so don't touch this if you're faint of heart.
目录6 个章节
Preface
Windows Defender has basically become a street rat that everybody shouts to beat. After buying a new computer or reinstalling the system, the first thing to do is turn off this piece of junk.
Its protection capabilities aren't actually bad, but in a development environment, these situations often occur:
- Scanning large amounts of source code, dependencies, and build artifacts
- Occupying disk IO and CPU
- False-positiving some development tools, debugging tools, and KMS tools
- Automatically quarantining files
- Even when you yourself know the files are fine, you still have to restore them over and over
But this thing is getting harder and harder to turn off now, unless you install a proper antivirus, such as Huorong, which has a relatively good reputation.
I previously never really wanted to install third-party antivirus software. Even the most lightweight antivirus still takes up resources; I still prefer a clean system.
Recently I tried using dnot.sh (defendnot) to replace Windows Defender.
Project URL:
https://github.com/es3n1n/defendnot
What Is dnot.sh?
Project URL: https://github.com/es3n1n/defendnot
dnot.sh is not a real antivirus.
Its core principle is to reverse-engineer Windows Security Center, that is, the related WSC interfaces, and register itself as a third-party antivirus.
Under normal circumstances, when Windows detects a third-party antivirus, Microsoft Defender will exit active protection mode.
After installation, you can see this in Windows Security Center:

In other words, Windows already believes there is a third-party antivirus on the system.
Installing dnot.sh
Go directly to: https://dnot.sh/
Just follow the project's instructions to install.
I'll also copy the official installation instructions here
# Example 1: Basic installation
irm https://dnot.sh/ | iex
# Example 2: With custom AV name and firewall
& ([ScriptBlock]::Create((irm https://dnot.sh/))) --name "Custom AV name" --firewall
# Example 3: Without allocating console
& ([ScriptBlock]::Create((irm https://dnot.sh/))) --silent
# Example 4: Run once, without allocating console
& ([ScriptBlock]::Create((irm https://dnot.sh/))) --silent --disable-autorun
# Example 5: Uninstall
& ([ScriptBlock]::Create((irm https://dnot.sh/))) --disable
After installation, you can confirm in Windows Security Center whether dnot.sh has been successfully registered.
However, there is a pitfall here.
Windows Security Center showing that dnot.sh is enabled does not mean Defender has necessarily actually stopped running.
I ran into this situation right after I first installed it.
You can use PowerShell to check Defender status:
Get-MpComputerStatus | Select-Object `
AMRunningMode,
AMServiceEnabled,
AntivirusEnabled,
RealTimeProtectionEnabled,
BehaviorMonitorEnabled,
IoavProtectionEnabled
The first time I checked I got:
AMRunningMode : Normal
AMServiceEnabled : True
AntivirusEnabled : True
RealTimeProtectionEnabled : True
BehaviorMonitorEnabled : True
IoavProtectionEnabled : True
Although Windows Security Center already showed dnot.sh, Defender was in fact still fully running.
This also explains why it would still scan and quarantine files.
Using extra-strip.bat
The defendnot project also provides:
extra-strip.bat
It is used to further disable Defender-related components, including real-time monitoring, behavior monitoring, and other features.
Run extra-strip.bat and then restart the system.
Then execute again:
Get-MpComputerStatus | Select-Object `
AMRunningMode,
AMServiceEnabled,
AntivirusEnabled,
RealTimeProtectionEnabled,
BehaviorMonitorEnabled,
IoavProtectionEnabled
This time the result became:
AMRunningMode : Not running
AMServiceEnabled : False
AntivirusEnabled : False
RealTimeProtectionEnabled : False
BehaviorMonitorEnabled : False
IoavProtectionEnabled : False
This is what indicates that Defender has truly stopped running.
So from actual use, it can be simply understood as:
dnot.sh
↓
向 Windows Security Center 注册第三方 AV
extra-strip.bat
↓
进一步关闭 Defender
最终结果
↓
Windows Security Center 显示 dnot.sh
Defender 不再运行
Final Result
After completing the configuration, Windows Security Center will still believe the system has security software, so it will not keep prompting “no antivirus installed.”
At the same time, Defender itself no longer performs real-time scanning.
For people who do not want to install third-party antivirus software, and also do not want Defender constantly scanning their development environment, this approach is relatively lightweight.
However, it should be noted: dnot.sh itself has no virus-scanning capability.
In other words, after using this approach, it is essentially equivalent to the system running naked.
Therefore, whether it is suitable to use depends on your own usage habits and security needs.
For ordinary users, I do not recommend turning off Defender.
But if you are fairly clear about the sources of the programs you run, and can also judge the safety of executables, scripts, and development tools yourself, then dnot.sh counts as a relatively clean solution.
Summary
The whole process is actually quite simple:
- Install dnot.sh
- Confirm that Windows Security Center has recognized dnot.sh
- Use Get-MpComputerStatus to check Defender status
- If it still shows Normal, run extra-strip.bat
- Restart Windows
- Confirm again that AMRunningMode = Not running
At least on my current Windows 11 machine, I was ultimately able to replace Windows Defender with dnot.sh.
_EOF_
Using dnot.sh to Replace Windows Defender
- 本文作者:
- 程序设计实验室
- 版权声明:
- 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
相关文章
在 Windows11 上启用 ssh-agent
微软的坑真多!!!
2026-08-25 · Windows · 约 1 分钟
修复winget命令找不到的问题
微软官方包管理器winget在Windows 10 1809以上版本中,用于快速安装、更新和管理应用程序。本文介绍了因系统环境变化导致winget命令失效的问题,分析了可能原因,并提供了解决方案及预防措施,包括修复命令、定期更新检查、备份环境变量等。
2025-04-04 · Windows · 约 1 分钟
Windows10-快捷键大全,整理+排版
前言 偶然在微软官网看到的,整理了一下,非常全面。不只有Windows10能用,大部分快捷键在7/8/8.1里都是通用的。 发现这东西对提高效率帮助很大啊,下面是整理之后的。 复制、粘贴及其他常规的键盘快捷方式 | 按键 | 操作
2021-12-18 · Windows · 约 1 分钟
在 Windows 10 上实现免密码 SSH 登录
在日常开发中,SSH(Secure Shell)作为一种安全的远程登录协议,广泛用于 Linux 和 Windows 系统之间的连接。为了提高效率,我们可以通过配置免密码登录,省去每次连接时输入密码的繁琐过程。
2026-08-25 · Windows · 约 1 分钟
讨论
共 0 条加载评论中…