- 1. 登录/显式凭据:4624/4648(Type 3/10 注意)
- 2. 新服务/驱动:7045/7040
- 3. 计划任务执行:TaskScheduler/Operational
- 4. 共享与远程:5140/5145(需开启对象访问审计)
常用示例
常用示例
# 夜间窗口定义
$start = (Get-Date).Date.AddHours(0); $end = (Get-Date).Date.AddHours(6)
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4624,4648; StartTime=$start; EndTime=$end} | Select-Object TimeCreated, Id, @{n='User';e={$_.Properties[5].Value}} | Format-Table -AutoSize
Get-WinEvent -FilterHashtable @{LogName='System'; Id=7045; StartTime=$start} | Select-Object TimeCreated, @{n='Msg';e={($_).Message.Substring(0,[Math]::Min(120,$_.Message.Length))}}先区分“已知运维自动化”(备份、补丁窗口)与未知活动,再决定是否升级安全事件。