04 - Configuracion Inputs WinEventLog Sysmon Perfmon

Configuración desplegada en este PC vía la app SOC-Windows-Local en 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)

StanzaIndexPor qué
WinEventLog://Securitywin_securityLogins (4624/4625), object access, KDC, Process Creation (4688)
WinEventLog://Systemwin_systemServicios, crashes, driver events
WinEventLog://Applicationwin_appLogs de aplicaciones instaladas
WinEventLog://Setupwin_setupInstalaciones/desinstalaciones de software
WinEventLog://Microsoft-Windows-Sysmon/Operationalwin_sysmonTelemetría rica de procesos/red/DNS/file
WinEventLog://Microsoft-Windows-PowerShell/Operationalwin_powershellScript Block 4104 y Module 4103
WinEventLog://Microsoft-Windows-Windows Defender/Operationalwin_defenderDetections EIDs 1116/1117
WinEventLog://Microsoft-Windows-WMI-Activity/Operationalwin_wmiPersistencia via WMI subscriptions
WinEventLog://Microsoft-Windows-TerminalServices-LocalSessionManager/Operationalwin_rdpEventos 21/22 (RDP inbound a este PC)
WinEventLog://Microsoft-Windows-TaskScheduler/Operationalwin_tasksPersistencia (tareas programadas)
WinEventLog://Microsoft-Windows-PrintService/Adminwin_printAnomalías Print Spooler

Perfmon (muestreo cada 60 s)

StanzaCountersIndex
perfmon://CPU%Processor Time,%User Time,%Privileged Time,%Interrupt Timewin_perfmon
perfmon://MemoryAvailable MBytes,Committed Bytes,% Committed Bytes In Use,Pool Paged/Nonpaged Byteswin_perfmon
perfmon://NetworkBytes Total/sec,Packets/sec,Packets Received Errors,Output Queue Lengthwin_perfmon
perfmon://LogicalDisk% Free Space,Avg. Disk sec/Transfer,Disk Read/Write Bytes/secwin_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://)

PathIndexPor qué
C:\Windows\System32\drivers\etc\hostswin_fimHijacking de DNS local
C:\Windows\System32\drivers\etc\lmhostswin_fimResolución NetBIOS maliciosa
C:\Windows\System32\GroupPolicy (recursive)win_fimCambios en políticas de grupo locales

Script win-listen

[script://$SPLUNK_HOME\bin\scripts\win-listen.bat]
disabled = 0
interval = 300
index = win_status

Informa 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 de user / domain).
  • start_from = oldest y current_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):

  1. Descargar Splunk Add-on for Microsoft Windows (TA).
  2. Instalar en el indexer ($SPLUNK_HOME\etc\apps\).
  3. 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