Atlantiraptor Docs

Windows.Registry.EnabledMacro

Type: Client · Author: @mgreen27

Scans Office Trust Records registry entries for documents with macro-enabled trust flags.

That is HKEY_USERS\*\Software\Microsoft\Office\*\Security\Trusted Documents\TrustRecords reg keys with values ending in FFFFFF7F.

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

Parameters

Name Type Default Description
KeyGlob string Software\Microsoft\Office\*\*\Security\Trusted Documents\TrustRecords\*
userRegex regex .

References

Source

Defined in artifacts/definitions/Windows/Registry/EnabledMacro.yaml.

name: Windows.Registry.EnabledMacro
description: |
  Scans Office Trust Records registry entries for documents with
  macro-enabled trust flags.

  That is `HKEY_USERS\*\Software\Microsoft\Office\*\Security\Trusted
  Documents\TrustRecords` reg keys with values ending in `FFFFFF7F`.

reference:
  - http://az4n6.blogspot.com/2016/02/more-on-trust-records-macros-and.html

author: "@mgreen27"

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

parameters:
 - name: KeyGlob
   default: Software\Microsoft\Office\*\*\Security\Trusted Documents\TrustRecords\*
 - name: userRegex
   default: .
   type: regex

sources:
 - query: |
        LET UserProfiles = Select Name as Username,
            {
                SELECT OSPath FROM glob(
                  root=expand(path=Directory),
                  globs="/NTUSER.DAT",
                  accessor="auto")
            } as NTUser,
            expand(path=Directory) as Directory
        FROM Artifact.Windows.Sys.Users()
        WHERE Directory and NTUser and Name =~ userRegex

        SELECT * FROM foreach(
          row={
            SELECT Username,NTUser FROM UserProfiles
          },
          query={
            SELECT Name as Document,
              Username,
              NTUser as Userhive,
              OSPath.Dirname AS Key,
              Mtime AS LastModified
            FROM glob(
              globs=KeyGlob,
              root=pathspec(DelegatePath=NTUser),
              accessor="raw_reg")
            WHERE Data.type =~ "BINARY"
              and encode(string=Data.value, type="hex") =~ "ffffff7f$"
          })

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.