Skip to content

ElmPlugin.dll

What this program actually does

ElmPlugin.dll is the Event Log Monitor (ELM) plugin. It subscribes to Windows Event Log channels via EvtSubscribe, applies regex-based rule filters from seat config, monitors critical Windows services via a ServiceWatcher, and can trigger session termination or telemetry when security-relevant events match configured rules.

It also integrates with logman for ETW trace control and proxies feature enable/disable via GciPlugin's ElmFeatureControl API. MB endpoint: ElmPlugin. Build: version 2.0 2026-04-07-b253f97.


Architecture / control flow

NvContainerGcis.exe
  └─ ElmPlugin.dll
        ├─ GcisPluginTaskQueue / GSConfigClient
        ├─ PluginStart:
        │     ├─ ServiceWatcher — SCM notifications for configured services
        │     │     └─ RegisterServiceStopNotify, QueryServiceStatus
        │     └─ EvtSubscribe — Windows Event Log subscription
        │           └─ EvtRender → rule filter (regex) → action
        ├─ Session termination hooks
        │     └─ Respects session tearing down / enforcement override
        ├─ logman integration (trace start/stop — inferred from gs2-agent pattern)
        └─ GsecTasTelemetry

Key RTTI/strings: ServiceWatcher, Poco XML types (rule config parsing), EvtSubscribe, EvtRender.


External interfaces

GCIS Service API

MessagePurpose
GCISServiceAPI_GCISRequest_ElmFeatureControlEnable/disable ELM rules at runtime (via GciPlugin)

Windows Event Log (wevtapi)

APIPurpose
EvtSubscribeSubscribe to event channels (Security, System, custom)
EvtRenderRender event XML for rule matching
EvtRenderSuccededWithEmptyBufferEdge-case handling logged as error

Service Control Manager

ComponentPurpose
ServiceWatcherMonitor service stop/start for configured services
OpenSCManagerW, OpenServiceW, QueryServiceStatusSCM access
RegisterServiceStopNotifyAsync service stop notifications

Message Bus

  • Endpoint: ElmPlugin
  • Receives session state changes to arm/disarm rules

Runtime timeline

Time (UTC)EventSource
19:04:52.294Module ElmPlugin v2.0, init OKElmPluginCurrent.log
19:04:52.883Starting ElmPlugin; TAS session initiatedElmPluginCurrent.log
19:04:53.041GcisConfigData not foundFailed to start ElmPluginElmPluginCurrent.log
19:04:53.053Stop: Stopping service watcher (watcher started minimally)ElmPluginCurrent.log
19:04:53.044Mandatory plugin Starting failureNvContainerGcis.log

ServiceWatcher stop path runs even though full EvtSubscribe likely never armed without config.


Failure modes

Error stringMeaning
GSEC_ELM_Error_EmptyConfigNo ELM rules in GcisConfigData
GSEC_ELM_Error_RuleFiltersNotDefinedRule filter section missing
GSEC_ELM_Error_WindowsEventsUndefinedEvent channel list missing
GSEC_ELM_Error_ElmSubscribeEventsFailedEvtSubscribe setup failed
GSEC_ELM_Error_EvtRenderFailedEvent rendering error
GSEC_ELM_Error_FailedToProcessEventRule action pipeline error
GSEC_ELM_Error_StartServiceWatcherFailedSCM watcher init failed
GSEC_ELM_Error_DuplicateServiceRegistrationDetectedConfig lists same service twice
GSEC_ELM_Warning_ServiceDisarmed / ServiceRearmedFeature toggle
GSEC_ELM_Warning_IgnoringSessionTerminationDueToSessionTearingDownSuppress terminate during teardown
GSEC_ELM_Warning_RegexProcesssingFailedRule regex compile/match error
Missing GcisConfigDataPluginStart abort (observed)

Not verified

  • Exact event channels monitored in Production (Security vs Sysmon vs custom).
  • logman trace names and trigger conditions.
  • Whether ELM can terminate sessions autonomously or only signals GciPlugin.
  • Full rule filter XML/JSON schema.

Evidence

  • strings / RTTI on services/GCIS/plugins/ElmPlugin.dll
  • logs/GCIS/ElmPluginCurrent.log, ElmPluginOld.log
  • logs/GCIS/NvContainerGcis.log
  • logs/GSP/GSConfiguratorPluginCurrent.log

admindesk.top — Reversed & documented from Asgard rig backups and GCIS plugin binaries.