首页 > 系统相关 >Windows系统排查

Windows系统排查

时间:2023-03-28 14:34:17浏览次数:47  
标签:Windows 系统 排查 wmic Message where 日志

排查文件

C:\Documents and Settings\Administrator\Recent
C:\Documents and Settings\Default User\Recent
%UserProfile%\Recent
文件日期、新增文件、可疑/异常文件、最近使用文件、浏览器下载文件
下载目录
回收站文件
程序临时文件
历史文件记录
应用程序打开历史
搜索历史
快捷方式(LNK)
c:\windows\temp
Window 2003 C:\Documents and Settings
Window 2008R2 C:\Users
Temp/tmp目录
开始-运行,输入%UserProfile%\Recent
时间排序文件

排查日志

开审核策略
系统日志,程序日志,安全日志
eventvwr.msc
1)服务器日志:
FTP连接日志和HTTPD事务日志:%systemroot% \system32\LogFiles\
IIS日志默认存放在System32\LogFiles目录下,使用W3C扩展格式

2)操作系统日志:
登录成功的所有事件:
LogParser.exe -i:EVT –o:DATAGRID “SELECT * FROM c:\Security.evtx where EventID=4624″

指定登录时间范围的事件:
LogParser.exe -i:EVT –o:DATAGRID “SELECT * FROM c:\Security.evtx where TimeGenerated>’2018-06-19 23:32:11′ and TimeGenerated<’2018-06-20 23:34:00′ and EventID=4624″

提取登录成功的用户名和IP:
LogParser.exe -i:EVT –o:DATAGRID “SELECT EXTRACT_TOKEN(Message,13,’ ‘) as EventType,TimeGenerated as LoginTime,EXTRACT_TOKEN(Strings,5,’|') as Username,EXTRACT_TOKEN(Message,38,’ ‘) as Loginip FROM c:\Security.evtx where EventID=4624″

登录失败的所有事件:
LogParser.exe -i:EVT –o:DATAGRID “SELECT * FROM c:\Security.evtx where EventID=4625″

提取登录失败用户名进行聚合统计:
LogParser.exe -i:EVT “SELECT EXTRACT_TOKEN(Message,13,’ ‘) as EventType,EXTRACT_TOKEN(Message,19,’ ‘) as user,count(EXTRACT_TOKEN(Message,19,’ ‘)) as Times,EXTRACT_TOKEN(Message,39,’ ‘) as Loginip FROM c:\Security.evtx where EventID=4625 GROUP BY Message”

系统历史开关机记录:
LogParser.exe -i:EVT –o:DATAGRID “SELECT TimeGenerated,EventID,Message FROM c:\System.evtx where EventID=6005 or EventID=6006″

排查用户

新增用户
弱口令
管理员对应键值
lusrmgr.msc 查看账户变化
net user 列出当前登录账户
wmic UserAccount get 列出当前系统所有账户
C:>net localgroup administrators
隐藏/克隆帐号:
LD_check
注册表-管理员键值:
HKEY_LOCAL_MACHINE/SAM/SAM/Domains/Account/Users
D盾查杀
日志-登录时间/用户名

排查进程

tasklist /svc | findstr pid
netstat -ano
tasklist /svc
findstr
wmic process | find "Proccess Id" > proc.csv
Get-WmiObject -Class Win32_Process
Get-WmiObject -Query "select * from win32_service where name='WinRM'" -ComputerName Server01, Server02 | Format-List -Property PSComputerName, Name, ExitCode, Name, ProcessID,StartMode, State, Status
msinfo32
wmic process get caption,commandline /value
wmic process where caption=”svchost.exe” get caption,commandline /value
wmic service get name,pathname,processid,startname,status,state /value
wmic process get CreationDate,name,processid,commandline,ExecutablePath /value
wmic process get name,processid,executablepath| findstr "7766"

排查端口

netstat -ano
CLOSED:无连接活动或正在进行
LISTEN:监听中等待连接
SYN_RECV:服务端接收了SYN
SYN_SENT:请求连接等待确认
ESTABLISHED:连接建立数据传输
FIN_WAIT1:请求中止连接,等待对方FIN
FIN_WAIT2:同意中止,请稍候
ITMED_WAIT:等待所有分组死掉
CLOSING:两边同时尝试关闭
TIME_WAIT:另一边已初始化一个释放
LAST_ACK:等待原来的发向远程TCP的连接中断请求的确认
CLOSE-WAIT:等待关闭连接

排查自启动

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Runonce
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\policies\Explorer\Run
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
HKLM\Software\Microsoft\Windows\CurrentVersion\RunonceEx
(ProfilePath)\Start Menu\Programs\Startup 启动项
msconfig 启动选项卡
gpedit.msc 组策略编辑器
开始>所有程序>启动
msconfig-启动

排查计划任务

C:\Windows\System32\Tasks
C:\Windows\SysWOW64\Tasks
C:\Windows\tasks
schtasks
taskschd.msc
at
开始-设置-控制面板-任务计划

排查其他内容

查看指定时间范围包括上传文件夹的访问请求:
findstr /s /m /I “UploadFiles” *.log
关键信息是x.js
findstr /s /m /I “x.js” *.asp
根据关键字搜索:
for /r d:\ %i in (shell.asp) do @echo %i
set
systeminfo
((?:(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))).){3}(?:25[0-5]|2[0-4]\d|((1\d{2})|([1-9]?\d))))
安装安全软件:360/小A/瑞星/腾讯管家/金山/火绒

标签:Windows,系统,排查,wmic,Message,where,日志
From: https://www.cnblogs.com/KAKSKY/p/17265043.html

相关文章