Windows Web 服务器的日志、审计与 SIEM
收集 IIS/Nginx 访问日志、Windows 安全事件和应用日志,校准时间/保留,并只对有意义的事件告警。
测试环境Standard / Datacenter · 版本号 26100.33650 · x64
E1- 版本号
- 26100.33650
- 版本
- Standard / Datacenter
- 架构
- x64
- 支持
- 文档(E1)
- 证据
- E1官方文档
- 核验日期
- 2026-10-29
- 页面类型
- 方法
收集四路:
- Web 访问 — IIS W3C / Nginx access。
- Web 错误 — IIS failed request tracing / Nginx error。
- Windows — Security、System、Application。
- 应用 — stdout/stderr、结构化 JSON。
外送;本机日志随主机一起消失。
- 带时区的时间、服务器、站点/host、客户端 IP、方法、路径、状态、字节、延迟;
- 认证用户(安全前提下)、UA;
- request id/关联 id。
不要记录密码、token、完整 cookie、卡数据或敏感查询串。在应用/代理脱敏。
默认 C:\inetpub\logs\LogFiles\W3SVC<id>\。设保留、移出系统盘,500 开失败请求跟踪。IIS 是 W3C 文本,字段要显式解析。
log_format main '$remote_addr - $host [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" "$http_user_agent" ' 'rt=$request_time uct=$upstream_connect_time urt=$upstream_response_time';access_log C:/nginx/logs/access.log main;error_log C:/nginx/logs/error.log warn;真实客户端 IP 只信代理;否则 XFF 可伪造。
Windows 审计
Section titled “Windows 审计”至少开:
- 登录成功/失败;
- 账户管理;
- 进程创建(能承受量才开);
- 服务安装/变更;
- PowerShell script block(合适时)。
用 Windows Event Forwarding 或 agent 转发。域控/PAW 路径与 Web 层分开。
SIEM/告警
Section titled “SIEM/告警”有用告警:
- 单 IP 的 401/403/404 激增;
- 部署后 500 激增;
- Web 服务器出现新服务/进程;
- IIS 应用池崩溃循环;
- 证书 14 天内到期;
- 日志/临时盘满;
- Web 层向异常主机外连。
Get-WinEvent -LogName Security -MaxEvents 5Get-Content C:\inetpub\logs\LogFiles\W3SVC2\*.log -Tail 5确认 SIEM 里出现同一事件,时区和字段正确。
E1。实验室有 IIS 日志和 Windows 事件,但没有集中 SIEM/转发器。流和告警是 Server 2025 的生产设计。