Malicious Homebrew Initial Access


Description

Detects attempts to trick users into installing a malicious version of Homebrew that spoofs the official Homebrew installation url. This has been observed several times in the wild as a method of gaining initial access by adversaries and red teams alike.

Query · eql

process where event.type == "start" and event.action == "exec" and process.name == "curl" and 
 process.args like~ "http*/Homebrew/install/HEAD/install.sh" and
 not process.args like~ "https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh"
Raw source Malicious Homebrew Initial Access · Elastic TOML
Esc
Published by elastic/protections-artifacts ↗, licensed under Elastic License 2.0 ↗. Reproduced here unmodified.
[rule]
description = """
Detects attempts to trick users into installing a malicious version of Homebrew that spoofs the official Homebrew
installation url. This has been observed several times in the wild as a method of gaining initial access by adversaries
and red teams alike.
"""
id = "88cb5440-a3fd-465a-8fbf-3769df14a577"
license = "Elastic License v2"
name = "Malicious Homebrew Initial Access"
os_list = ["macos"]
version = "1.0.4"

query = '''
process where event.type == "start" and event.action == "exec" and process.name == "curl" and 
 process.args like~ "http*/Homebrew/install/HEAD/install.sh" and
 not process.args like~ "https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh"
'''

min_endpoint_version = "8.16.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1204"
name = "User Execution"
reference = "https://attack.mitre.org/techniques/T1204/"


[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1105"
name = "Ingress Tool Transfer"
reference = "https://attack.mitre.org/techniques/T1105/"


[threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"

[internal]
min_endpoint_version = "8.16.0"

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.