Sublime Plugin or Application Script Modification

Adversaries may create or modify the Sublime application plugins or scripts to execute a malicious payload each time the Sublime application is started.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/12/23"
 3integration = ["endpoint"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Adversaries may create or modify the Sublime application plugins or scripts to execute a malicious payload each time the
11Sublime application is started.
12"""
13from = "now-9m"
14index = ["logs-endpoint.events.*"]
15language = "eql"
16license = "Elastic License v2"
17name = "Sublime Plugin or Application Script Modification"
18references = ["https://posts.specterops.io/persistent-jxa-66e1c3cd1cf5"]
19risk_score = 21
20rule_id = "88817a33-60d3-411f-ba79-7c905d865b2a"
21setup = """## Setup
22
23This rule requires data coming in from Elastic Defend.
24
25### Elastic Defend Integration Setup
26Elastic 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.
27
28#### Prerequisite Requirements:
29- Fleet is required for Elastic Defend.
30- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
31
32#### The following steps should be executed in order to add the Elastic Defend integration on a macOS System:
33- Go to the Kibana home page and click "Add integrations".
34- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
35- Click "Add Elastic Defend".
36- Configure the integration name and optionally add a description.
37- Select the type of environment you want to protect, for MacOS it is recommended to select "Traditional Endpoints".
38- 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).
39- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
40- 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.
41For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/current/agent-policy.html).
42- Click "Save and Continue".
43- 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.
44For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
45"""
46severity = "low"
47tags = [
48    "Domain: Endpoint",
49    "OS: macOS",
50    "Use Case: Threat Detection",
51    "Tactic: Persistence",
52    "Data Source: Elastic Defend",
53]
54timestamp_override = "event.ingested"
55type = "eql"
56
57query = '''
58file where host.os.type == "macos" and event.type in ("change", "creation") and file.extension : "py" and
59  file.path :
60    (
61      "/Users/*/Library/Application Support/Sublime Text*/Packages/*.py",
62      "/Applications/Sublime Text.app/Contents/MacOS/sublime.py"
63    ) and
64  not process.executable :
65    (
66      "/Applications/Sublime Text*.app/Contents/*",
67      "/usr/local/Cellar/git/*/bin/git",
68      "/Library/Developer/CommandLineTools/usr/bin/git",
69      "/usr/libexec/xpcproxy",
70      "/System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/Resources/DesktopServicesHelper"
71    )
72'''
73
74
75[[rule.threat]]
76framework = "MITRE ATT&CK"
77[[rule.threat.technique]]
78id = "T1554"
79name = "Compromise Client Software Binary"
80reference = "https://attack.mitre.org/techniques/T1554/"
81
82
83[rule.threat.tactic]
84id = "TA0003"
85name = "Persistence"
86reference = "https://attack.mitre.org/tactics/TA0003/"

References

Related rules

to-top