Implementation guidance for Australian Essential Eight controls in Microsoft environments - ISM controls with PSPF mappings
| Property | Value |
|---|---|
| ISM Control | ISM-1673 |
| Revision | 0 |
| Updated | Sep-21 |
| Guideline | Not provided |
| Section | User application hardening |
| Topic | Microsoft Office macros |
| Essential Eight | ML2, ML3 |
| PSPF Levels | NC, OS, P, S, TS |
Microsoft Office macros are blocked from making Win32 API calls by enabling the Block Win32 API calls from Office macros ASR rule (GUID 92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B), preventing a common malware technique used by macro-based attacks. This policy is implemented through Intune as part of Attack Surface Reduction configurations.123
VBA macros can call Windows API functions directly via Declare statements or by instantiating COM objects (CreateObject). This capability is routinely abused by malware to:
CreateProcess, WinExec, ShellExecute).URLDownloadToFile, InternetOpenUrl).VirtualAlloc, WriteProcessMemory).Blocking Win32 API calls at the ASR interception layer stops these techniques at the source — the macro — before the call reaches the OS kernel. Combined with ISM-1672 (AMSI-based macro scanning) and ISM-1671 (macros disabled for most users), this rule provides defence-in-depth for the Office macro attack chain.
This rule covers Word, Excel, PowerPoint, Outlook, Access, and Publisher.
[!NOTE] The ACSC Windows Hardening Guidelines-Attack Surface Reduction.json policy will be deployed via Intune to enable the ASR rule Block Win32 API calls from Office macros. This will block Office macros from making Win32 API calls in accordance with ACSC Office Hardening guidance.
[!WARNING] Start in Audit mode. A Windows Defender update in January 2023 (builds 1.381.2134 – 1.381.2163) caused this rule to delete
.lnkshortcut files from apps including Outlook, Word, and Excel. Apply Defender intelligence update 1.381.2164 or later before enforcing Block mode. Deploy exclusions for any line-of-business Office add-ins that legitimately use Win32 API calls.
| Field | Value |
|---|---|
| OMA-URI | ./Device/Vendor/MSFT/Defender/AttackSurfaceReductionRules/92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b |
| Data type | Integer |
| Value | 2 (Audit) → 1 (Block) |
Create a Device configuration → Custom profile, add the OMA-URI row, and assign to target groups.
The ACSC Windows Hardening Guidelines ASR JSON already includes this rule. If the ACSC ASR policy is deployed per the ISM-1672 prerequisites, simply confirm the GUID 92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B is set to 1 (Block) in the imported policy.
Get-MpPreference | Select-Object -ExpandProperty AttackSurfaceReductionRules_Ids
Get-MpPreference | Select-Object -ExpandProperty AttackSurfaceReductionRules_Actions
The GUID 92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B should appear with Action 1 (Block) or 2 (Audit).
| Event ID | Mode | Description |
|---|---|---|
| 1121 | Block | Win32 API call from Office macro was blocked |
| 1122 | Audit | Win32 API call would have been blocked (audit mode) |
| 5007 | N/A | ASR rule configuration changed |
Events appear in Applications and Services Logs → Microsoft → Windows → Windows Defender → Operational.
In Microsoft Defender for Endpoint, use Advanced Hunting:
DeviceEvents
| where ActionType startswith "AsrOfficeMacroWin32ApiCall"
| project Timestamp, DeviceName, InitiatingProcessFileName, FileName, ActionType