04 - Configuracion Inputs WinEventLog Sysmon Perfmon
Configuración desplegada en este PC vía la app
SOC-Windows-Localen el UF. Ruta final:C:\Program Files\SplunkUniversalForwarder\etc\apps\SOC-Windows-Local\local\inputs.conf. Ver archivo completo: Anexo A - inputs.conf.
Filosofía de inputs
Selecciona fuentes útiles para un analista SOC evitando ruido inútil. Índices separados por dominio permiten RBAC y retention policies distintas.
Inputs elegidos
WinEventLog (con renderXml = true)
| Stanza | Index | Por qué |
|---|---|---|
WinEventLog://Security | win_security | Logins (4624/4625), object access, KDC, Process Creation (4688) |
WinEventLog://System | win_system | Servicios, crashes, driver events |
WinEventLog://Application | win_app | Logs de aplicaciones instaladas |
WinEventLog://Setup | win_setup | Instalaciones/desinstalaciones de software |
WinEventLog://Microsoft-Windows-Sysmon/Operational | win_sysmon | Telemetría rica de procesos/red/DNS/file |
WinEventLog://Microsoft-Windows-PowerShell/Operational | win_powershell | Script Block 4104 y Module 4103 |
WinEventLog://Microsoft-Windows-Windows Defender/Operational | win_defender | Detections EIDs 1116/1117 |
WinEventLog://Microsoft-Windows-WMI-Activity/Operational | win_wmi | Persistencia via WMI subscriptions |
WinEventLog://Microsoft-Windows-TerminalServices-LocalSessionManager/Operational | win_rdp | Eventos 21/22 (RDP inbound a este PC) |
WinEventLog://Microsoft-Windows-TaskScheduler/Operational | win_tasks | Persistencia (tareas programadas) |
WinEventLog://Microsoft-Windows-PrintService/Admin | win_print | Anomalías Print Spooler |
Perfmon (muestreo cada 60 s)
| Stanza | Counters | Index |
|---|---|---|
perfmon://CPU | %Processor Time,%User Time,%Privileged Time,%Interrupt Time | win_perfmon |
perfmon://Memory | Available MBytes,Committed Bytes,% Committed Bytes In Use,Pool Paged/Nonpaged Bytes | win_perfmon |
perfmon://Network | Bytes Total/sec,Packets/sec,Packets Received Errors,Output Queue Length | win_perfmon |
perfmon://LogicalDisk | % Free Space,Avg. Disk sec/Transfer,Disk Read/Write Bytes/sec | win_perfmon |
Útiles para detectar:
- Picos de CPU sostenidos (posible cryptominer).
- Spikes de red saliente anómalos (exfiltración / C2).
- Cambios de uso de disco (ransomware activity).
File Integrity Monitoring (monitor://)
| Path | Index | Por qué |
|---|---|---|
C:\Windows\System32\drivers\etc\hosts | win_fim | Hijacking de DNS local |
C:\Windows\System32\drivers\etc\lmhosts | win_fim | Resolución NetBIOS maliciosa |
C:\Windows\System32\GroupPolicy (recursive) | win_fim | Cambios en políticas de grupo locales |
Script win-listen
[script://$SPLUNK_HOME\bin\scripts\win-listen.bat]
disabled = 0
interval = 300
index = win_statusInforma cada 5 min sobre el estado del UF (tiles para health checks).
Settings relevantes
renderXml = true→ eventos en bruto XML enables Splunk TA parsing with full field extraction. Imprescindible para el Splunk Add-on for Windows.checkpointInterval = 5→ checkpoint cada 5 segundos (impide dupes tras restart).evt_resolve_ad_obj = 1→ resuelve SIDs a nombres (mejora filled deuser/domain).start_from = oldestycurrent_only = 0→ história inicial completa (durante el primer arranque trae TODO el registro). Usar con cuidado en producción grande.
Ajustes adicionales recomendados
Subcategory de Process Creation con command line
Ya activado via auditpol + registry (ver 07 - Hardening Logging SOC):
auditpol /set /subcategory:"Process Creation" /success:enable /failure:enable
Recomendado EventID 4688 con CommandLine poblada (preciso el registry AuditProcessCreation\IncludeCommandLine = 1).
LSA / Kerberos (no en este setup, opcional)
Habilitar para靠 lateral move detection:
WinEventLog://Microsoft-Windows-LSA/Operational
WinEventLog://Microsoft-Windows-Kerberos/Operational
Splunk Add-on for Windows (post-install)
Para normalizar (extracción de campos, CIM):
- Descargar Splunk Add-on for Microsoft Windows (TA).
- Instalar en el indexer (
$SPLUNK_HOME\etc\apps\). - Reiniciar Splunkd.
Esto añade props.conf/transforms.conf que mapean WinEventLog:* a CIM datamodels. Sin el TA, los datos llegan pero NO se normalizan.
Volver a: 00 - MOC Monitorización PC Local