Skip to content

Give soc_agents a standing source for the Wazuh and Velociraptor MSIs #1068

Closed

Description

@Gerrrt

Problem

ansible/roles/soc_agents has no standing download location for its two installers. soc_agents_wazuh_msi_url and soc_agents_velociraptor_msi_url have no default, on purpose: *.msi is gitignored and no URL was ever decided. The role's defaults say so, and it fails with a clear message when a guest needs an installer and the URL is unset.

On the hand-built domain this never came up, because the role adopted agents that the deploy GPOs had installed. On a rebuild it does. #448's rebuild stopped at --tags soc on all six:

Wazuh is not installed and soc_agents_wazuh_msi_url is unset. …
Velociraptor is not installed and soc_agents_velociraptor_msi_url is unset. …

The next licence rebuild (#440, around 2027-03) will stop at the same place.

What #448 did, once

  • Velociraptor: the 0.77.2 MSI repacked by Server.Utils.CreateMSI, with the client config inside. It sits in odin's datastore at /srv/soc-data/velociraptor/clients/server/collections/F.DASIDL6DB26AC/uploads/scope/Org_%3Croot%3E_velociraptor-v0.77.2-windows-amd64.msi. Its sha256 matches the role's pin, e945e798….
  • Wazuh: the official https://packages.wazuh.com/4.x/windows/wazuh-agent-4.14.7-1.msi. Its sha256 matches the role's pin, e967f36b….
  • Serving: both were served from a temporary python3 -m http.server 8448 --bind 10.0.30.60 on odin, and passed with -e for the run only. The server was stopped and removed afterwards.

To decide

  1. Where the two MSIs live, served to VLAN 30 only. For example, a small static-file service on odin beside the SOC stack, or a path on an existing web server. The Velociraptor MSI carries the client config (server URL, CA, enrolment nonce), so it should not be public. The Wazuh MSI is a public file, so its URL could stay the vendor's. The open question is whether the guests may fetch from the internet at all.
  2. How a version bump moves. Today one edit moves the version, product code and sha256 together in roles/soc_agents/defaults/main.yml. The MSI on the server has to move with them, and the Velociraptor one is rebuilt on odin with each server upgrade. The runbook should say who puts it in place, and where.
  3. Setting the URLs. Once the location is decided, set both in group_vars/all.yaml. The rebuild runbook (build-the-lab-domain.md, "Rebuild from the pipeline") then needs no -e and no temporary server.

Also pending: the Wazuh pin is still 4.14.7 while the manager is 4.14.8, per the role's own note. That bump would move the MSI too.

Done when

ansible-playbook lab-domain.yml --tags soc installs both agents on a fresh guest with no extra variables, and the runbook names where the MSIs come from.

Refs #448, #440.

🤖 Generated with Claude Code

Activity

  1. added
    featureA new capability or a change
    labstacks/lab on alexander (VLAN 30)
    socstacks/soc on odin (VLAN 30)
    on Oct 8, 2026
  2. Gerrrt commented on Oct 8, 2026

    @Gerrrt
    OwnerAuthor

    2026-10-08: deployed on odin, and the role's fetch path proved. #1071 and #1072 are on main (33c278d).

    • Staged: sudo scripts/stage-agent-msis.sh on odin gave PASS for both files against the role's pins. The Velociraptor MSI was found by hash in the datastore. Both files are in /srv/soc-data/agent-msi.

    • Serving: make up STACK=soc brought up soc-agent-msi, healthy on 0.0.0.0:8448.

    • Who can fetch. The Caddyfile only allows the six domain addresses, so this also proves Docker keeps the client's source address:

      From Request Result
      titan .52 both MSIs 200, 5 935 104 and 27 537 408 bytes
      titan / and a missing file 404
      phoenix .70 an MSI 403
      Saruman .110 an MSI 403
    • The role's own fetch. From phoenix, with no -e, ansible.windows.win_get_url ran against titan with the role's checksums and the group_vars URLs (http://10.0.30.60:8448/wazuh-agent-4.14.7.msi, …/velociraptor-client-0.77.2.msi). Both downloaded and both checksums matched. The test files were then deleted.

    Not yet seen: --tags soc installing both agents on a guest that has neither. All six already have them. That is the last line of "Done when", and the next rebuild or a fresh guest will show it.

    🤖 Generated with Claude Code

  3. Gerrrt commented on Oct 8, 2026

    @Gerrrt
    OwnerAuthor

    Closed at Garrett's call, on the evidence above: odin serves both MSIs to the six only, and the role's fetch with checksums works from phoenix with no extra variables. A fresh-guest --tags soc install hasn't been seen yet; the next rebuild exercises it.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureA new capability or a changelabstacks/lab on alexander (VLAN 30)socstacks/soc on odin (VLAN 30)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions