Tor Process Execution
Identifies execution of the Tor client on macOS. Tor routes traffic through a series of relays to conceal the origin of a connection. Adversaries use the tor process, including copies started from Terminal or via osascript, as a multi-hop proxy for command and control.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2026/11/17"
3integration = ["endpoint"]
4maturity = "production"
5updated_date = "2026/11/17"
6
7[rule]
8author = ["Elastic"]
9description = """
10Identifies execution of the Tor client on macOS. Tor routes traffic through a series of relays to conceal the
11origin of a connection. Adversaries use the tor process, including copies started from Terminal or via
12osascript, as a multi-hop proxy for command and control.
13"""
14from = "now-9m"
15index = ["logs-endpoint.events.process-*"]
16language = "eql"
17license = "Elastic License v2"
18name = "Tor Process Execution"
19references = [
20 "https://www.torproject.org/",
21]
22risk_score = 47
23rule_id = "0a943eb9-d2fe-4415-a944-3305be08d09a"
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 = [
51 "Domain: Endpoint",
52 "OS: macOS",
53 "Use Case: Threat Detection",
54 "Tactic: Command and Control",
55 "Data Source: Elastic Defend",
56 "Resources: Investigation Guide",
57 "Rule Type: Event Correlation (EQL)",
58 "Platform: macOS",
59]
60timestamp_override = "event.ingested"
61type = "eql"
62
63query = '''
64process where host.os.type == "macos" and event.type == "start" and event.action == "exec" and
65 process.name == "tor" and
66 not process.Ext.effective_parent.executable == "/Applications/Tor Browser.app/Contents/MacOS/firefox"
67'''
68
69note = """## Triage and analysis
70
71### Investigating Tor Process Execution
72
73Tor is a multi-hop proxy. On macOS the client is the `tor` process, whether it is the standalone daemon or the
74copy bundled with Tor Browser. Starting it from a shell, from Tor Browser, or by handing the command to Terminal
75with `osascript -e 'tell application "Terminal" to do script "tor"'` all result in this process start.
76
77### Possible investigation steps
78
79- Review `process.executable`, `process.command_line`, and `process.args` to see whether this is the Tor Browser
80 bundle, a package-manager install such as Homebrew, or a copy from a temporary or user-writable directory.
81- Search the same host for the parent `osascript` command line when the parent chain includes Terminal, and for a
82 follow-on network connection from `tor` shortly after the start.
83- Identify the user (`process.user.name`, `user.name`) and whether that account is expected to run Tor.
84- Review other alerts on the same host around this start for a preceding payload download or persistence item.
85
86### False positive analysis
87
88- Security testing that launches `tor`, including an AppleScript `do script "tor"` command, matches this rule.
89 Exclude the specific test host or user rather than the process name.
90
91### Response and remediation
92
93- If the execution is not authorized, terminate the `tor` process and isolate the host.
94- Remove any unauthorized Tor Browser bundle or standalone `tor` binary, and any LaunchAgent or shell profile
95 that starts it.
96- Review outbound connections from the process for command and control or data transfer.
97- Reset credentials for accounts that used the host while Tor was running, if follow-on malicious activity is found.
98"""
99
100[[rule.threat]]
101framework = "MITRE ATT&CK"
102
103[[rule.threat.technique]]
104id = "T1090"
105name = "Proxy"
106reference = "https://attack.mitre.org/techniques/T1090/"
107
108[[rule.threat.technique.subtechnique]]
109id = "T1090.003"
110name = "Multi-hop Proxy"
111reference = "https://attack.mitre.org/techniques/T1090/003/"
112
113[rule.threat.tactic]
114id = "TA0011"
115name = "Command and Control"
116reference = "https://attack.mitre.org/tactics/TA0011/"
Triage and analysis
Investigating Tor Process Execution
Tor is a multi-hop proxy. On macOS the client is the tor process, whether it is the standalone daemon or the
copy bundled with Tor Browser. Starting it from a shell, from Tor Browser, or by handing the command to Terminal
with osascript -e 'tell application "Terminal" to do script "tor"' all result in this process start.
Possible investigation steps
- Review
process.executable,process.command_line, andprocess.argsto see whether this is the Tor Browser bundle, a package-manager install such as Homebrew, or a copy from a temporary or user-writable directory. - Search the same host for the parent
osascriptcommand line when the parent chain includes Terminal, and for a follow-on network connection fromtorshortly after the start. - Identify the user (
process.user.name,user.name) and whether that account is expected to run Tor. - Review other alerts on the same host around this start for a preceding payload download or persistence item.
False positive analysis
- Security testing that launches
tor, including an AppleScriptdo script "tor"command, matches this rule. Exclude the specific test host or user rather than the process name.
Response and remediation
- If the execution is not authorized, terminate the
torprocess and isolate the host. - Remove any unauthorized Tor Browser bundle or standalone
torbinary, and any LaunchAgent or shell profile that starts it. - Review outbound connections from the process for command and control or data transfer.
- Reset credentials for accounts that used the host while Tor was running, if follow-on malicious activity is found.
References
Related rules
- Attempt to Establish Microsoft Dev Tunnel
- DNS Query with Padded Encoded Label
- Kubectl Network Configuration Modification
- DNS over HTTPS via Unsigned or Untrusted Binary
- Suspicious Curl from macOS Application