Skip to content

feat(soc): every Windows agent reads the Sysmon channel (#1035) - #1036

Merged
Gerrrt merged 1 commit into
mainfrom
gerrrt/wazuh-sysmon-channel-1035
Oct 7, 2026
Merged

Gerrrt merged 1 commit into
mainfrom
gerrrt/wazuh-sysmon-channel-1035

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Refs #1035. This is authored ahead of the proof. #1035 closes once a Sysmon event from a domain guest shows up as an alert on odin, and that has to wait for #448's rebuild to bring the six back.

What

  • stacks/soc/wazuh/manager/shared/default/agent.conf is the default group's shared agent config. Under <agent_config os="Windows"> it adds one eventchannel <localfile> for Microsoft-Windows-Sysmon/Operational.
    • It is mounted read-only at /wazuh-config-mount/etc/shared/default/agent.conf. That is the image's own mechanism: cp -r over /var/ossec on every start, the same way ossec.conf arrives. Copying onto the existing placeholder keeps its wazuh:wazuh 0660.
    • Agents pull a changed shared file by themselves and restart to apply it, so ansible/roles/soc_agents does not change. A rebuilt guest gets it when it enrols.
  • stacks/scratch mounts the same file, so a Windows agent enrolled there reads Sysmon as it would on odin.
  • Docs:
    • build-the-soc-guest.md §11 says what each agent reads, and how to check an agent is synced (agent_groups -S -i <id>) and that Sysmon alerts arrive (rule.groups: sysmon).
    • The soc README's file tree and the changelog are updated.
  • ADR-0080 gets a [!NOTE]. It had said Wazuh reading the channel "belongs to Run Wazuh on Saruman — the heaviest component in ADR-0007 #266"; Run Wazuh on Saruman — the heaviest component in ADR-0007 #266 was running Wazuh, and it was already closed. The same wrong reference in the role's comment and in the lab runbook is corrected in place.

Read on odin before writing it (2026-10-07)

  • Wazuh 4.14.8 ships the Sysmon rules: 0595-win-sysmon_rules.xml, plus 0800–0950 for events 1, 3, 7, 8, 10, 11, 13 and 20.
  • shared/default/agent.conf was upstream's empty placeholder.
  • verify-agent-conf -f on this file, inside the running manager: OK.

Not done here: deploy and proof

Checks run locally

  • yamllint, ansible-lint, editorconfig-checker and markdownlint pass;
  • check_docs.py passes;
  • check_compose_health.py passes on soc and --cross-stack;
  • check_image_pins.py passes;
  • check_close_keywords.py passes on the body and the commit.

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The shared configuration, mounts, and documentation are consistent, while deployment proof is explicitly deferred without closing the tracking issue.

0 open findings

What changed in this PR

Adds centralized Sysmon event collection for all default-group Windows Wazuh agents.

Changes:

  • Adds and mounts a shared Windows agent.conf in SOC and scratch stacks.
  • Documents synchronization and alert verification.
  • Corrects historical issue references while preserving ADR history.
File Description
stacks/​soc/​wazuh/​manager/​shared/​default/​agent.conf Collects the Sysmon event channel.
stacks/​soc/​README.md Documents the shared configuration file.
stacks/​soc/​compose.yaml Mounts the configuration into Wazuh.
stacks/​scratch/​compose.yaml Reuses the configuration in scratch.
docs/​runbooks/​build-the-soc-guest.md Documents synchronization and alert checks.
docs/​runbooks/​build-the-lab-domain.md Records that Wazuh now reads Sysmon.
docs/​changelog.md Adds the dated implementation record.
docs/​adr/​0080-record-the-lab-domain-with-sysmon-and-capture-on-demand-with-pktmon.md Adds a historical correction note.
ansible/​roles/​sysmon/​defaults/​main.yml Updates the channel-retention comment.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

The default group's shared agent.conf, mounted into the manager through
/wazuh-config-mount as ossec.conf already is, adds an eventchannel
localfile for Microsoft-Windows-Sysmon/Operational to Windows agents.
The manager's ruleset already decodes it; the MSI's ossec.conf never
collected it. stacks/scratch mounts the same file.

ADR-0080 gets a note: it said this belonged to #266, which was the
Wazuh build and is closed. The role comment and the lab runbook are
corrected in place.

Refs #1035

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt force-pushed the gerrrt/wazuh-sysmon-channel-1035 branch from 572856c to 696b1fe Compare October 7, 2026 17:01
@Gerrrt
Gerrrt enabled auto-merge (squash) October 7, 2026 17:02
@Gerrrt
Gerrrt merged commit c76095d into main Oct 7, 2026
8 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/wazuh-sysmon-channel-1035 branch October 7, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants