Skip to content

Hunting ​

Hunt searches the telemetry that devices upload. Telemetry is stored in ClickHouse, or in PostgreSQL for small sites (7 days at most). What is available depends on the policy's telemetry and privacy settings: alerts and their evidence are always uploaded, raw events only when Upload raw events for hunting is on.

Hunt page

Query syntax ​

A query is a list of conditions field op value joined with and or or:

text
event_type = dns_query and dns_qname ~ telegram
OperatorMeaning
=equals
!=does not equal
~contains (case-insensitive); text fields only
> <greater or less than; numeric fields only

Put values with spaces in quotes: file_path ~ "Login Data". Numeric fields (dst_port, granted_access, return_code) accept decimal or 0x hex.

The console checks the query as you type and suggests field names. The server turns it into parameterised SQL; values are never pasted into SQL text.

Fields ​

FieldContents
event_typeEvent kind (see below)
imageFull path of the acting program
cmdlineCommand line; for registry events the value data, for tasks the actions, for services the ImagePath
file_pathFile path; for tasks the task path, for services the ImagePath
dst_ip, dst_portNetwork destination
dns_qnameDNS name queried
signerAuthenticode signer of the image
sha256Image hash
userUser name (a pseudonym if user names are hashed)
hostname, device_idDevice
reg_key, reg_valueRegistry key and value name
target_imageTarget of a process access (for example lsass.exe)
granted_accessAccess mask requested on the target
return_codeResult of a process access (non-zero = blocked)
opOperation: file op; registry set, delete_value, delete_key; task created, updated, deleted; activity, install, bind
new_extMost common new file extension in a file-activity burst

Event kinds: process_start, process_stop, image_load, file_access, registry_set, net_connect, dns_query, dpapi_unprotect, process_access, remote_thread, thread_context, debug_attach, script_block, tamper, file_activity, task_registered, service_installed, wmi_subscription.

Examples ​

The Syntax & examples panel in the console has these ready to use:

text
dns_qname = api.telegram.org
event_type = process_start and image ~ \Downloads\
event_type = file_access and file_path ~ "Login Data"
cmdline ~ --remote-debugging and cmdline ~ --headless
dst_port = 8545
image ~ powershell and cmdline ~ downloadstring or cmdline ~ frombase64string

More for the v1.1 rule families:

text
target_image ~ lsass.exe and return_code != 0
event_type = file_activity and new_ext = k3str
event_type = task_registered and cmdline ~ appdata
reg_key ~ \CurrentVersion\Run and op = set

Saved queries are kept in your browser.

Click a result row to expand it into a plain-language explanation, its key fields and the raw event, the same view as incident evidence (see Reading evidence). Explanations only see the events in the result, so add or event_type = file_access to a DPAPI query to show which key file was opened.

Privacy ​

Every hunt query is recorded in the audit log, because hunting reads employee activity. Policies can stop command lines, DNS queries, script content or all raw telemetry from leaving devices, and can redact path prefixes or hash user names. See Privacy.

Released under the Apache License 2.0. SigmaHQ rules are under the Detection Rule License 1.1.