Modification of Safari Settings via Defaults Command

Identifies changes to the Safari configuration using the built-in defaults command. Adversaries may attempt to enable or disable certain Safari settings, such as enabling JavaScript from Apple Events to ease in the hijacking of the users browser.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2021/01/14"
 3integration = ["endpoint"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/11/15"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies changes to the Safari configuration using the built-in defaults command. Adversaries may attempt to enable or
13disable certain Safari settings, such as enabling JavaScript from Apple Events to ease in the hijacking of the users
14browser.
15"""
16from = "now-9m"
17index = ["logs-endpoint.events.*"]
18language = "kuery"
19license = "Elastic License v2"
20name = "Modification of Safari Settings via Defaults Command"
21references = ["https://objectivebythesea.com/v2/talks/OBTS_v2_Zohar.pdf"]
22risk_score = 47
23rule_id = "6482255d-f468-45ea-a5b3-d3a7de1331ae"
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: Defense Evasion", "Data Source: Elastic Defend"]
51timestamp_override = "event.ingested"
52type = "query"
53
54query = '''
55event.category:process and host.os.type:macos and event.type:start and
56  process.name:defaults and process.args:
57    (com.apple.Safari and write and not
58      (
59      UniversalSearchEnabled or
60      SuppressSearchSuggestions or
61      WebKitTabToLinksPreferenceKey or
62      ShowFullURLInSmartSearchField or
63      com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks
64      )
65    )
66'''
67
68
69[[rule.threat]]
70framework = "MITRE ATT&CK"
71[[rule.threat.technique]]
72id = "T1562"
73name = "Impair Defenses"
74reference = "https://attack.mitre.org/techniques/T1562/"
75[[rule.threat.technique.subtechnique]]
76id = "T1562.001"
77name = "Disable or Modify Tools"
78reference = "https://attack.mitre.org/techniques/T1562/001/"
79
80
81
82[rule.threat.tactic]
83id = "TA0005"
84name = "Defense Evasion"
85reference = "https://attack.mitre.org/tactics/TA0005/"

References

Related rules

to-top