What is the process of modifying an executable file or data stream by adding additional commands?

  1. Atkinson, J. (2017, July 18). Host-based Threat Modeling & Indicator Design. Retrieved March 21, 2018.
  2. Hughes, J. (2010, August 25). NTFS File Attributes. Retrieved March 21, 2018.
  3. Microsoft. (n.d.). File Streams. Retrieved December 2, 2014.
  4. Arntz, P. (2015, July 22). Introduction to Alternate Data Streams. Retrieved March 21, 2018.
  5. Marlin, J. (2013, March 24). Alternate Data Streams in NTFS. Retrieved March 21, 2018.
  6. Harrell, C. (2012, December 11). Extracting ZeroAccess from NTFS Extended Attributes. Retrieved June 3, 2016.
  7. Dahan, A. et al. (2019, December 11). DROPPING ANCHOR: FROM A TRICKBOT INFECTION TO THE DISCOVERY OF THE ANCHOR MALWARE. Retrieved September 10, 2020.
  8. Dahan, A. (2017). Operation Cobalt Kitty. Retrieved December 27, 2018.
  9. GReAT. (2020, July 14). The Tetrade: Brazilian banking malware goes global. Retrieved November 9, 2020.
  10. Frankoff, S., Hartley, B. (2018, November 14). Big Game Hunting: The Evolution of INDRIK SPIDER From Dridex Wire Fraud to BitPaymer Targeted Ransomware. Retrieved January 6, 2021.
  11. LOLBAS. (n.d.). Esentutl.exe. Retrieved September 3, 2019.
  12. LOLBAS. (n.d.). Expand.exe. Retrieved February 19, 2019.
  13. ESET. (2017, August). Gazing at Gazer: Turla’s new second stage backdoor. Retrieved September 14, 2017.

  1. ESET. (2018, September). LOJAX First UEFI rootkit found in the wild, courtesy of the Sednit group. Retrieved July 2, 2019.
  2. Adair, S.. (2016, November 9). PowerDuke: Widespread Post-Election Spear Phishing Campaigns Targeting Think Tanks and NGOs. Retrieved January 11, 2017.
  3. Brumaghin, E. and Grady, C.. (2017, March 2). Covert Channels and Poor Decisions: The Tale of DNSMessenger. Retrieved March 8, 2017.
  4. Kaspersky Lab's Global Research and Analysis Team. (2014, November 24). THE REGIN PLATFORM NATION-STATE OWNAGE OF GSM NETWORKS. Retrieved December 1, 2014.
  5. Salem, E. et al. (2020, May 28). VALAK: MORE THAN MEETS THE EYE . Retrieved June 19, 2020.
  6. Duncan, B. (2020, July 24). Evolution of Valak, from Its Beginnings to Mass Distribution. Retrieved August 31, 2020.
  7. Reaves, J. and Platt, J. (2020, June). Valak Malware and the Connection to Gozi Loader ConfCrew. Retrieved August 31, 2020.
  8. Walter, J.. (2020, July 23). WastedLocker Ransomware: Abusing ADS and NTFS File Attributes. Retrieved September 14, 2021.
  9. Ciubotariu, M. (2014, January 23). Trojan.Zeroaccess.C Hidden in NTFS EA. Retrieved December 2, 2014.
  10. Sander, J. (2017, October 12). Attack Step 3: Persistence with NTFS Extended Attributes – File System Attacks. Retrieved March 21, 2018.
  11. Pravs. (2009, May 25). What you need to know about alternate data streams in windows? Is your Data secure? Can you restore that?. Retrieved March 21, 2018.
  12. Moe, O. (2018, January 14). Putting Data in Alternate Data Streams and How to Execute It. Retrieved June 30, 2018.
  13. Moe, O. (2018, April 11). Putting Data in Alternate Data Streams and How to Execute It - Part 2. Retrieved June 30, 2018.

Identifies an executable created by a Microsoft Office application and subsequently executed. These processes are often launched via scripts inside documents or during exploitation of Microsoft Office applications.

Rule type: eql

Rule indices:

  • logs-endpoint.events.*
  • winlogbeat-*
  • logs-windows.*

Severity: high

Risk score: 73

Runs every: 60 minutes

Searches indices from: now-120m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100


  • Elastic
  • Host
  • Windows
  • Threat Detection
  • Execution
  • has_guide

Version: 101 (version history)

Added (Elastic Stack release): 7.10.0

Last modified (Elastic Stack release): 8.5.0

Rule authors: Elastic

Rule license: Elastic License v2

## Triage and analysis ### Investigating Execution of File Written or Modified by Microsoft Office Microsoft Office is a suite of applications designed to help with productivity and completing common tasks on a computer. You can create and edit documents containing text and images, work with data in spreadsheets and databases, and create presentations and posters. As it is some of the most-used software across companies, MS Office is frequently targeted for initial access. It also has a wide variety of capabilities that attackers can take advantage of. This rule searches for executable files written by MS Office applications executed in sequence. This is most likely the result of the execution of malicious documents or exploitation for initial access or privilege escalation. This rule can also detect suspicious processes masquerading as the MS Office applications. #### Possible investigation steps - Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures. - Investigate other alerts associated with the user/host during the past 48 hours. - Retrieve MS Office documents received and opened by the user that could cause this behavior. Common locations include, but are not limited to, the Downloads and Document folders and the folder configured at the email client. - Determine if the collected files are malicious: - Use a private sandboxed malware analysis system to perform analysis. - Observe and collect information about the following activities: - Attempts to contact external domains and addresses. - File and registry access, modification, and creation activities. - Service creation and launch activities. - Scheduled task creation. - Use the PowerShell `Get-FileHash` cmdlet to get the files' SHA-256 hash values. - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc. ### False positive analysis - This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary. ### Response and remediation - Initiate the incident response process based on the outcome of the triage. - Isolate the involved host to prevent further post-compromise behavior. - Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services. - If the triage identified malware, search the environment for additional compromised hosts. - Implement temporary network rules, procedures, and segmentation to contain the malware. - Stop suspicious processes. - Immediately block the identified indicators of compromise (IoCs). - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system. - Remove and block malicious artifacts identified during triage. - Run a full scan using the antimalware tool in place. This scan can reveal additional artifacts left in the system, persistence mechanisms, and malware components. - Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector. - If the malicious file was delivered via phishing: - Block the email sender from sending future emails. - Block the malicious web pages. - Remove emails from the sender from mailboxes. - Consider improvements to the security awareness program. - Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).

sequence with maxspan=2h [file where event.type != "deletion" and file.extension : "exe" and (process.name : "WINWORD.EXE" or process.name : "EXCEL.EXE" or process.name : "OUTLOOK.EXE" or process.name : "POWERPNT.EXE" or process.name : "eqnedt32.exe" or process.name : "fltldr.exe" or process.name : "MSPUB.EXE" or process.name : "MSACCESS.EXE") ] by host.id, file.path [process where event.type == "start"] by host.id, process.executable

Version 101 (8.5.0 release)

  • Updated query, changed from:

    sequence with maxspan=2h [file where event.type != "deletion" and file.extension : "exe" and (process.name : "WINWORD.EXE" or process.name : "EXCEL.EXE" or process.name : "OUTLOOK.EXE" or process.name : "POWERPNT.EXE" or process.name : "eqnedt32.exe" or process.name : "fltldr.exe" or process.name : "MSPUB.EXE" or process.name : "MSACCESS.EXE") ] by host.id, file.path [process where event.type in ("start", "process_started")] by host.id, process.executable

Version 7 (8.4.0 release) Version 6 (8.3.0 release) Version 5 (7.15.0 release) Version 4 (7.14.0 release) Version 3 (7.12.0 release) Version 2 (7.11.0 release)