Atlantiraptor Docs

Windows.Sys.AppcompatShims

Type: Client

Queries the Windows registry for Application Compatibility shim database entries and their associated executables.

Application Compatibility shims are a way to persist malware. This artifact presents the AppCompat Shim information from the registry in a nice human-friendly format.

Parameters

Name Type Default Description
shimKeys string (see the artifact source)
customKeys string (see the artifact source)

References

Source

Defined in artifacts/definitions/Windows/Sys/AppcompatShims.yaml.

name: Windows.Sys.AppcompatShims
description: |
  Queries the Windows registry for Application Compatibility shim
  database entries and their associated executables.
  
  Application Compatibility shims are a way to persist malware. This
  artifact presents the AppCompat Shim information from the registry
  in a nice human-friendly format.

reference:
  - http://files.brucon.org/2015/Tomczak_and_Ballenthin_Shims_for_the_Win.pdf

parameters:
  - name: shimKeys
    default: >-
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\InstalledSDB\*
  - name: customKeys
    default: >-
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Custom\*\*

sources:
  - precondition:
      SELECT OS From info() where OS = 'windows'
    query: |
        LET installed_sdb <=
           SELECT Key, Key.Name as SdbGUID, DatabasePath,
                  DatabaseType, DatabaseDescription,
                  -- Convert windows file time to unix epoch.
                  (DatabaseInstallTimeStamp / 10000000) - 11644473600 AS DatabaseInstallTimeStamp
           FROM read_reg_key(
             globs=split(string=shimKeys, sep=",[\\s]*"),
             accessor="registry")

        LET result = SELECT * from foreach(
          row={
            SELECT regex_replace(
               source=OSPath,
               replace="$1",
               re="^.+\\\\([^\\\\]+)\\\\[^\\\\]+$") as Executable,
              regex_replace(
               source=Name,
               replace="$1",
               re="(\\{[^}]+\\}).*$") as SdbGUIDRef,
               Name as ExeName
            FROM glob(
              globs=split(string=customKeys, sep=",[\\s]*"),
              accessor="registry")
          },
          query={
            SELECT Executable, DatabasePath, DatabaseType,
                   DatabaseDescription, DatabaseInstallTimeStamp, SdbGUID
            FROM installed_sdb
            WHERE SdbGUID = SdbGUIDRef
          })

        SELECT * from result

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.