Last active
September 21, 2022 02:26
-
-
Save mgreen27/b7f727eb056b66703cdff7362a88a86c to your computer and use it in GitHub Desktop.
Velociraptor admin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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