Skip to content

feat(soc): a data disk for odin and a Velociraptor removal procedure (#439) - #657

Merged
Gerrrt merged 3 commits into
mainfrom
gerrrt/velociraptor-removal-439
Sep 23, 2026
Merged

Gerrrt merged 3 commits into
mainfrom
gerrrt/velociraptor-removal-439

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Sep 23, 2026

Copy link
Copy Markdown
Owner

What changed

odin isn't built yet, so nothing running changes. When it is built, it gets a 32 GB OS disk and a 96 GB data disk mounted by UUID at /srv/soc-data. The indexer's data and Velociraptor's datastore live on the data disk. build-the-soc-guest.md also gains §13, a Velociraptor removal procedure written alongside the install.

Why

Closes #439.

  • Storage. Velociraptor's collections get large fast, and ADR-0030 sized the indexer by heap on the assumption disk wasn't the constraint. A separate filesystem keeps a runaway hunt off / and makes that assumption checkable. In stacks/soc/compose.yaml, indexer-data and velociraptor-datastore become named volumes bound to ${SOC_DATA_DIR}/indexer and /velociraptor, so no service definition changes.
  • Removal. Velociraptor is a blue-team C2: an abandoned server is a command channel into every host that enrolled, on the segment ADR-0014 fills with attackers. §13 removes it in this order:
    1. The GPO uninstalls the clients, and the GUI confirms they stopped checking in.
    2. The server container and volume are removed.
    3. server.config.yaml, holding the CA's private key, is shredded, so no later server can speak to a client that was missed.
    4. The datastore, the SYSVOL MSI and the lab scrape job go, and a port check from alexander confirms.

Blast radius

odin and stacks/soc only, and only once odin exists. The guard: the empty mountpoint is chattr +i. With the data disk unmounted, neither directory can exist, and Docker refuses to start the indexer and Velociraptor (failed to mount local volume … no such file or directory) instead of writing the evidence store to /. §8 says what that error means. The removal is destructive by design; it runs only when the tool is being retired.

  • No change to network segmentation or firewall rules
  • No new port published to a VLAN that could not already reach the service
  • No credential added outside secrets/*.sops.yaml

Verification

  • Tested against Docker locally: a bind-backed named volume whose directory is missing is refused and not created; a present one is written through
  • docker compose config on stacks/soc resolves both volumes to /srv/soc-data/{indexer,velociraptor}; check_compose_health.py passes
  • scripts/lint.sh and scripts/check_docs.py pass
  • make validate: passes except backup-offsite.sh's /tmp fixture, which fails on this host's tmpfs /tmp on main too
  • Deployed to the lab and confirmed working (when odin is built, per the runbook)
  • Docs updated: build-the-soc-guest.md (§0, §1, §2, §8, new §13), stacks/soc/README.md, .env.example, changelog.md

🤖 Generated with Claude Code

Gerrrt and others added 3 commits September 23, 2026 19:49
…439)

Both halves of #439, written before odin is built.

Storage: odin is now built with a 32 GB OS disk and a 96 GB data disk,
mounted by UUID at /srv/soc-data. indexer-data and velociraptor-datastore
become named volumes bound to ${SOC_DATA_DIR}/indexer and /velociraptor, so
no service definition changes. The empty mountpoint is chattr +i: with the
disk unmounted neither directory can exist, and Docker refuses to start the
two services ("failed to mount local volume ... no such file or directory")
instead of writing the evidence store onto /. Tried locally against Docker:
a missing bind directory is refused and not created; a present one is
written through.

Removal: build-the-soc-guest.md §13 takes Velociraptor out in an order that
leaves no C2 behind. The GPO uninstalls the clients first, and the GUI
confirms they stopped checking in. Then the server container and volume go,
then server.config.yaml (the CA private key) is shredded, so no later server
can speak to a client that was missed. After that, the datastore, the SYSVOL
MSI and the lab scrape job; a port check from alexander confirms.

stacks/soc/README.md and .env.example (SOC_DATA_DIR) follow, plus a
changelog entry. validate.sh: all pass except backup-offsite's /tmp
fixture, which fails on this host's tmpfs /tmp and on main alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gerrrt
Gerrrt merged commit db3aeb4 into main Sep 23, 2026
4 checks passed
@Gerrrt
Gerrrt deleted the gerrrt/velociraptor-removal-439 branch September 23, 2026 21:38
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.

Velociraptor: a removal procedure and a data disk, before it becomes a C2 nobody removed

1 participant