溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

如何使用VBS實現(xiàn)病毒專殺功能

發(fā)布時間:2021-10-12 10:13:52 來源:億速云 閱讀:182 作者:小新 欄目:開發(fā)技術

小編給大家分享一下如何使用VBS實現(xiàn)病毒專殺功能,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

 代碼如下:


'查看更多關于此病毒專殺模板信息:http://hi.baidu.com/ycosxhack/modify/blog/36569f51dbd0cc8e8c5430d8

'-----------------病毒專殺VBS模板源碼開始-----------------
on error resume next
msgbox "本專殺有ycosxhack提供http://hi.baidu.com/ycosxhack!",64,"xxx病毒專殺"
'本專殺模板有ycosxhack(余弦函數(shù))制作,我的博客:http://hi.baidu.com/ycosxhack,歡迎討論。

'-----------------病毒進程結束模塊開始-----------------
set w=getobject("winmgmts:")
set p=w.execquery("select * from win32_process where name='rundll.exe'") 
for each i in p
i.terminate 
next
'-----------------病毒進程結束模塊終止-----------------

'-----------------插入型dll病毒釋放模塊開始-----------------
set WSHShell=wscript.createobject("wscript.shell")
WSHShell.run("ps /e * hook.dll"),0,true
'請將第三方程序ps.exe與本專殺放在同一目錄下
'-----------------插入型dll病毒釋放模塊終止-----------------

'-----------------病毒文件刪除模塊開始-----------------
set fso=createobject("scripting.filesystemobject")
set del=wscript.createobject("wscript.shell")
d1=del.ExpandEnvironmentStrings("%temp%\rundll.exe")
d2=del.ExpandEnvironmentStrings("%SystemRoot%\rundll86.exe")
d3=del.ExpandEnvironmentStrings("%SystemRoot%\system32\rundll86.exe")
set v1=fso.getfile(d1)
set v2=fso.getfile(d2)
set v3=fso.getfile(d3)
set v4=fso.getfile("d:\virus\virus.exe") '沒涉及到環(huán)境變量的可以直接這樣寫。
v1.attributes=0
v2.attributes=0
v3.attributes=0
v4.attributes=0
v1.delete
v2.delete
v3.delete
v4.delete
'-----------------病毒文件刪除模塊終止-----------------

'-----------------遍歷刪除各盤符根目錄下病毒文件模塊開始-----------------
set fso=createobject("scripting.filesystemobject")
set drvs=fso.drives
for each drv in drvs
if drv.drivetype=1 or drv.drivetype=2 or drv.drivetype=3 or drv.drivetype=4 then
set w=fso.getfile(drv.driveletter&":\rundll.exe")
w.attributes=0
w.delete
set u=fso.getfile(drv.driveletter&":\autorun.inf")
u.attributes=0
u.delete
end if
next
'-----------------遍歷刪除各盤符根目錄下病毒文件模塊終止-----------------

'-----------------注冊表操作模塊開始-----------------
set reg=wscript.createobject("wscript.shell")
reg.regwrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit", fso.GetSpecialFolder(1)&"\userinit.exe,","REG_SZ"
reg.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRegistryTools",0,"REG_DWORD"
reg.regdelete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoFolderOptions"
'-----------------注冊表操作模塊終止-----------------

'-----------------系統(tǒng)文件恢復模塊開始-----------------
set fso=createobject("scripting.filesystemobject")
fso.getfile("rundll32.exe").copy("c:\windows\system32\rundll32.exe")
fso.getfile("rundll32.exe").copy("C:\WINDOWS\system32\dllcache\rundll32.exe")
'-----------------系統(tǒng)文件修復模塊終止-----------------

'-----------------HOST文件修復模塊開始-----------------
set fso=createobject("scripting.filesystemobject")
set re=fso.OpenTextFile("C:\WINDOWS\system32\drivers\etc\hosts",2,0)
re.Writeline "127.0.0.1       localhost"
re.Writeline "127.0.0.1       www.你要屏蔽的惡意網(wǎng)址或IP.com"
re.Close
set re=nothing
'-----------------HOST文件修復模塊終止-----------------

'-----------------Autorun免疫模塊開始-----------------
set fso=createobject("scripting.filesystemobject")
set drvs=fso.drives
for each drv in drvs
if drv.drivetype=1 or drv.drivetype=2 or drv.drivetype=3 or drv.drivetype=4 then
fso.createfolder(drv.driveletter&":\autorun.inf")
fso.createfolder(drv.driveletter&":\autorun.inf\免疫文件夾..\")
set fl=fso.getfolder(drv.driveletter&":\autorun.inf")
fl.attributes=3
end if
next
'-----------------Autorun免疫模塊終止-----------------

'-----------------ARP病毒欺騙--客戶端免疫模塊開始-----------------
set WshShell=wscript.createobject("wscript.shell")
WshShell.run "arp -d",0
WshShell.run "arp -s 202.4.139.1 00-07-ec-23-f8-0a",0,true
'-----------------ARP病毒欺騙--客戶端免疫模塊終止-----------------

set fso=nothing
msgbox "病毒清除成功,請重啟電腦!",64,"xxx病毒專殺"
'-----------------病毒專殺VBS模板源碼終止-----------------

以上是“如何使用VBS實現(xiàn)病毒專殺功能”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學習更多知識,歡迎關注億速云行業(yè)資訊頻道!

向AI問一下細節(jié)

免責聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內(nèi)容。

vbs
AI