windows主机应急排查
windows应急响应
文件
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
没有签名验证信息的进程
没有描述信息的进程
进程的属主
进程的路径是否合法
CPU或内存资源占用长时间过高的进程
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
开始-设置-控制面板-任务计划
注册表
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList,HKLM\SAM\Domains\Account\
hklm:\Software\Microsoft\Windows\CurrentVersion\policies\system
hklm:\Software\Microsoft\Active Setup\Installed Components
hklm:\Software\Microsoft\Windows\CurrentVersion\App Paths
hklm:\software\microsoft\windows nt\CurrentVersion\winlogon
hklm:\software\microsoft\security center\svc
hkcu:\Software\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths
hkcu:\Software\Microsoft\Windows\CurrentVersion\explorer\RunMru
hklm:\Software\Microsoft\Windows\CurrentVersion\explorer\Startmenu
hklm:\System\CurrentControlSet\Control\Session Manager
hklm:\Software\Microsoft\Windows\CurrentVersion\explorer\ShellFolders
hklm:\Software\Microsoft\Windows\CurrentVersion\ShellExtensions\Approved
hklm:\System\CurrentControlSet\Control\Session Manager\AppCertDlls
hklm:\Software\Classes\exefile\shell\open\command
hklm:\BCD00000000
hklm:\system\currentcontrolset\control\lsa
hklm:\Software \Microsoft\Windows\CurrentVersion\Explorer\BrowserHelper Objects
hklm:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects
hkcu:\Software\Microsoft\Internet Explorer\Extensions
hklm:\Software\Microsoft\Internet Explorer\Extensions
hklm:\Software\Wow6432Node\Microsoft\Internet Explorer\Extensions
HKLM\Software\Microsoft\Windows\CurrentVersion\Run\ HKEY_CLASSES_ROOT\exefile\shell\open\command
服务
services.msc
misc
查看指定时间范围包括上传文件夹的访问请求:
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/瑞星/腾讯管家/金山/火绒
工具篇
2.1 病毒分析
PCHunter:http://www.xuetr.com
Process Explorer:https://docs.microsoft.com/zh-cn/sysinternals/downloads/process-explorer
processhacker:https://processhacker.sourceforge.io/downloads.php
autoruns:https://docs.microsoft.com/en-us/sysinternals/downloads/autoruns
OTL:https://www.bleepingcomputer.com/download/otl/
SysInspector:http://download.eset.com.cn/download/detail/?product=sysinspector
2.2 病毒查杀
卡巴斯基:http://devbuilds.kaspersky-labs.com/devbuilds/KVRT/latest/full/KVRT.exe(推荐理由:绿色版、最新病毒库)
大蜘蛛:http://free.drweb.ru/download+cureit+free(推荐理由:扫描快、一次下载只能用1周,更新病毒库)
火绒安全软件:https://www.huorong.cn
360杀毒:http://sd.360.cn/download_center.html
2.3 病毒动态
CVERC-国家计算机病毒应急处理中心:http://www.cverc.org.cn
微步在线威胁情报社区:https://x.threatbook.cn
火绒安全论坛:http://bbs.huorong.cn/forum-59-1.html
爱毒霸社区:http://bbs.duba.net
腾讯电脑管家:http://bbs.guanjia.qq.com/forum-2-1.html
2.4 在线病毒扫描网站
http://www.virscan.org//多引擎在线病毒扫描网 v1.02,当前支持 41 款杀毒引擎
https://habo.qq.com//腾讯哈勃分析系统
https://virusscan.jotti.org//Jotti恶意软件扫描系统
http://www.scanvir.com//针对计算机病毒、手机病毒、可疑文件等进行检测分析
2.5 webshell查杀
D盾_Web查杀:http://www.d99net.net/index.asp
河马webshell查杀:http://www.shellpub.com
深信服Webshell网站后门检测工具:http://edr.sangfor.com.cn/backdoor_detection.html