Skip to content

Instantly share code, notes, and snippets.

@mgreen27
Last active September 21, 2022 02:26
Show Gist options
  • Save mgreen27/b7f727eb056b66703cdff7362a88a86c to your computer and use it in GitHub Desktop.
Save mgreen27/b7f727eb056b66703cdff7362a88a86c to your computer and use it in GitHub Desktop.
Velociraptor admin
-- Tag machines by name, modify for other tagging usecases
LET target_clients = ( 'machinename1','machinename2'... )
SELECT
os_info.hostname as Hostname,
os_info.fqdn as Fqdn,
os_info.release as OS,
timestamp(epoch=first_seen_at) as FirstSeen,
timestamp(epoch=last_seen_at) as LastSeen,
last_ip,
client_id,
labels,
label(op='set',labels=['in_scope'],client_id=client_id) as SetLabel
FROM clients()
WHERE Hostname in target_clients
or Fqdn in target_clients
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment