Persistence via Microsoft Office Add-Ins File Creation
This rule detects attempts to establish persistence on Windows endpoints by abusing Microsoft Office add-ins through the creation of malicious files in Office startup directories.
The rule identifies potential persistence mechanisms employed by attackers leveraging Microsoft Office add-ins. It focuses on the creation of specific file types, including .wll, .xll, .ppa, .ppam, .xla, and .xlam, in directories such as C:\\Users\\*\\AppData\\Roaming\\Microsoft\\Word\\Startup\\*, C:\\Users\\*\\AppData\\Roaming\\Microsoft\\AddIns\\*, and C:\\Users\\*\\AppData\\Roaming\\Microsoft\\Excel\\XLSTART\\*. The detection logic also incorporates Crowdstrike specific conditions using NT Object paths. This technique allows malicious actors to execute code each time the corresponding Microsoft Office application starts, achieving persistence on the system. This activity matters because attackers can gain a foothold within an organization and maintain unauthorized access even after system reboots.
Attack Chain
- The attacker gains initial access to the system, potentially through phishing or exploitation of a vulnerability.
- The attacker identifies a user’s profile on the targeted Windows system.
- The attacker writes a malicious Office add-in file (e.g., a
.wll,.xll,.ppa,.ppam,.xla, or.xlamfile) to one of the Office startup directories, such asC:\\Users\\*\\AppData\\Roaming\\Microsoft\\Word\\Startup\\*. - The attacker may use a dropper or installer to place the malicious file in the startup directory.
- The system restarts or the user launches the corresponding Microsoft Office application (Word, Excel, PowerPoint).
- The Office application loads the malicious add-in file from the startup directory.
- The malicious add-in executes its payload, providing the attacker with persistent access to the system.
- The attacker can now perform various malicious activities, such as data exfiltration, lateral movement, or further exploitation.
Impact
Successful exploitation can lead to persistent unauthorized access to the compromised system. This allows the attacker to maintain a foothold within the network, potentially leading to data theft, disruption of services, or further propagation of malware. The compromised system could be leveraged as a staging point for lateral movement or for launching attacks against other internal resources.
Recommendation
- Enable Sysmon Event ID 11 (File Create) logging to capture file creation events, especially in Office startup directories, to activate the detection logic.
- Deploy the Sigma rule “Persistence via Microsoft Office AddIns File Creation” to your SIEM and tune for your environment to detect malicious add-in creation.
- Monitor process creation events for Microsoft Office applications (WINWORD.EXE, EXCEL.EXE, POWERPNT.EXE) loading add-ins from untrusted locations.
- Restrict write access to Office startup directories and add-in loader locations to prevent unauthorized file creation.
- Investigate alerts related to file creations described by
file.pathandfile.extensionin the rule query.
Detection coverage 2
Persistence via Microsoft Office AddIns File Creation
highDetects the creation of Microsoft Office add-ins in startup directories to establish persistence.
Suspicious Process Writing Office Addin
mediumDetects a suspicious process writing an Office addin file type.
Detection queries are available on the platform. Get full rules →