| 事件 | 4104(PowerShell/Operational 通道) |
|---|---|
| 姊妹事件 | 4103 模块日志、400 引擎启动 |
| 前提 | ScriptBlockLogging 已启用 |
| 用途 | 还原混淆/无文件攻击的实际代码 |
查询脚本块与检查策略
查询脚本块与检查策略
Get-WinEvent -LogName 'Microsoft-Windows-PowerShell/Operational' -MaxEvents 200 -ErrorAction SilentlyContinue | Where-Object { $_.Id -eq 4104 } | Select-Object -First 10 TimeCreated, Message | Format-List
Get-ItemProperty 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\PowerShell\ScriptBlockLogging' -ErrorAction SilentlyContinue没启用策略就查不到 4104;这类日志属于「事前准备型」证据,事后无法补录。