Suspicious MS Office Child Process

Identifies suspicious child processes of frequently targeted Microsoft Office applications (Word, PowerPoint, Excel). These child processes are often launched during exploitation of Office applications or from documents with malicious macros.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2020/02/18"
  3integration = ["endpoint", "windows", "system"]
  4maturity = "production"
  5updated_date = "2024/05/21"
  6
  7[rule]
  8author = ["Elastic"]
  9description = """
 10Identifies suspicious child processes of frequently targeted Microsoft Office applications (Word, PowerPoint, Excel).
 11These child processes are often launched during exploitation of Office applications or from documents with malicious
 12macros.
 13"""
 14from = "now-9m"
 15index = [
 16    "winlogbeat-*",
 17    "logs-endpoint.events.process-*",
 18    "logs-windows.*",
 19    "endgame-*",
 20    "logs-system.security*",
 21]
 22language = "eql"
 23license = "Elastic License v2"
 24name = "Suspicious MS Office Child Process"
 25note = """## Triage and analysis
 26
 27### Investigating Suspicious MS Office Child Process
 28
 29Microsoft Office (MS 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.
 30
 31This rule looks for suspicious processes spawned by MS Office programs. This is generally the result of the execution of malicious documents.
 32
 33#### Possible investigation steps
 34
 35- 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.
 36- Investigate other alerts associated with the user/host during the past 48 hours.
 37- 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.
 38- Determine if the collected files are malicious:
 39  - Use a private sandboxed malware analysis system to perform analysis.
 40    - Observe and collect information about the following activities:
 41      - Attempts to contact external domains and addresses.
 42      - File and registry access, modification, and creation activities.
 43      - Service creation and launch activities.
 44      - Scheduled task creation.
 45  - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.
 46    - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
 47
 48### False positive analysis
 49
 50- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.
 51
 52### Response and remediation
 53
 54- Initiate the incident response process based on the outcome of the triage.
 55- Isolate the involved host to prevent further post-compromise behavior.
 56- 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.
 57- If the triage identified malware, search the environment for additional compromised hosts.
 58  - Implement temporary network rules, procedures, and segmentation to contain the malware.
 59  - Stop suspicious processes.
 60  - Immediately block the identified indicators of compromise (IoCs).
 61  - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
 62- Remove and block malicious artifacts identified during triage.
 63- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
 64- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
 65  - If the malicious file was delivered via phishing:
 66    - Block the email sender from sending future emails.
 67    - Block the malicious web pages.
 68    - Remove emails from the sender from mailboxes.
 69    - Consider improvements to the security awareness program.
 70- 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).
 71"""
 72references = ["https://www.elastic.co/blog/vulnerability-summary-follina"]
 73risk_score = 47
 74rule_id = "a624863f-a70d-417f-a7d2-7a404638d47f"
 75setup = """## Setup
 76
 77If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
 78events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
 79Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
 80`event.ingested` to @timestamp.
 81For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
 82"""
 83severity = "medium"
 84tags = [
 85    "Domain: Endpoint",
 86    "OS: Windows",
 87    "Use Case: Threat Detection",
 88    "Tactic: Initial Access",
 89    "Tactic: Defense Evasion",
 90    "Tactic: Execution",
 91    "Resources: Investigation Guide",
 92    "Data Source: Elastic Endgame",
 93    "Data Source: Elastic Defend",
 94]
 95timestamp_override = "event.ingested"
 96type = "eql"
 97
 98query = '''
 99process where host.os.type == "windows" and event.type == "start" and
100  process.parent.name : (
101      "eqnedt32.exe", "excel.exe", "fltldr.exe", "msaccess.exe",
102      "mspub.exe", "powerpnt.exe", "winword.exe", "outlook.exe"
103  ) and
104  process.name : (
105      "Microsoft.Workflow.Compiler.exe", "arp.exe", "atbroker.exe", "bginfo.exe", "bitsadmin.exe", "cdb.exe",
106      "certutil.exe", "cmd.exe", "cmstp.exe", "control.exe", "cscript.exe", "csi.exe", "dnx.exe", "dsget.exe",
107      "dsquery.exe", "forfiles.exe", "fsi.exe", "ftp.exe", "gpresult.exe", "hostname.exe", "ieexec.exe", "iexpress.exe",
108      "installutil.exe", "ipconfig.exe", "mshta.exe", "msxsl.exe", "nbtstat.exe", "net.exe", "net1.exe", "netsh.exe",
109      "netstat.exe", "nltest.exe", "odbcconf.exe", "ping.exe", "powershell.exe", "pwsh.exe", "qprocess.exe",
110      "quser.exe", "qwinsta.exe", "rcsi.exe", "reg.exe", "regasm.exe", "regsvcs.exe", "regsvr32.exe", "sc.exe",
111      "schtasks.exe", "systeminfo.exe", "tasklist.exe", "tracert.exe", "whoami.exe", "wmic.exe", "wscript.exe",
112      "xwizard.exe", "explorer.exe", "rundll32.exe", "hh.exe", "msdt.exe"
113  ) and
114  not (
115    process.parent.name : "outlook.exe" and
116    process.name : "rundll32.exe" and
117    process.args : "shell32.dll,Control_RunDLL" and
118    process.args : "srchadmin.dll"
119  )
120'''
121
122
123[[rule.threat]]
124framework = "MITRE ATT&CK"
125[[rule.threat.technique]]
126id = "T1566"
127name = "Phishing"
128reference = "https://attack.mitre.org/techniques/T1566/"
129[[rule.threat.technique.subtechnique]]
130id = "T1566.001"
131name = "Spearphishing Attachment"
132reference = "https://attack.mitre.org/techniques/T1566/001/"
133
134
135
136[rule.threat.tactic]
137id = "TA0001"
138name = "Initial Access"
139reference = "https://attack.mitre.org/tactics/TA0001/"
140[[rule.threat]]
141framework = "MITRE ATT&CK"
142[[rule.threat.technique]]
143id = "T1059"
144name = "Command and Scripting Interpreter"
145reference = "https://attack.mitre.org/techniques/T1059/"
146[[rule.threat.technique.subtechnique]]
147id = "T1059.001"
148name = "PowerShell"
149reference = "https://attack.mitre.org/techniques/T1059/001/"
150
151[[rule.threat.technique.subtechnique]]
152id = "T1059.003"
153name = "Windows Command Shell"
154reference = "https://attack.mitre.org/techniques/T1059/003/"
155
156
157
158[rule.threat.tactic]
159id = "TA0002"
160name = "Execution"
161reference = "https://attack.mitre.org/tactics/TA0002/"
162[[rule.threat]]
163framework = "MITRE ATT&CK"
164[[rule.threat.technique]]
165id = "T1218"
166name = "System Binary Proxy Execution"
167reference = "https://attack.mitre.org/techniques/T1218/"
168
169
170[rule.threat.tactic]
171id = "TA0005"
172name = "Defense Evasion"
173reference = "https://attack.mitre.org/tactics/TA0005/"

Triage and analysis

Investigating Suspicious MS Office Child Process

Microsoft Office (MS 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 looks for suspicious processes spawned by MS Office programs. This is generally the result of the execution of malicious documents.

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 antimalware scan. This may 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).

References

Related rules

to-top