Windows Registry: Disable Python function execution warnings in Excel

Alerts on registry updates that disable Excel Python function execution warnings via the PythonFunctionWarnings DWORD.

FreeReviewedSigma · High · v1
Product
windows
Category
registry_set
Author
Nasreddine Bencherchali (Nextron Systems), @Kostastsale (SigmaHQ), DRL 1.1
Published
2024-08-23
Updated
2026-07-30
title: "Windows Registry: Disable Python function execution warnings in Excel"
id: 2933862c-cec5-4dd3-8bb8-4d4fde1d350c
related:
  - id: 023c654f-8f16-44d9-bb2b-00ff36a62af9
    type: similar
  - id: 17e53739-a1fc-4a62-b1b9-87711c2d5e44
    type: derived
status: test
description: This rule flags registry changes to the Excel security setting "PythonFunctionWarnings" under the Microsoft Office Excel path, specifically when the value is set to DWORD 0x00000001. Disabling these warnings can reduce user visibility into Python function execution attempts originating from spreadsheet content, making it easier for malicious workflows to go unnoticed. It relies on telemetry from Windows registry value write events that capture the TargetObject path and the written Details value.
references:
  - https://support.microsoft.com/en-us/office/data-security-and-python-in-excel-33cc88a4-4a87-485e-9ff9-f35958278327
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/registry/registry_set/registry_set_office_disable_python_security_warnings.yml
author: Nasreddine Bencherchali (Nextron Systems), @Kostastsale, Huntrule Team
date: 2024-08-23
tags:
  - attack.defense-impairment
  - attack.t1685
logsource:
  category: registry_set
  product: windows
detection:
  selection:
    TargetObject|contains: \Microsoft\Office\
    TargetObject|endswith: \Excel\Security\PythonFunctionWarnings
    Details: DWORD (0x00000001)
  condition: selection
falsepositives:
  - Unknown
level: high
license: DRL-1.1