Atlantiraptor Docs

Windows.Registry.EnableUnsafeClientMailRules

Type: Client · Author: @mgreen27

Checks Outlook Security registry for EnableUnsafeClientMailRules set to 1 (enabled), indicating potential persistence.

This registry key enables execution from Outlook inbox rules which can be used as a persistence mechanism. Microsoft has released a patch to disable execution but attackers can reenable it by changing this value to 1.

HKEY_USERS*\Software\Microsoft\Office*\Outlook\Security\EnableUnsafeClientMailRules = 0 (expected)

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

Parameters

Name Type Default Description
KeyGlob string Software\Microsoft\Office\*\Outlook\Security\
userRegex regex .

References

Source

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

name: Windows.Registry.EnableUnsafeClientMailRules
description: |
  Checks Outlook Security registry for EnableUnsafeClientMailRules set
  to 1 (enabled), indicating potential persistence.
  
  This registry key enables execution from Outlook inbox rules which
  can be used as a persistence mechanism. Microsoft has released a
  patch to disable execution but attackers can reenable it by changing
  this value to 1.

  HKEY_USERS\*\Software\Microsoft\Office\*\Outlook\Security\EnableUnsafeClientMailRules
  = 0 (expected)
  
reference:
  - https://support.microsoft.com/en-us/help/3191893/how-to-control-the-rule-actions-to-start-an-application-or-run-a-macro

author: "@mgreen27"

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

parameters:
   - name: KeyGlob
     default: Software\Microsoft\Office\*\Outlook\Security\
   - 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 Username,
                NTUser as Userhive,
                Key.OSPath.Path as Key,
                key.Mtime AS LastModified,
                EnableUnsafeClientMailRules,
                OutlookSecureTempFolder
              FROM read_reg_key(
                 globs=KeyGlob,
                 root=pathspec(DelegatePath=NTUser),
                 accessor="raw_reg")
              WHERE EnableUnsafeClientMailRules = 1
           })

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.