Skip to content
System hardening
ASD ISMISM-1673

ASD ISM 1673 Prevent Win32 API calls by Office macros

What it says

Microsoft Office macros are blocked from making Win32 API calls.

Quoted as published. Everything else on this page is written by Control Stack.

In plain English

Block Microsoft Office macros from making Win32 API calls, the Windows functions a macro could otherwise use to act beyond Office.

Microsoft Office macros must be blocked from making Win32 API calls. Win32 APIs are the programming functions Windows offers to applications, and a macro can call them directly to do things Office itself does not offer. The control sets no exception, so the block also covers approved macros that ISM-1674 allows to run, such as those signed by a trusted publisher or run from a Trusted Location. Win32 is specific to Windows, so this applies to Office on Windows.

Why it matters

Through Win32 calls a macro can reach past Office, for example launching malicious code in memory without writing anything to disk for a file scan to find. Blocking these calls removes that reach, even for a macro someone has enabled.

How to implement

  1. Find approved macros that call Win32 APIs.

    Search macro source code for Declare statements, which is how macros reference functions in Windows libraries. Start with macros in Trusted Locations and those signed by a trusted publisher, and ask vendors of macro-based add-ins whether theirs rely on them.

  2. Run the Windows blocking rule in audit mode first.

    Use the attack surface reduction rule 'Block Win32 API calls from Office macros'. Audit mode logs what would be blocked, so macros your search missed show up. Rewrite each one with built-in Office features, or replace it.

  3. Switch the rule to block mode.

    Audit mode takes no action and warn mode allows a bypass. The rule needs the built-in Windows antivirus active with real-time protection on, and the Antimalware Scan Interface available, so check both on every device.

  4. Cover devices where the rule cannot run.

    Where another antivirus product is primary, use its equivalent rule and test it. If it has none, disable macros on those devices, which also meets this control. A device with neither is a known shortfall.

Keep it running

Recheck after changing antivirus product, because another product taking over as primary turns this rule off. Look for Declare statements in each new or changed macro during the check ISM-1890 requires, so a new dependency is caught before rollout.

Evidence and audit

  1. Check 1 of 3What an auditor asks for

    Ask for

    Rule status from endpoint management, compared with Office install records from licensing or a software inventory scan.

    Look at

    Whether every Windows device with Microsoft Office shows the rule in block mode with the built-in antivirus active, a tested equivalent, or macros disabled.

    Good evidence

    Every Windows device on either list shows the rule in block mode with the built-in antivirus active, has a tested equivalent, or has macros disabled. None shows audit, warn, off or no status.

  2. Check 2 of 3What an auditor asks for

    Ask for

    All rule exclusions and antivirus process exclusions configured in endpoint management for every group, with those in effect on sampled workstations, and the source code of macros there that sit in Trusted Locations or are signed by a trusted publisher.

    Look at

    Whether any exclusion exempts a macro from the rule, and, for any sampled macro that still contains Declare statements, whether its Win32 calls are blocked when it runs.

    Good evidence

    No exclusion exempts a macro from the rule, and every sampled macro that still contains Declare statements has its Win32 calls blocked when run. A recorded exclusion is a known shortfall and fails this check.

  3. Check 3 of 3What an auditor asks for

    Ask for

    A live test on a workstation picked from the inventory scan, using a harmless macro that makes a Win32 API call, run once from a Trusted Location and once signed by a trusted publisher, with macros permitted for the test account.

    Look at

    Whether the call goes through in either run, and what the device logs.

    Good evidence

    The call is blocked in both runs and the device logs a block event for the rule each time. Because macros were permitted, the rule and not a macro setting blocked it.

Mappings

Closest match in ASD Essential Eight: E8-RM-ML2.1, Microsoft Office macros are blocked from making Win32 API calls, which asks for the same thing.

ISO 27001

ISO/IEC 27001: 1 mapping

  • A.8.9Configuration managementPartially meets
Essential Eight

ASD Essential Eight: 8 mappings

Mappings show how controls relate across frameworks. They do not imply full equivalence or certification.