清理时间痕迹
伪造文件修改时间
1 | Function edit_time($path){$date1 =Get-ChildItem | |
伪造日志时间
使用eventcreate 详见下。
清理用户痕迹
清理3389痕迹
清理操作痕迹
日志相关知识
产生流程
svchost.exe
(svchost.exe有些专门记录用于记录日志的线程启动日志记录功能)内存堆
(记录的操作会缓存为一段内存内容)wevtutil.exe
(将内存内容通过wevtutil.exe解析为xml文档)日志
(将xml转换为可读的日志)
日志类型
###### Security
位置 :
%SystemRoot%\System32\Winevt\Logs\Security.evtx
安全相关的事件,如 用户权限变更登录、注销,文件/文件夹访问
System
位置: %SystemRoot%\System32\Winevt\Logs\System.evtx
系统进程、设备、磁盘活动等
Application
位置:
%SystemRoot%\System32\Winevt\Logs\Application.evtx
包含操作系统安装的应用程序软件相关的事件
应用程序及服务日志
远程桌面客户端连接、无线网络、有线网路、设备安装等相关日志。
查看日志
eventvwr
伪造日志
eventcreate
1 | eventcreate -l system -so administrator -t warning -d "this is a test" -id 500 |
日志清理
- 1.查看事件查看器----手动清理
- 2.cmd命令删除日志
1 | wevtutil el 列出系统中所有日志名称 |
凡是操作都会留下痕迹,哪怕是删除日志,也会留下一条删除日志的日志
- 3.powershell命令删除
1 | PowerShell -Command "& {Clear-Eventlog -Log Application,System,Security}" |
- 4.msf删除日志
meterpreter > clearev
- 5.单条日志的清理
见下篇,主要参考三好学生大佬的文章[https://3gstudent.github.io/%E6%B8%97%E9%80%8F%E6%8A%80%E5%B7%A7-Windows%E5%8D%95%E6%9D%A1%E6%97%A5%E5%BF%97%E7%9A%84%E5%88%A0%E9%99%A4]~
停止记录日志
基于powershell
项目地址 https://github.com/hlldz/Phant0m 会直接杀掉线程
1 | #修改powershell权限 |
基于C
项目地址 https://github.com/QAX-A-Team/EventCleaner 相比上面 这个可以暂停日志记录线程 也可以恢复线程
1 | #暂停线程 |
文件的覆写删除
1 | cipher /W:D:\test |