windows server 應急響應查表
日志審計
查詢安全日志: Get-WinEvent -FilterHashtable @{LogName='Security'}
指定id查詢: Get-WinEvent -LogName Microsoft-Windows-PowerShell/Operational | Where-Object {$_.ID -eq "4100" -or $_.ID -eq "4104"}
指定時間查詢:
$StartTime=Get-Date -Year 2017 -Month 1 -Day 1 -Hour 15 -Minute 30$EndTime=Get-Date -Year 2017 -Month 2 -Day 15 -Hour 20 -Minute 00
Get-WinEvent -FilterHashtable @{LogName='System';StartTime=$StartTime;EndTime=$EndTime}
GUI: eventvwr.msc
重要日志id:
event iddescription4624登陸成功4625登陸失敗4720創建用戶4726刪除用戶4738用戶賬戶更改4698創建計劃任務4700啟用計劃任務5025關閉防火墻5030防火墻無法啟動7045創建服務7030創建服務錯誤18456mssql登陸失敗
檢查賬戶
打開”本地和用戶組”: lusrmgr.msc
列出當前所有用戶: net user , wmic UserAccount get
用命令行無法列出隱藏用戶,得在GUI界面看.或注冊表: HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account
刪除用戶: net user test$ /del
網絡連接
查看連接和監聽的端口: netstat -anob
路由: netstat -rn
防火墻: netsh firewall show all
查到可疑鏈接的pid,再查進程.
可疑鏈接的ip可疑通過微步威脅情報查詢.
進程分析
導出進程參數: wmic process get caption,commandline /value >> tmp.txt
指定進程名稱信息: wmic process | findstr "name" >> proc.csv
查看系統占用: Get-Process
查看網絡連接: Get-NetTCPConnection
查看服務與進程對應關系: tasklist /svc
查看進程與dll關系: tasklist -M
工具: SysinternalsSuite的procexp
開機自啟
注冊表開機自啟位置:
HKLM\Software\Microsoft\Windows\CurrentVersion\RunonceHKLM\Software\Microsoft\Windows\CurrentVersion\policies\Explorer\RunHKLM\Software\Microsoft\Windows\CurrentVersion\RunHKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\RunHKCU\Software\Microsoft\Windows\CurrentVersion\RunHKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce(ProfilePath)\Start Menu\Programs\Startup
SysinternalsSuite 工具集的 Autoruns
GUI: gpedit.msc
查看服務
查看服務: Get-Service
GUI: services.msc
計劃任務
C:\Windows\System32\Tasks\C:\Windows\SysWOW64\Tasks\C:\Windows\tasks\*.job(指文件)
命令: schtasks
(若報錯運行chcp 437)
GUI: taskschd.msc
其他工具
火絨劍
參考鏈接:
Windows 系統安全事件應急響應
-https://xz.aliyun.com/t/2524
Sysinternals Utilities Index
-https://docs.microsoft.com/en-us/sysinternals/downloads/
滲透技巧-Windows系統的帳戶隱藏
-https://3gstudent.github.io/3gstudent.github.io/%E6%B8%97%E9%80%8F%E6%8A%80%E5%B7%A7-Windows%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%B8%90%E6%88%B7%E9%9A%90%E8%97%8F/