Atlantiraptor Docs

Windows.ETW.ViewSessions

Type: Client

Enumerates running ETW tracing sessions via logman and optionally kills dangling ones.

Required permissions: EXECVE

Precondition: SELECT OS From info() where OS = 'windows'

Parameters

Name Type Default Description
SessionRegex regex Velociraptor
KillMatching bool If set will kill the relevant sessions.

Source

Defined in artifacts/definitions/Windows/ETW/ViewSessions.yaml.

name: Windows.ETW.ViewSessions
description: |
  Enumerates running ETW tracing sessions via logman and optionally
  kills dangling ones.

required_permissions:
  - EXECVE

precondition: SELECT OS From info() where OS = 'windows'
parameters:
  - name: SessionRegex
    default: "Velociraptor"
    type: regex
  - name: KillMatching
    type: bool
    description: If set will kill the relevant sessions.


sources:
  - query: |
      SELECT * FROM foreach(row={
         SELECT Stdout, parse_string_with_regex(string=Stdout, regex="(^[^ ]+)").g1 AS SessionName
         from execve(argv=["logman", "query", "-ets"], sep="\n")
         WHERE Stdout =~ "Running" AND SessionName =~ SessionRegex
      }, query={
         SELECT * FROM if(condition=KillMatching,
         then={
             SELECT SessionName, Stdout FROM execve(argv=["logman", "stop", SessionName, "-ets"])
         }, else={
             SELECT SessionName FROM scope()
         })
      })

Edit this page on GitHub

© 2026 Atlant Security EOOD. Atlantiraptor is free software under the GNU Affero General Public License v3. It is based on Velociraptor by Velocidex, and keeps its copyright notices. Velociraptor is a trademark of its owner; Atlantiraptor is not affiliated with or endorsed by it.