Skip to content

Response, New York. Noah Park: Check Point Patches Actively Exploited Management Server Path Traversal. Detection, Dallas. Ava Okello: Report Finds Nearly Half of Deployed Detections Need Attention Before SOCs Can Trust Them.

SOCtember

Always First. Fast SOC News.

Velociraptor documentation, Hunting, with the note that hunts do not complete but expire.
Screenshot: Velociraptor documentation, Hunting, "Hunts do not complete - they expire!", Rapid7 (fair use).

Tools

Did You Know: A Velociraptor Hunt Never Finishes, It Expires, and an Endpoint That Stays Offline Past the Expiry Date Is Never Collected

Velociraptor hunts run one artifact collection across many endpoints, including machines that come back online later. But a hunt has no "done" state. It keeps assigning new matching clients until it expires, one week by default, and a host that never checks in before then is simply left out. Reading a hunt as a complete sweep can hide the gap.

James Whitford, ToolsAustin3 min read

AUSTIN - When an incident responder needs the same evidence from every Windows server, Velociraptor's answer is a hunt. The documentation describes a hunt as a logical collection of one or more artifacts from a group of systems, scheduled by a server component called the Hunt Manager. The artifacts are collected from each endpoint the same way as a single collection; the hunt automates the scheduling and keeps track of which endpoints have collected the artifact, so that no endpoint collects it twice.

Velociraptor documentation on scheduling a new hunt, noting that hunts expire after one week by default, above the New Hunt wizard.
Screenshot: Velociraptor documentation, Hunting, Schedule a new hunt, Rapid7 (fair use).

The detail that catches teams out is how a hunt ends. It does not. The documentation puts it in a callout headed "Hunts do not complete - they expire!" Because new clients can appear at any time, as hosts are provisioned or come back after being powered off, the project says it does not make sense to think of a hunt as ever being complete. As long as the hunt is active, any newly discovered client that meets its criteria gets the hunt. "It is only when the hunt expires that new clients are no longer assigned to the hunt." The expiration date is set in the New Hunt wizard, and by default hunts expire after one week.

That has a direct consequence for coverage. A laptop that stays in a drawer, or a server that is down for maintenance, for the whole life of the hunt never receives it. The hunt's results then describe the endpoints that checked in, not the estate. A hunt for a persistence mechanism that returns nothing from the hosts that checked in has not cleared the hosts that did not.

Velociraptor documentation explaining that hunts are created in the Paused state and must be started.
Screenshot: Velociraptor documentation, Hunting, Start Hunt, Rapid7 (fair use).

Two other defaults shape what a hunt actually does. The documentation says hunts are created in the Paused state by default, so someone has to click Start before any client collects anything; the wizard shown in the same documentation also has a Hunt State option to start the hunt immediately. And each client receives a given hunt only once. If a collection fails or needs fresher data, the documented route is to copy the collection on that client, adjust it, for example with a longer timeout, and add it back to the hunt with the Add to Hunt button or the hunt_add() VQL function. A collection that runs too long is cancelled: the documentation says collections by default run for 600 seconds before being cancelled.

Velociraptor documentation showing that labeling a client automatically schedules a label-targeted hunt against it.
Screenshot: Velociraptor documentation, Hunting, Hunts and labels, Rapid7 (fair use).

Labels change the picture in a useful way. A hunt can target a label group, and while the hunt is active, applying that label to a client automatically schedules the hunt against it. The documentation's example is an event log preservation hunt targeted at a Preserve label, which responders add to hosts as they decide those hosts are compromised. Labels are a server-side construct; the clients have no knowledge of the labels applied to them. The same expiry rule still applies, so a long-running label workflow needs an expiry date that outlives the investigation.

Velociraptor documentation, Collecting Artifacts, stating that a collection for an offline client starts when it comes back online.
Screenshot: Velociraptor documentation, Managing Clients, Collecting Artifacts, Rapid7 (fair use).

Single-client collections behave differently. If the client is offline, the documentation says, the collection will start when it comes back online. Hunts, by contrast, stop picking up clients at expiry. When something does go wrong, the place to look is per client: Velociraptor's troubleshooting guide notes that hunts are a logical container for many collections and do not have their own log, so errors appear in each collection's Log tab.

For a SOC team, the checks are short. Before reporting a hunt as clean, compare the number of clients that returned results with the number the hunt targeted, and list the ones that never checked in. Set the expiry to match how long the question matters, not the one-week default. Confirm the hunt was actually started. Re-run failed collections and add them back to the hunt rather than assuming the first attempt covered the host. And follow up on the stragglers with a direct collection or another tool before closing the incident.

About the Author

James Whitford

James Whitford covers SOC tooling, SIEM, SOAR, and detection platforms for SOCtember from Austin.

Related stories

Tools desk