Repository navigation
Description
Split out of #101, which named
it directly: "Wazuh in particular is not a small thing to run — it is the
heaviest component in the ADR by a wide margin."
ADR-0007 puts Wazuh on Saruman as part of the defended estate: the thing that
turns the Windows domain from a set of VMs into something that reports what
happened to it.
Blocked behind the domain — an agentless Wazuh has nothing to say.
Why it gets its own issue rather than a line in the umbrella
Wazuh is three services (indexer, server, dashboard), and the indexer is
OpenSearch. Against ADR-0007's stated constraint — "128 GB and 48 threads
against a single mirrored pair of 7.2K disks. The fleet is sized against
spindles, not RAM" — the indexer is the single component in #101 most likely
to be what actually runs out. It is also the one whose default sizing guidance
assumes hardware this host does not have.
Worth deciding before starting
- Retention and shard sizing, from the spindles rather than from the
defaults. - Whether it lands in
stacks/lab/or beside it. ADR-0004 says one compose
stack per host, and the lab guest is one host — which argues for one stack.
Against: the lab observability stack is four small services and Wazuh is an
OpenSearch cluster, andmake downtaking out both is a worse blast radius
than the ADR was written to consider. Decide it explicitly; do not let it be
decided by whoever writes the compose file first. - Its relationship to the lab's Loki. Wazuh has its own store and its own
dashboard. Two log stores in one lab, each with a UI, is either sensible
division or duplicated upkeep, and which one depends on whether anything ever
queries across them. - Whether the guest can carry it at all, or whether Wazuh wants its own.
Not in scope
Sending anything to 10.0.99.20. Lab telemetry stays in the lab (ADR-0007);
the hypervisor's own agent is the only exception and it predates this (#88).
Corrected 2026-09-19
Every item under "Worth deciding before starting" is decided and delivered as code: ADR-0030 (its own guest, its own stack, sized to what Saruman has), stacks/soc in #434, build-the-soc-guest.md §0–§12 with odin at 10.0.30.60, 8 GiB, 96 GB, and the four index settings in §9. What is left is a deploy, not a decision.
The gate is unchanged and still true: #414, because an agentless Wazuh has nothing to say — and #414 now sits behind #527, the disk measurement. Closes on the day the six agents report in, not the day the guest comes up.
Corrected 2026-09-20
"#414 now sits behind #527" — no longer; #527 closed 2026-09-20 with the disks measured. The gate is #414 alone. Nothing else here changed.
Activity
docs(adr): ADR-0028 and ADR-0029 — size the lab domain, and house the…
feat(lab): watch the domain's clock, and scrape rather than receive (#…
docs(adr): ADR-0029 and ADR-0030 — size the lab domain, and house the…
feat(lab): watch the domain's clock, and scrape rather than receive (#…
Gerrrt commentedon Sep 8, 2026
Decided by ADR-0030, which answers this and #267 together because they are one question: same clients, same disks, same lifecycle.
Where it runs:
stacks/soc/onodin, a second guest at10.0.30.60— with Velociraptor beside it.This issue framed the choice as
stacks/lab/versus beside it, and warned against letting it be settled by whoever writes the compose file first. The arithmetic settles it instead.alexanderis 4 vCPU / 8 GiB / 64 GiB; Wazuh's own stated minimums are 4 GiB indexer plus 2 GiB manager — six before the dashboard, and before the four services already running there.stacks/labsets nomem_limit:by decision, so nothing bounds the collision: the failure is the guest's OOM killer choosing between the SIEM and the thing that would have recorded the SIEM dying. Andmake down STACK=labwould become "stop detection, and stop the ability to see that detection stopped", in one command.A second guest is what ADR-0004 asks for, not a departure from it — "a second host means a second directory under
stacks/". The tension this issue felt is not with that ADR; it is with the assumption that Wazuh has to land on the guest that already exists.Two things checked rather than assumed, and recorded so they are not re-litigated: two stacks on one host would have worked (
stacks.shkeys on directories, andcheck_host_stack_tablelets one host row name two stacks) — it is rejected on the guest's memory, not on the tooling. And the directory is not calledwazuh, because a directory named for one of two components goes stale the day the second lands, which is ADR-0004's own argument turned on this decision.The premise here needs correcting
Likely true, but not for disk. Six agents at Wazuh's own per-agent figures make roughly 21 GB of alerts a quarter, which a 1 TB pair does not notice. What runs out is heap-per-shard: Wazuh writes one primary shard per daily index, OpenSearch's guidance is no more than 25 shards per GiB of heap, and a 2 GiB heap buys ~50 shards with ~15 taken by the monitoring, statistics, vulnerability and inventory families. Retention is 30 days because that is what the shard budget buys, not because of capacity — stated as a bound, with the re-derivation queries in the ADR.
Four settings that are not defaults, each with its trade:
number_of_replicas: 0(the default leaves a replica unassigned forever, so the cluster is permanently yellow — and a health signal that is always yellow is not a health signal),number_of_shards: 1,refresh_interval: 30s, and an ISM delete policy at 30d, because Wazuh ships none and without one retention is "forever".vm.max_map_countis not namespaced, so it is a/etc/sysctl.dfile on the guest rather than anything compose can set.Its relationship to the lab's Loki
Two stores, bounded, and nothing queries across them. Loki holds the lab's own infrastructure logs; the indexer holds the estate's security events. A cross-store query is "what was the guest's Docker daemon doing when the DC alerted", which is a question you ask twice a year by opening two tabs.
Wazuh's
alerts.jsonis deliberately not tailed into Loki — it duplicates every alert into a second store with a second retention and untyped fields, and "which one is authoritative" arrives immediately.The crossing that is built runs the other way: indexer health into the lab's Prometheus, via Alloy's first-party
prometheus.exporter.elasticsearch. No new image, one.alloyfile, and it is what says the SIEM stopped ingesting — the #62/#63 shape this repository keeps paying for. Rules and promtool tests land instacks/lab/prometheus/, where the series actually arrive.The Grafana OpenSearch datasource was considered as a way to drop the dashboard service and refused: it is a plugin, so
GF_INSTALL_PLUGINSfetches an unpinned artefact at every container start — worse than a digest written where Dependabot cannot bump it. And the dashboard is not a viewer; it is agent enrolment, group management, the ruleset editor and the MITRE mapping.One constraint from #265 that lands on this issue
ADR-0029 runs the two Windows endpoints per session, not continuously — the four servers are the continuous half. So endpoint detections are only meaningful during a session, and any rule written about workstation behaviour has to be written knowing that. The servers give a continuous baseline; the endpoints do not.
Still open
Decisions only. No
stacks/soc/directory, no age key, no.sops.yamlrule, no dependabot entry, no runbook — all of which follow the decision rather than preceding it. This stays blocked behind #265, which is now decided and has a runbook but is not built. An agentless Wazuh still has nothing to say.Gerrrt commentedon Sep 9, 2026
stacks/soc/is authored and CI-validated ahead ofodin, in #434 — the waystacks/lablanded beforealexander. This issue stays open: the stack cannot be deployed until #414 builds the domain and the guest exists, and an agentless Wazuh still has nothing to say. The build isbuild-the-soc-guest.md, and it closes this on the day the six agents report in, not the day the guest comes up.Two of ADR-0030's open checks are answered by the PR rather than left for build day:
0.77.2is pinned by tag and digest; the paragraph the ADR said to supersede otherwise does not need to be.wazuh.indexer, upstream's names): the certs generator refuses a bare hostname as an invalid DNS name — measured by running it — and filebeat verifies the indexer's certificate infullmode, so the SAN and the dialled name have to match.What still waits for the day: the four index settings are applied by hand after the first start (two JSON files, one runbook step), the lab's two
ports:blocks are uncommented in the same change that bringsodinup, and the agents go out by GPO in a second evening — Velociraptor's MSI by software installation, Wazuh's by startup script because its MSI takes the manager address and enrolment password as properties.🤖 Generated with Claude Code
Merge pull request #434 from Gerrrt/gerrrt/soc-stack-authored-266
Merge pull request #635 from Gerrrt/gerrrt/wazuh-saruman-deployment-d…
feat(lab): turn on the windows scrape now the domain is built (#414) (#…
Gerrrt commentedon Sep 26, 2026
2026-09-26: The #414 gate has cleared for this issue's purposes. The domain was built on 2026-09-24/25, with six guests joined and scraped. #414's remaining sections (§6's users, §10, §11) don't gate agent enrolment. What's left is building
odinfrombuild-the-soc-guest.md§1–§10, then the §11 GPO rollout on a second evening. Nothing to buy. This still closes when the six agents report in.fix(soc): first bring-up perms — velociraptor config dir, root-ca.pem…
feat(lab): turn on the velociraptor scrape now odin is up (#266) (#682)
docs(soc): write odin down as built (#266, #267) (#683)
Gerrrt commentedon Sep 27, 2026
odin is built and the Wazuh stack runs (2026-09-27).
build-the-soc-guest.md§1–§10 are done on VMID 160 (10.0.30.60, Ubuntu 26.04.1, 8 GB / 4 core, 32 GB OS + 96 GB/srv/soc-dataonlarge_data):wazuh-indexer,wazuh-manager,wazuh-dashboardall healthy; internal-CA mTLS in place (12 certs from the generator).{"acknowledged":true}for both thewazuh-alerts-homelabtemplate (1 shard, 0 replicas, 30s refresh) and thewazuh-alerts-30dISM retention policy.https://10.0.30.60/.Fixes this shook out, all merged: the render file-mount bug (#680), first-bring-up perms + the vuln-feed placement (#681), and the docs write-down (#683).
What's left to close this: §11 — deploy the Wazuh agent to ADR-0029's six domain machines by GPO (startup script,
WAZUH_MANAGER=10.0.30.60). This issue closes when those agents report in and each server'swazuh-alerts-*count climbs — the "second evening", not the day the guest came up.Gerrrt commentedon Sep 27, 2026
Closing — Wazuh is live with all six domain machines reporting (2026-09-27, §11).
Deployed by GPO (
SOC - Wazuh Agent, a computer startup script linked to the Domain Controllers, Servers and Workstations OUs), agent MSI 4.14.7 on SYSVOL,WAZUH_MANAGER=10.0.30.60, registration password from SOPS:agent_control -lshows 6 agents Active — bahamut, leviathan, titan, ramuh, carbuncle, siren — plus the manager (000).wazuh-alerts-4.x-2026.09.27at 3,375+ docs and climbing.The stack (indexer/manager/dashboard) has been up and healthy since the guest was built earlier today. Enrolment is by GPO, so a reverted or rebuilt machine re-enrols at the next policy refresh (ADR-0030).
docs(roadmap): #266 and #267 are closed, so the SOC's entry leaves (#421
docs: ifrit's purchase gate is met, and the SOC's finished roadmap en…
feat(ansible): the gpos role — Deny Tier 0 logon, and the file-share …
feat(ansible): the gpos role — Deny Tier 0 logon, and the file-share …
feat(ansible): the lab domain's tiers, shares and SOC agents as roles (…
feat(soc): every Windows agent reads the Sysmon channel (#1035)
feat(soc): every Windows agent reads the Sysmon channel (#1035) (#1036)
Gerrrt commentedon Oct 8, 2026
Lab-weakness detection: where it stands after #449 + #1077
Cross-linking from #449 (the deliberate weaknesses) so #266 has a clear, honest line on detection coverage.
Covered: the weakness being planted is now detected
#1077 (merged via #1081) added lab rules in
stacks/soc/wazuh/manager/rules/local_rules.xml. The #449 enable→disable loop on 2026-10-08 confirmed each of the six raises a dedicated, named alert onodin(before/after table in #1077's closing comment and #449):%%2096(Don't-Require-Preauth)%%2093(Trusted-For-Delegation)allowedToDelegateTosetmsDS-AllowedToActOnBehalfOfOtherIdentityaddednTSecurityDescriptorchange on the domain headPrereqs that made this possible are in #1077: Directory Service Changes auditing on the DCs, the member-server audit-policy fix, and a
__PSScriptPolicyTest_*suppression (100110) for Ansible's own footprint.The gap: execution is not yet validated
Every rule above fires on the configuration change — "someone planted a Kerberoast target", not "someone kerberoasted". That is real and useful (it catches the setup), but it is not technique detection.
What closing that gap needs
A live technique→detection pass from an analyst host on VLAN30 (Kali 902), which does not exist yet — blocked on ifrit #790. Until that runs, #266 can claim planting detection for all six, but not execution detection. When the attacker host lands, re-running the loop with live tooling (impacket/Rubeus) against these same rules is the test that promotes this from posture to technique coverage.
🤖 Generated with Claude Code