Remote SSH Login Enabled via systemsetup Command

Detects use of the systemsetup command to enable remote SSH Login.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/08/18"
 3integration = ["endpoint"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/06/22"
 8
 9[rule]
10author = ["Elastic"]
11description = "Detects use of the systemsetup command to enable remote SSH Login."
12from = "now-9m"
13index = ["auditbeat-*", "logs-endpoint.events.*"]
14language = "kuery"
15license = "Elastic License v2"
16name = "Remote SSH Login Enabled via systemsetup Command"
17references = [
18    "https://documents.trendmicro.com/assets/pdf/XCSSET_Technical_Brief.pdf",
19    "https://ss64.com/osx/systemsetup.html",
20    "https://support.apple.com/guide/remote-desktop/about-systemsetup-apd95406b8d/mac",
21]
22risk_score = 47
23rule_id = "5ae4e6f8-d1bf-40fa-96ba-e29645e1e4dc"
24severity = "medium"
25tags = ["Domain: Endpoint", "OS: macOS", "Use Case: Threat Detection", "Tactic: Lateral Movement", "Data Source: Elastic Defend"]
26timestamp_override = "event.ingested"
27type = "query"
28
29query = '''
30event.category:process and host.os.type:macos and event.type:(start or process_started) and
31 process.name:systemsetup and
32 process.args:("-setremotelogin" and on) and
33 not process.parent.executable : /usr/local/jamf/bin/jamf
34'''
35
36
37[[rule.threat]]
38framework = "MITRE ATT&CK"
39[[rule.threat.technique]]
40id = "T1021"
41name = "Remote Services"
42reference = "https://attack.mitre.org/techniques/T1021/"
43[[rule.threat.technique.subtechnique]]
44id = "T1021.004"
45name = "SSH"
46reference = "https://attack.mitre.org/techniques/T1021/004/"
47
48
49
50[rule.threat.tactic]
51id = "TA0008"
52name = "Lateral Movement"
53reference = "https://attack.mitre.org/tactics/TA0008/"

References

Related rules

to-top