Re: [心得] 勒索病毒对策:简易监控小脚本

楼主: orze04 (orz)   2015-12-11 14:07:07
档案位置
https://drive.google.com/open?id=0B7TH0pBsVfD4TUROdWZVd2o2QzA
使用说明
(1)在C:底下创立资料夹!test
(2)在C:\!test底下创立以下档案,不要空白档
1.jpg
1.pdf
1.xlsx
1.pptx
1.docx
1.txt
(3)再次确认上述六个档案存在
(4)点选monitor2.vbs
增加功能:
1. 多侦测txt, pdf,office系列档案
2. F槽也放一份shutdown.exe(未来才会用到)
未来可能要增加的功能
1. shutdown.exe 找不到或无法执行的例外处理
2. 检查档案hash值
以下是source code
=====================================
WScript.Echo "WARNING! Please copy the file C:\Windows\System32\shutdown.exe
to F:\shutdown.exe"
WScript.Echo "WARNING! Please check these file existed C:\1.jpg, C:\1.pdf,
C:\1.xlsx, C:\1.pptx, C:\1.docx, C:\1.txt"
Set fso = CreateObject("Scripting.FileSystemObject")
Set ws = CreateObject("Wscript.Shell")
Dim honeypotLoca(6)
honeypotLoca(0) = "C:\!test\1.jpg"
honeypotLoca(1) = "C:\!test\1.pdf"
honeypotLoca(2) = "C:\!test\1.xlsx"
honeypotLoca(3) = "C:\!test\1.pptx"
honeypotLoca(4) = "C:\!test\1.docx"
honeypotLoca(5) = "C:\!test\1.txt"
'check exist
Dim b(6)
Do
For count = 0 To 5
If Not fso.FileExists(honeypotLoca(count)) Then
ws.run "shutdown.exe -s -f -t 0" ,vbhide
ws.run "cmd /c F:\shutdown.exe -s -f -t 0" ,vbhide
End If
Next
wscript.sleep 15000
Loop
=====================================
honeypotLoca阵列里路径可以自己调整
我是猜他会C
作者: whitefox (八十萬定存宅男)   2015-12-11 14:35:00
胬胬胬胬
楼主: orze04 (orz)   2015-12-11 14:41:00
那应该是tab啦代换成四个space
作者: abramtw (世界原来是如此耀眼啊)   2015-12-11 16:25:00
用心给推
作者: jackyT (Ubuntu5566)   2015-12-11 20:28:00
用心+备份shutdown给推
作者: yehmd (牧叶 德国队加油)   2015-12-12 09:47:00
这篇改后的do loop的地方好像错了...b参数群没给初始值好像也会无效...
楼主: orze04 (orz)   2015-12-12 14:10:00
我换一个写法好了
作者: skill1095 (skill1095)   2015-12-13 02:24:00

Links booklink

Contact Us: admin [ a t ] ucptt.com