Skip to content
Configure macro settings
Essential EightE8-RM-ML2.1

Essential Eight RM-ML2.1 Microsoft Office macros are blocked from making Win32 API calls

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

At Maturity Level Two, Microsoft Office macros must be blocked, not merely audited, from calling Win32 API functions, including macros users are allowed to run.

At Maturity Level Two, Microsoft Office macros must be blocked from making Win32 API calls. The Win32 API is the set of functions Windows offers to programs; a macro can call them directly to do things its own language cannot, such as running code in memory. Blocked means the call is stopped, not just logged or warned about. The rule covers every macro, including those users are allowed to run. Separate requirements block Microsoft Office from creating child processes (E8-AH-ML2.2) and injecting code into other processes (E8-AH-ML2.4).

Why it matters

Malicious macros can call Win32 functions to load and run code in memory, reaching beyond what the macro language itself allows. Blocking those calls takes that route away, even from macros a user is allowed to run.

How to implement

  1. Run the rule in audit mode to find affected business macros.

    Set the attack surface reduction (ASR) rule that blocks Win32 API calls from Office macros (ID 92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b) to audit for long enough to cover occasional work, such as period-end processing. Search known macro files for Declare statements, which is how macro (VBA) code declares Windows functions to call.

  2. Rewrite or retire each macro found, then switch the rule to block.

    Exempting a macro would leave its calls unblocked. Through central policy, set block mode, not audit or warn, on every device that runs Office, including remote desktop servers. The rule works only while the built-in Windows antivirus is active; with a third-party endpoint product, use its equivalent feature.

  3. Test with a harmless macro that calls a Win32 function.

    As a user allowed to run macros, open a test document whose macro declares and calls a harmless Windows function. Confirm the call is blocked and the endpoint product records the block for that device.

Keep it running

Check new or updated business macros against the block before release, and treat any exclusion added to the rule as a gap, since matching files can then call Win32 functions. Recheck if the active antivirus product changes.

Evidence and audit

  1. Check 1 of 2What an auditor asks for

    Ask for

    The applied endpoint protection policy and antivirus status from devices running Microsoft Office that the auditor picks from directory or network records, including any remote desktop servers.

    Look at

    Whether the rule blocking Win32 API calls from Office macros is in block mode, which exclusions apply, and whether the product enforcing it is active.

    Good evidence

    Every sampled device has the rule in block mode, not audit or warn, enforced by an active product, with no exclusion that lets Office files call Win32 functions.

  2. Check 2 of 2What an auditor asks for

    Ask for

    A demonstration with a harmless test macro that calls a Win32 function, run by a user allowed to run macros.

    Look at

    Whether the call is stopped and the block is recorded.

    Good evidence

    The macro's Win32 call is blocked and the endpoint product records the block against that device.

Mappings

Closest match in ASD Information Security Manual: ISM-1673, Prevent Win32 API calls by Office macros, which asks for the same thing.

ASD ISM

ASD Information Security Manual: 5 mappings

ASD Essentials

ASD Essentials for enterprise IT: 2 mappings

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