IT之家Win11VBScript 弃用:时间线与后续步骤VBScript deprecation: Detection strategies for Windows - Windows IT Pro BlogVBScript deprecation: Timelines and next steps | Windows IT Pro Blog 5 月 18 日消息,当地时间 5 月 17 日,微软发布技术公告,旨在帮助企业在 VBScript 全面弃用之前检测并迁移现有环境中的 VBScript 依赖。

IT之家注:VBScript 将在未来的 Windows 版本中默认禁用,目前微软已启动分阶段弃用计划并在 IT之家Win11VBScript 弃用:时间线与后续步骤VBScript deprecation: Detection strategies for Windows - Windows IT Pro BlogVBScript deprecation: Timelines and next steps | Windows IT Pro Blog 24H2 中将 VBScript 转为 FOD 可选功能。


Sysmon(System Monitor)是 Sysinternals 提供的监控工具,支持对 .dll 加载行为进行细致跟踪。借助其 Event ID 7(Image Load)功能,管理员可以捕捉 vbscript.dll 何时、由哪个进程被加载。
配置 Sysmon 以追踪 vbscript.dll,配置示例如下:
<Sysmon schemaversion="4.50"> <EventFiltering> <ImageLoad onmatch="include"> <ImageLoaded condition="contains">vbscript.dll</ImageLoaded> </ImageLoad> </EventFiltering> </Sysmon>
要应用此配置,首先需要编辑您的 Sysmon 配置文件(通常是 sysmon-config.xml)。
使用 Sysinternals Sysmon 实用程序重新加载。
以管理员权限打开命令提示符并运行:Sysmon64.exe -c sysmon-config.xml
通过运行以下命令验证当前配置:Sysmon64.exe -c
检查以下集中管理位置中的脚本文件:
组策略脚本:扫描 \\<domain>\SYSVOL 中的.vbs 文件及对 wscript.exe、cscript.exe 的调用。
计划任务:检查任务命令行的.vbs 执行痕迹。
Intune 部署的 PowerShell 脚本:排查间接调用 VBScript 的情况。
通过 PowerScript 脚本扫描用户及脚本相关目录:
C:\Users\
C:\ProgramData\
C:\Program Files\
C:\Scripts\
C:\Windows\(可选,可能包含干扰文件)
示例 PowerShell 脚本:
$pathsToScan = @("C:\Users", "C:\ProgramData", "C:\Scripts")
$logPath = "C:\VBSScriptScan\VbsFiles_$(hostname).csv"
$results = foreach ($path in $pathsToScan) {
if (Test-Path $path) {
Get-ChildItem -Path $path -Filter *.vbs -Recurse -ErrorAction SilentlyContinue |
Select-Object FullName, LastWriteTime, Length
}
}
$pathsToScan = @("C:\Users", "C:\ProgramData", "C:\Scripts")
$logPath = "C:\VBSScriptScan\VbsFiles_$(hostname).csv"
$results = foreach ($path in $pathsToScan) {
if (Test-Path $path) {
Get-ChildItem -Path $path -Filter *.vbs -Recurse -ErrorAction SilentlyContinue |
Select-Object FullName, LastWriteTime, Length
}
}
例如以下 PowerShell 脚本可分析 MSI 包中嵌入的 VBScript 自定义动作(Action Type 6、38、50):
Get-ChildItem -Path "C:\MSIRepo" -Recurse -Filter *.msi | ForEach-Object {
$msiPath = $_.FullName
$sql = "SELECT * FROM CustomAction"
$installer = New-Object -ComObject WindowsInstaller.Installer
$database = $installer.GetType().InvokeMember("OpenDatabase", "InvokeMethod", $null, $installer, @($msiPath, 0))
$view = $database.OpenView($sql)
$view.Execute()
$record = $view.Fetch()
while ($record -ne $null) {
$actionName = $record.StringData(1)
$actionType = [int]$record.StringData(2)
if ($actionType -eq 6 -or $actionType -eq 38 -or $actionType -eq 50) {
Write-Output "⚠ VBScript Custom Action: $actionName in $msiPath"
}
$record = $view.Fetch()
}
}
后续行动建议
迁移替代方案:参考微软官方文档《IT之家Win11VBScript 弃用:时间线与后续步骤VBScript deprecation: Detection strategies for Windows - Windows IT Pro BlogVBScript deprecation: Timelines and next steps | Windows IT Pro Blog》选择现代技术。
主动禁用 VBScript:在确认无依赖后,通过命令禁用:
Dism /Online /Remove-Capability /CapabilityName:VBSCRIPT~~~~
影响:禁用后,依赖 VBScript 的进程(如 cscript.exe)将静默失败或报错。
微软强调,当前阶段企业应尽快完成检测与迁移,避免未来操作系统默认禁用导致业务中断。
参考资料:
《IT之家Win11VBScript 弃用:时间线与后续步骤VBScript deprecation: Detection strategies for Windows - Windows IT Pro BlogVBScript deprecation: Timelines and next steps | Windows IT Pro Blog》
《IT之家Win11VBScript 弃用:时间线与后续步骤VBScript deprecation: Detection strategies for Windows - Windows IT Pro BlogVBScript deprecation: Timelines and next steps | Windows IT Pro Blog》
广告声明:文内含有的对外跳转链接(包括不限于超链接、二维码、口令等形式),用于传递更多信息,节省甄选时间,结果仅供参考,IT之家所有文章均包含本声明。
来源: TechWeb.com.cn作者:TechWeb.com.cn 【TechWeb】12月8日消息,据报道,澳大利亚快递货运公司Team Global Express订购了36辆沃尔沃电...
今天给各位分享最火的抖音歌曲的知识,其中也会对最火的抖音歌曲2022进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!本文目录一览: 1、抖音最火100首歌曲 2、抖音上最火的...
新酷产品第一时间免费试玩,还有众多优质达人分享独到生活经验,快来新浪众测,体验各领域最前沿、最有趣、最好玩的产品吧~!下载客户端还能获得专享福利哦! 荣耀此前宣布将于 12 月发布荣耀平板 V...
本篇文章给大家谈谈{易七現金網},以及深圳美食厨房刘婷婷对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。 本文目录一览: 1、很想知道非诚勿扰刘婷婷和韩国男友近况如何 2、想吃吗?自己做吧!...
本篇文章给大家谈谈{易七現金網},以及人气美食主持人小美对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。 本文目录一览: 1、2011年2月1日生活时尚的人气美食 2、人气美食主持人小宝哪里...
今天给各位分享亲子餐厅投资大概多少钱的知识,其中也会对亲子餐厅投资大概多少钱一个月进行解释,如果能碰巧解决你现在面临的问题,别忘了关注本站,现在开始吧!本文目录一览: 1、如何开一家餐饮店,需要多少预...