Suspicious macOS MS Office Child Process

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

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2021/01/04"
  3integration = ["endpoint"]
  4maturity = "production"
  5min_stack_comments = "New fields added: process.Ext.effective_parent"
  6min_stack_version = "8.11.0"
  7updated_date = "2024/05/17"
  8
  9[rule]
 10author = ["Elastic"]
 11description = """
 12Identifies suspicious child processes of frequently targeted Microsoft Office applications (Word, PowerPoint, and
 13Excel). These child processes are often launched during exploitation of Office applications or by documents with
 14malicious macros.
 15"""
 16from = "now-9m"
 17index = ["logs-endpoint.events.*"]
 18language = "eql"
 19license = "Elastic License v2"
 20name = "Suspicious macOS MS Office Child Process"
 21references = ["https://blog.malwarebytes.com/cybercrime/2017/02/microsoft-office-macro-malware-targets-macs/"]
 22risk_score = 47
 23rule_id = "66da12b1-ac83-40eb-814c-07ed1d82b7b9"
 24setup = """## Setup
 25
 26This rule requires data coming in from Elastic Defend.
 27
 28### Elastic Defend Integration Setup
 29Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
 30
 31#### Prerequisite Requirements:
 32- Fleet is required for Elastic Defend.
 33- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
 34
 35#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
 36- Go to the Kibana home page and click "Add integrations".
 37- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
 38- Click "Add Elastic Defend".
 39- Configure the integration name and optionally add a description.
 40- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
 41- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
 42- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
 43- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
 44For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
 45- Click "Save and Continue".
 46- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
 47For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
 48"""
 49severity = "medium"
 50tags = ["Domain: Endpoint", "OS: macOS", "Use Case: Threat Detection", "Tactic: Initial Access", "Data Source: Elastic Defend"]
 51timestamp_override = "event.ingested"
 52type = "eql"
 53
 54query = '''
 55process where event.action == "exec" and host.os.type == "macos" and
 56    process.parent.name: (
 57      "Microsoft Word",
 58      "Microsoft Outlook",
 59      "Microsoft Excel",
 60      "Microsoft PowerPoint",
 61      "Microsoft OneNote"
 62    ) and
 63  process.name : (
 64    "curl",
 65    "nscurl",
 66    "bash",
 67    "sh",
 68    "osascript",
 69    "python*",
 70    "perl*",
 71    "mktemp",
 72    "chmod",
 73    "php",
 74    "nohup",
 75    "openssl",
 76    "plutil",
 77    "PlistBuddy",
 78    "xattr",
 79    "mktemp",
 80    "sqlite3",
 81    "funzip",
 82    "popen"
 83  ) and
 84
 85  // Filter FPs related to product version discovery and Office error reporting behavior
 86  not process.args:
 87    (
 88      "ProductVersion",
 89      "hw.model",
 90      "ioreg",
 91      "ProductName",
 92      "ProductUserVisibleVersion",
 93      "ProductBuildVersion",
 94      "/Library/Application Support/Microsoft/MERP*/Microsoft Error Reporting.app/Contents/MacOS/Microsoft Error Reporting",
 95      "open -a Safari *",
 96      "defaults read *",
 97      "sysctl hw.model*",
 98      "ioreg -d2 -c IOPlatformExpertDevice *",
 99      "ps aux | grep 'ToDesk_Desktop' | grep -v grep",
100      "PIPE=\"$CFFIXED_USER_HOME/.zoteroIntegrationPipe*"
101    ) and
102
103   not process.parent.executable :
104        (
105          "/Applications/ToDesk.app/Contents/MacOS/ToDesk_Service",
106          "/usr/local/Privacy-i/PISupervisor",
107          "/Library/Addigy/lan-cache",
108          "/Library/Elastic/Agent/*",
109          "/opt/jc/bin/jumpcloud-agent",
110          "/usr/sbin/networksetup"
111        ) and
112   not (process.name : "sh" and process.command_line : "*$CFFIXED_USER_HOME/.zoteroIntegrationPipe*") and
113
114   not process.Ext.effective_parent.executable : (
115        "/Applications/ToDesk.app/Contents/MacOS/ToDesk_Service",
116        "/usr/local/Privacy-i/PISupervisor",
117        "/Library/Addigy/auditor",
118        "/Library/Elastic/Agent/*",
119        "/opt/jc/bin/jumpcloud-agent",
120        "/usr/sbin/networksetup"
121      )
122'''
123
124
125[[rule.threat]]
126framework = "MITRE ATT&CK"
127[[rule.threat.technique]]
128id = "T1566"
129name = "Phishing"
130reference = "https://attack.mitre.org/techniques/T1566/"
131[[rule.threat.technique.subtechnique]]
132id = "T1566.001"
133name = "Spearphishing Attachment"
134reference = "https://attack.mitre.org/techniques/T1566/001/"
135
136
137
138[rule.threat.tactic]
139id = "TA0001"
140name = "Initial Access"
141reference = "https://attack.mitre.org/tactics/TA0001/"

References

Related rules

to-top