-
In order to prevent (critical) hunts on OT related hosts we need to make sure that these hosts are always excluded from any hunt. As far as we understand this could be accomplished by modifying System.Hunt.Creation, which is ran whenever a new hunt is created. However, we might need a little help with the VQL syntax: how could we actually overwrite "include_labels" or "exclude_labels" of a hunt that was just created? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
Note that hunts are just a convenient - you can emulate a hunt by running a query like SELECT collect_client(client_id=client_id, ....)
FROM clients() will schedule a collection on all clients known to the system. Are you asking about this from a security point of view or just to prevent an accident? |
Beta Was this translation helpful? Give feedback.
-
In general we assume that each of our Velociraptor users knows what they're doing. Still, due to internal regulation we would need some kind of "fail safe" mechanism that prevents an analyst from accidently running "heavy" artifacts on critical hosts. I get your point that there is more than just one way to do that. How would you restrict it in terms of running a hunt? |
Beta Was this translation helpful? Give feedback.
-
So it seems that you are most concerned about running certain collections on an endpoint, not so much on a hunt (which is just collecting the same thing from many hosts at the same time). Currently the ACL model does not have per-client granularity. If a user has the COLLECT_CLIENT permission they can collect any artifact on any client. We have a couple of mechanisms to control this:
|
Beta Was this translation helpful? Give feedback.
-
Another way to segment a Velociraptor deployment is by using orgs - if you have a set of very sensitive endpoints you can create a totally separate org for them and provide only some users with access to that org. Users have different roles/permissions in different orgs so you can have most of the SOC have access to the rest of the network but the restricted org can have a limited set of users (while everyone else can be read only or not access at all or whatever). |
Beta Was this translation helpful? Give feedback.
-
Thank you for your fast replies. We'll discuss the options internally. |
Beta Was this translation helpful? Give feedback.
That is correct - the hunt is created with the initial label include/exclude configurations. But labels are dynamic so if you assign a client one of the included labels after the hunt is created then it will be scheduled on it immediately.
This is normally how this feature is used - the labels represent e.g. compromised hosts or ones in scope, then analysts can assign labels to include them in the hunt. As you can see here https://docs.velociraptor.app/vql_reference/server/label/ a user only requires the LABEL_CLIENT permission to label a client, but that can trigger a larger workflow.