Atlantiraptor Docs

Windows.System.Handles

Type: Client

Lists open handles (files, registry keys, etc.) for processes matching a regex pattern.

Uncheck all the handle types below to fetch all handle types.

Parameters

Name Type Default Description
processRegex regex . A regex applied to process names.
Files bool Y Search for File Handles
Key bool Search for Key Handles
IncludeAccessMasks bool

Source

Defined in artifacts/definitions/Windows/System/Handles.yaml.

name: Windows.System.Handles
description: |
  Lists open handles (files, registry keys, etc.) for processes
  matching a regex pattern.

  Uncheck all the handle types below to fetch all handle types.

parameters:
  - name: processRegex
    description: A regex applied to process names.
    default: .
    type: regex

  - name: Files
    description: Search for File Handles
    type: bool
    default: Y

  - name: Key
    description: Search for Key Handles
    type: bool

  - name: IncludeAccessMasks
    type: bool

sources:
  - query: |
      LET tokens <= SELECT * FROM chain(
          a={SELECT "File" AS Type FROM scope() WHERE Files = 'Y'},
          a2={SELECT "Section" AS Type FROM scope() WHERE Files = 'Y'},
          b={SELECT "Key" AS Type FROM scope() WHERE Key = 'Y'}
        )

      LET processes = SELECT Pid AS ProcPid, Name AS ProcName, Exe
        FROM pslist()
        WHERE ProcName =~ processRegex AND ProcPid > 0

      SELECT * FROM foreach(
          row=processes,
          query={
            SELECT ProcPid, ProcName, Exe, Type, Name, Handle,
                   if(condition=IncludeAccessMasks,
                      then=AccessMaskPerms) AS AccessMaskPerms
            FROM handles(pid=ProcPid, types=tokens.Type)
          })

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.