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之家所有文章均包含本声明。
1大理旅游最佳时间是春季到夏季大理处于云南,冬暖夏凉,是个非常适宜居住的地方,大理三月好风光,所以在春季,无论是前往大理古城,或是登苍山游洱海,都再适合不过了2大理最佳旅游景点推荐苍山苍山,又名点。...
新酷产品第一时间免费试玩,还有众多优质达人分享独到生活经验,快来新浪众测,体验各领域最前沿、最有趣、最好玩的产品吧~!下载客户端还能获得专享福利哦! 高通、三星之间的关系可以说是非常特殊:高通...
新华社北京12月7日电 外交部发言人毛宁7日宣布:国务院总理李克强将于12月8日至9日在安徽省黄山市与世界银行行长马尔帕斯、国际货币基金组织总裁格奥尔基耶娃、世界贸易组织总干事伊维拉、国际劳工组...
而近期上映的烈火骑士烈火斩亿冰雪全爆和蜀道轮回都属于不氪金手游,深受零氪玩家喜欢吃货大食堂汉化版日式餐厅CafeteriaNipponica是Kairosoft开罗公司最新推出的一款饭餐馆题材的模拟经...
本篇文章给大家谈谈{易七現金網},以及浙江省最值得去的景点对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。 本文目录一览: 1、杭州旅游必去的十大景点有哪些? 2、浙江丽水旅游必去十大景点...
每经记者 裴健如 每经编辑 孙磊 12月8日,《每日经济新闻》记者获悉,2023年,宝马集团将在全品牌、全车系掀起新的电动攻势,为中国市场客户呈现11款纯电动产品。自2023年起,宝马还...