
捷维科技 5 月 18 日消息,当地时间 5 月 17 日,Microsoft发布技术公告,旨在帮助企业在 VBscript 全方位弃用之前测试并迁移现有环境中的 VBscript 依靠。

Sysmon(System Monitor)是 Sysinternals 提供的监控工具,支持对.dll加载行为进行细致跟踪。借用其 Event ID 7(Image Load)功能,管理员可以捕捉 vbscript.dll 何时、由什么进程被加载。
配置 Sysmon 以追踪 vbscript.dll,配置示比如下:
Sysmonschemaversion=4.50EventFilteringImageLoadonmatch=includeImageLoadedcondition=containsvbscript.dll/ImageLoaded/ImageLoad/EventFiltering/Sysmon
要应用此配置,第一需要编辑你的 Sysmon 配置文件(一般是 sysmon|config.xml)。
方案2、审察 VBscript 依靠项用 Sysinternals Sysmon 实用程序重新加载。
以管理员权限打开命令提示符并运行:Sysmon64.exe |c sysmon|config.xml
通过运行以下命令验证目前配置:Sysmon64.exe |c
检查以下集中管理地方中的脚本文件:
方案3、全系统扫描.vbs 文件组方案脚本:扫描 //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($pathin$pathsToScan){if(Test|Path$path){Get|ChildItem|Path$path|Filter*.vbs|Recurse|ErrorActionSilentlyContinue|Select|ObjectFullName,LastWriteTime,Length}}$pathsToScan=@(C:/Users,C:/ProgramData,C:/scripts)$logPath=C:/VBSscriptScan/VbsFiles|$(hostname).csv$results=foreach($pathin$pathsToScan){if(Test|Path$path){Get|ChildItem|Path$path|Filter*.vbs|Recurse|ErrorActionSilentlyContinue|Select|ObjectFullName,LastWriteTime,Length}}方案4、扫描自概念 MSI 安装包
比如以下 PowerShell 脚本可剖析 MSI 包中嵌入的 VBscript 自概念动作(Action Type 6、38、50):
Get|ChildItem|PathC:/MSIRepo|Recurse|Filter*.msi|ForEach|Object{$msiPath=$|.FullName$sql=SELECT*FROMCustomAction$installer=New|Object|ComObjectWindowsInstaller.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|eq6|or$actionType|eq38|or$actionType|eq50){Write|Output⚠VBscriptCustomAction:$actionNamein$msiPath}$record=$view.Fetch()}}
后续行动建议
迁移替代策略:参考Microsoft官方文档《VBscript 弃用:时间线与后续步骤》选择现代技术。
主动禁用 VBscript:在确认无依靠后,通过命令禁用:
Dism/Online/Remove|Capability/CapabilityName:VBscript~~~~
影响:禁用后,依靠 VBscript 的进程(如 cscript.exe)将静默失败或显示错误。
Microsoft强调,目前阶段企业应尽快完成测试与迁移,防止将来操作系统默认禁用致使业务中断。
参考资料:
《VBscript deprecation: Detection strategies for Windows | Windows IT Pro Blog》
《VBscript deprecation: Timelines and next steps | Windows IT Pro Blog》



