Atlantiraptor Docs

host

Type: Function

Perform a DNS resolution.

This function allows DNS to be resolved from within VQL. You can use the regular system resolver (for example on windows will go through the resolver cache service).

You can also specify an external DNS server, causing the query to contact the DNS server for resolving the names.

Example

The first query resolves through an external DNS server while the second uses the local resolver.

SELECT host(name='www.google.com', server='8.8.8.8:53'),
   host(name='www.google.com')
FROM scope()

Notes

No caching is currently provided so this may generate a lot of load on DNS servers when scanning many rows.

Argument Type Description
name string (required) The name to lookup
server string A DNS server to query - if not provided uses the system resolver.
type string Type of lookup, can be CNAME, NS, SOA, TXT, DNSKEY, AXFR, A (default)
prefer_go bool Prefer calling the native Go implementation rather than the system.
tracker_only bool Only use the dns tracker - if the IP is not known then do not attempt to resolve it.

Required permissions: NETWORK, MACHINE_STATE

Platforms: macOS, Linux, Windows

Source: vql/networking/host.go