Frequently Used ✨

These are the functions and plugins that are the most frequently used in Velociraptor’s built-in artifacts and the Community Exchange artifacts. So we can infer that these are the most “popular” and therefore probably the most useful ones for everyday artifact writing.

VQL provides a vast array of functions and plugins allowing queries to manipulate data and implement logic. Many are suitable for specific use cases, however most on this page are considered foundational to the VQL language. They are the general purpose VQL “workhorses”, which is why they are frequently used in the existing artifacts.

If you are new to VQL then this is a good place to start and become acquainted with the commonly used functions and plugins.

Plugin/FunctionTypeDescription
atoiFunctionConvert a string to an integer
basenameFunctionReturn the basename of the path
chainPluginChain the output of several queries into the same table
column_filterPluginSelect columns from another query using regex
countFunctionCounts the items
dictFunctionConstruct a dict from arbitrary keyword args
execvePluginThis plugin launches an external command and captures its STDERR,
expandFunctionExpand the path using the environment
filterFunctionFilters an array by regex or condition
flattenPluginFlatten the columns in query
foreachPluginExecutes ‘query’ once for each row in the ‘row’ query
formatFunctionFormat one or more items according to a format string
getFunctionGets the member field from item
globPluginRetrieve files based on a list of glob expressions
http_clientPluginMake a http request
humanizeFunctionFormat items in human readable way
ifFunctionConditional execution of query
ifPluginConditional execution of query
infoPluginGet information about the running host
intFunctionTruncate to an integer
itemsFunctionIterate over dict members producing _key and _value columns
itemsPluginEnumerate all members of the item (similar to Python’s items() method)
joinFunctionJoin all the args on a separator
lenFunctionReturns the length of an object
logFunctionLog a message to the query log stream
lowcaseFunctionReturns the lowercase version of a string
memoizeFunctionMemoize a query into memory
netstatPluginCollect network information
nowFunctionReturns the current time in seconds since epoch
plistFunctionParse plist file
process_tracker_getFunctionGet a single process from the global tracker
process_tracker_pslistPluginList all processes from the process tracker
pslistPluginEnumerate running processes
rangePluginIterate over range
read_fileFunctionRead a file into a string
read_filePluginRead files in chunks
regex_transformFunctionSearch and replace a string with multiple regex
scopeFunctionreturn the scope
scopePluginThe scope plugin returns the current scope as a single row
setFunctionSets the member field of the item
sigmaPluginEvaluate sigma rules
splitFunctionSplits a string into an array based on a regexp separator
statFunctionGet file information
strFunctionReturns the string representation of provided data
substrFunctionCreate a substring from a string
switchPluginConditional execution of multiple queries in order
tempdirFunctionCreate a temporary directory
tempfileFunctionCreate a temporary file and write some data into it
timestampFunctionConvert from different types to a time
to_dictFunctionConstruct a dict from a query
unzipPluginUnzips a file into a directory
uploadFunctionUpload a file to the upload service