Potential Microsoft Office Sandbox Evasion
Identifies the creation of a suspicious zip file prepended with special characters. Sandboxed Microsoft Office applications on macOS are allowed to write files that start with special characters, which can be combined with an AutoStart location to achieve sandbox evasion.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2021/01/11"
3integration = ["endpoint"]
4maturity = "production"
5updated_date = "2024/05/21"
6
7[rule]
8author = ["Elastic"]
9description = """
10Identifies the creation of a suspicious zip file prepended with special characters. Sandboxed Microsoft Office
11applications on macOS are allowed to write files that start with special characters, which can be combined with an
12AutoStart location to achieve sandbox evasion.
13"""
14from = "now-9m"
15index = ["logs-endpoint.events.*"]
16language = "kuery"
17license = "Elastic License v2"
18name = "Potential Microsoft Office Sandbox Evasion"
19references = [
20 "https://i.blackhat.com/USA-20/Wednesday/us-20-Wardle-Office-Drama-On-macOS.pdf",
21 "https://www.mdsec.co.uk/2018/08/escaping-the-sandbox-microsoft-office-on-macos/",
22 "https://desi-jarvis.medium.com/office365-macos-sandbox-escape-fcce4fa4123c",
23]
24risk_score = 73
25rule_id = "d22a85c6-d2ad-4cc4-bf7b-54787473669a"
26setup = """## Setup
27
28This rule requires data coming in from Elastic Defend.
29
30### Elastic Defend Integration Setup
31Elastic 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.
32
33#### Prerequisite Requirements:
34- Fleet is required for Elastic Defend.
35- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
36
37#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
38- Go to the Kibana home page and click "Add integrations".
39- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
40- Click "Add Elastic Defend".
41- Configure the integration name and optionally add a description.
42- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
43- 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).
44- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
45- 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.
46For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
47- Click "Save and Continue".
48- 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.
49For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
50"""
51severity = "high"
52tags = [
53 "Domain: Endpoint",
54 "OS: macOS",
55 "Use Case: Threat Detection",
56 "Tactic: Defense Evasion",
57 "Data Source: Elastic Defend",
58]
59timestamp_override = "event.ingested"
60type = "query"
61
62query = '''
63event.category:file and host.os.type:(macos and macos) and not event.type:deletion and file.name:~$*.zip
64'''
65
66
67[[rule.threat]]
68framework = "MITRE ATT&CK"
69[[rule.threat.technique]]
70id = "T1497"
71name = "Virtualization/Sandbox Evasion"
72reference = "https://attack.mitre.org/techniques/T1497/"
73
74
75[rule.threat.tactic]
76id = "TA0005"
77name = "Defense Evasion"
78reference = "https://attack.mitre.org/tactics/TA0005/"
References
Related rules
- Attempt to Disable Gatekeeper
- Attempt to Install Root Certificate
- Attempt to Unload Elastic Endpoint Security Kernel Extension
- Creation of Hidden Launch Agent or Daemon
- Execution via Electron Child Process Node.js Module