Potential SSH-IT SSH Worm Downloaded

Identifies processes that are capable of downloading files with command line arguments containing URLs to SSH-IT's autonomous SSH worm. This worm intercepts outgoing SSH connections every time a user uses ssh.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2023/09/21"
 3integration = ["endpoint", "auditd_manager"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Identifies processes that are capable of downloading files with command line arguments containing URLs to SSH-IT's
11autonomous SSH worm. This worm intercepts outgoing SSH connections every time a user uses ssh.
12"""
13from = "now-9m"
14index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*"]
15language = "eql"
16license = "Elastic License v2"
17name = "Potential SSH-IT SSH Worm Downloaded"
18references = ["https://www.thc.org/ssh-it/"]
19risk_score = 47
20rule_id = "2ddc468e-b39b-4f5b-9825-f3dcb0e998ea"
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
27the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
28
29#### Prerequisite Requirements:
30- Fleet is required for Elastic Defend.
31- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
32
33#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
34- Go to the Kibana home page and click "Add integrations".
35- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
36- Click "Add Elastic Defend".
37- Configure the integration name and optionally add a description.
38- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
39- 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).
40- We suggest to select "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
41- 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.
42For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
43- Click "Save and Continue".
44- 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.
45For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
46"""
47severity = "medium"
48tags = [
49    "Domain: Endpoint",
50    "OS: Linux",
51    "Use Case: Threat Detection",
52    "Tactic: Lateral Movement",
53    "Data Source: Elastic Defend",
54    "Data Source: Elastic Endgame",
55    "Data Source: Auditd Manager",
56]
57timestamp_override = "event.ingested"
58type = "eql"
59
60query = '''
61process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "executed", "process_started")
62 and process.name in ("curl", "wget") and process.args : (
63  "https://thc.org/ssh-it/x", "http://nossl.segfault.net/ssh-it-deploy.sh", "https://gsocket.io/x",
64  "https://thc.org/ssh-it/bs", "http://nossl.segfault.net/bs"
65)
66'''
67
68
69[[rule.threat]]
70framework = "MITRE ATT&CK"
71[[rule.threat.technique]]
72id = "T1021"
73name = "Remote Services"
74reference = "https://attack.mitre.org/techniques/T1021/"
75[[rule.threat.technique.subtechnique]]
76id = "T1021.004"
77name = "SSH"
78reference = "https://attack.mitre.org/techniques/T1021/004/"
79
80
81[[rule.threat.technique]]
82id = "T1563"
83name = "Remote Service Session Hijacking"
84reference = "https://attack.mitre.org/techniques/T1563/"
85[[rule.threat.technique.subtechnique]]
86id = "T1563.001"
87name = "SSH Hijacking"
88reference = "https://attack.mitre.org/techniques/T1563/001/"
89
90
91
92[rule.threat.tactic]
93id = "TA0008"
94name = "Lateral Movement"
95reference = "https://attack.mitre.org/tactics/TA0008/"

References

Related rules

to-top