T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:32- Finding
Unverified Remote Installer Is Executed Directly by Bash
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a legitimate remote Mac control setup, but it creates durable remote desktop and SSH access with under-scoped safety controls.
Install only if you intentionally want an always-on remote agent to control a logged-in, unlocked Mac. Before using it, replace curl-to-Bash with a verified installer, use a dedicated low-privilege Mac account and restricted SSH key, confirm the reverse tunnel is loopback-only, enforce bounded cua-driver mode in the LaunchAgent, review generated plist/YAML files before loading or appending them, and document how to unload LaunchAgents, remove the SSH key, and disable Remote Login.
SKILL.md:32Unverified Remote Installer Is Executed Directly by Bash
scripts/setup-mac.sh:35Unvalidated Environment Values Are Embedded in Persistent Shell and LaunchAgent Files
SKILL.md:55SSH Key Authorization Grants a General User Shell Beyond the MCP Requirement
scripts/setup-mac.sh:35Persistent Desktop-Control Daemon Does Not Enforce the Documented Bounded Mode
scripts/gen-mcp-config.py:13Environment-Controlled Values Are Emitted as Unsafe YAML
The README instructs users to execute a network-fetched shell script with curl-piped-to-bash, then enable SSH login daemons and background reconnect services, without any strong warning or verification steps. This is dangerous because it combines unverified remote code execution with persistent remote access, so compromise of the download source, DNS/TLS trust chain, or operator mistakes could immediately lead to full host takeover or long-lived backdoor access.
The README directs users to run a shell command that executes a remotely fetched install script, a classic high-risk pattern because the content is not pinned or verified before execution. In this skill, the danger is amplified by the fact that the installed component is then granted powerful desktop-control permissions, so any compromise of the installer source could lead to immediate arbitrary code execution plus surveillance and input-control capabilities.
# 1. Install cua-driver & grant Accessibility/Screen permissions
/bin/bash -c "$(curl -fsSL https://cua.ai/driver/install.sh)"
cua-driver permissions grant
# 2. Enable SSH Remote Login
The README instructs use of a specific SSH private key path to generate MCP configuration, which normalizes agent workflows that depend on stored credentials for remote desktop access. This is risky because the skill is connecting a remote agent to a local machine; if the server, agent config, or key permissions are weak, the private key reference can facilitate unauthorized reuse or compromise of the Mac access path.
Generate the MCP config fragment and append to ~/.hermes/config.yaml:
MAC_USER="<mac-username>" REVERSE_PORT=2299 REMOTE_KEY=~/.ssh/id_ed25519_mac python3 ./scripts/gen-mcp-config.py >> ~/.hermes/config.yaml
This is the Chinese-language duplicate referencing an SSH private key path in generated MCP configuration, with the same credential exposure risk. In this skill's context, the key is part of the control path for remote access to the Mac, so misuse or leakage could directly enable unauthorized desktop control.
生成 MCP 配置并追加到 ~/.hermes/config.yaml:
MAC_USER="<Mac用户名>" REVERSE_PORT=2299 REMOTE_KEY=~/.ssh/id_ed25519_mac python3 ./scripts/gen-mcp-config.py >> ~/.hermes/config.yaml
The skill requires installing SSH key-based access into the Mac user's authorized_keys to permit persistent remote entry from the server. In the context of an always-on reverse tunnel and unlocked desktop, that credential path creates durable remote access that could be abused if the server, private key, or target account is compromised.
- A Mac that stays **logged in, awake, unlocked** (see "Background persistence").
- macOS Accessibility + Screen Recording grants for `CuaDriver.app`.
- SSH access **from the server to the Mac** (Remote Login enabled + the server's public key in the Mac's `~/.ssh/authorized_keys`).
- cua-driver installed on the Mac (`/bin/bash -c "$(curl -fsSL https://cua.ai/driver/install.sh)"`).
> **Privacy note:** replace every `<...>` placeholder with your own values. None of the scripts contain a real username or server address by default; you supply them via environment variables. The default `REMOTE_USER=ubuntu` is just the common cloud-image user and is not tied to anyone.
The skill instructs users to execute a remote install script fetched via curl directly into bash, which is a classic supply-chain and command-injection risk. If the hosting domain, TLS trust, CDN path, or script content is compromised, the user would execute attacker-controlled code on the Mac with the permissions needed to establish remote-control infrastructure.
- A Mac that stays **logged in, awake, unlocked** (see "Background persistence").
- macOS Accessibility + Screen Recording grants for `CuaDriver.app`.
- SSH access **from the server to the Mac** (Remote Login enabled + the server's public key in the Mac's `~/.ssh/authorized_keys`).
- cua-driver installed on the Mac (`/bin/bash -c "$(curl -fsSL https://cua.ai/driver/install.sh)"`).
> **Privacy note:** replace every `<...>` placeholder with your own values. None of the scripts contain a real username or server address by default; you supply them via environment variables. The default `REMOTE_USER=ubuntu` is just the common cloud-image user and is not tied to anyone.
Adding a server-controlled key to the Mac's authorized_keys is the mechanism that grants remote access. Because this skill is specifically designed for persistence and background reconnection, compromise of the server side would directly grant access to the Mac session and its GUI control path.
macOS recently tightened
systemsetup -setremotelogin onto require Full Disk Access. Thelaunchctl enable/kickstartpath avoids that. If sshd won't start, check/etc/ssh/sshd_configfor stray client options (e.g.ServerAliveInterval,ServerAliveCountMax) — they are invalid there and make sshd exit immediately.
On the server, generate a keypair, then add its public key to the Mac's ~/.ssh/authorized_keys:
ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519_mac
ssh-copy-id -i ~/.ssh/id_ed25519_mac.pub -p <revport> <mac_user>@127.0.0.1 # only after tunnel is up
Manual placement of a public key into /Users/<mac_user>/.ssh/authorized_keys establishes persistent trust for remote login. In this skill's context, that trust is coupled to a reverse tunnel and unlocked desktop, which raises the consequence of any credential misuse.
ssh-keygen -t ed25519 -N "" -f ~/.ssh/id_ed25519_mac ssh-copy-id -i ~/.ssh/id_ed25519_mac.pub -p <mac_user>@127.0.0.1 # only after tunnel is up
Or copy the public key manually into `/Users/<mac_user>/.ssh/authorized_keys`.
### 4. On the Mac: run this skill's setup script (daemon + tunnel + keep-awake)
```bash
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
~/.hermes/config.yaml under `mcp_servers:` (indent to that level).
REQUIRED env: MAC_USER (the macOS account on the Mac)
OPTIONAL env: REVERSE_PORT (default 2299) REMOTE_KEY (default ~/.ssh/id_ed25519_mac)
MAC_CUA (default /Users/<MAC_USER>/.local/bin/cua-driver)
SERVER_NAME (default mac_computer)
"""
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
~/.hermes/config.yaml under `mcp_servers:` (indent to that level).
REQUIRED env: MAC_USER (the macOS account on the Mac)
OPTIONAL env: REVERSE_PORT (default 2299) REMOTE_KEY (default ~/.ssh/id_ed25519_mac)
MAC_CUA (default /Users/<MAC_USER>/.local/bin/cua-driver)
SERVER_NAME (default mac_computer)
"""
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
~/.hermes/config.yaml under `mcp_servers:` (indent to that level).
REQUIRED env: MAC_USER (the macOS account on the Mac)
OPTIONAL env: REVERSE_PORT (default 2299) REMOTE_KEY (default ~/.ssh/id_ed25519_mac)
MAC_CUA (default /Users/<MAC_USER>/.local/bin/cua-driver)
SERVER_NAME (default mac_computer)
"""
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
~/.hermes/config.yaml under `mcp_servers:` (indent to that level).
REQUIRED env: MAC_USER (the macOS account on the Mac)
OPTIONAL env: REVERSE_PORT (default 2299) REMOTE_KEY (default ~/.ssh/id_ed25519_mac)
MAC_CUA (default /Users/<MAC_USER>/.local/bin/cua-driver)
SERVER_NAME (default mac_computer)
"""
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
~/.hermes/config.yaml under `mcp_servers:` (indent to that level).
REQUIRED env: MAC_USER (the macOS account on the Mac)
OPTIONAL env: REVERSE_PORT (default 2299) REMOTE_KEY (default ~/.ssh/id_ed25519_mac)
MAC_CUA (default /Users/<MAC_USER>/.local/bin/cua-driver)
SERVER_NAME (default mac_computer)
"""
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
~/.hermes/config.yaml under `mcp_servers:` (indent to that level).
REQUIRED env: MAC_USER (the macOS account on the Mac)
OPTIONAL env: REVERSE_PORT (default 2299) REMOTE_KEY (default ~/.ssh/id_ed25519_mac)
MAC_CUA (default /Users/<MAC_USER>/.local/bin/cua-driver)
SERVER_NAME (default mac_computer)
"""
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
echo
echo "==> human-only steps (cannot be automated):"
echo " 1. Grant CuaDriver permissions: cua-driver permissions grant"
echo " 2. Enable Remote Login: sudo launchctl enable system/com.openssh.sshd && sudo launchctl kickstart -k system/com.openssh.sshd"
echo " 3. Auto-login + no lock (System Settings -> Users & Groups -> Login Options; Screen Saver -> Never)"
echo " 4. Add the server's SSH public key to ~/.ssh/authorized_keys"
echo
The script instructs the user to place the server's SSH public key into ~/.ssh/authorized_keys, granting that remote server passwordless login capability to the Mac account. In combination with the reverse tunnel and persistent daemonization, this creates durable remote access that becomes dangerous if the server or its key material is compromised.
echo " 1. Grant CuaDriver permissions: cua-driver permissions grant"
echo " 2. Enable Remote Login: sudo launchctl enable system/com.openssh.sshd && sudo launchctl kickstart -k system/com.openssh.sshd"
echo " 3. Auto-login + no lock (System Settings -> Users & Groups -> Login Options; Screen Saver -> Never)"
echo " 4. Add the server's SSH public key to ~/.ssh/authorized_keys"
echo
echo "Verify later with: bash ./scripts/doctor-mac.sh"
The README explicitly promotes remote/cloud control of a local Mac desktop, including clicking, typing, screenshots, and app execution, but does not prominently warn users about the privacy and security implications of granting Accessibility, Screen Recording, and remote-control capabilities. In this context, the omission is dangerous because the skill is specifically designed to bridge a local desktop to a remote agent, materially increasing the risk of surveillance, unauthorized actions, and sensitive data exposure if the server or agent is compromised.
The README states that Hermes will automatically execute SKILL.md to guide setup, which encourages autonomous execution of installation and connectivity steps. In a skill that provisions remote desktop control and SSH tunneling, automatic execution materially increases risk because users may trigger sensitive actions without reviewing commands that establish persistence or grant broad permissions.
Prompt Example: "Help me set up remote macOS computer use. My cloud server IP is
203.0.113.10, server user isubuntu, and my Mac user isalice."
Hermes will automatically execute SKILL.md to guide the setup:
This command enables the system OpenSSH daemon with sudo, modifying system-wide remote access behavior. In the context of a skill designed to let a remote agent control a local Mac, enabling SSH is a meaningful security-sensitive action because it expands the attack surface and can facilitate continued remote entry if the remote host, credentials, or tunnel are compromised.
cua-driver permissions grant
# 2. Enable SSH Remote Login
sudo launchctl enable system/com.openssh.sshd
sudo launchctl kickstart -k system/com.openssh.sshd
# 3. Start auto-reconnect background daemons
Enabling sshd via launchctl establishes persistent remote-login capability across reboots. For a skill whose purpose is durable remote desktop access, persistence is especially sensitive because it can outlive user awareness and maintain an access channel even after the immediate setup session ends.
cua-driver permissions grant
# 2. Enable SSH Remote Login
sudo launchctl enable system/com.openssh.sshd
sudo launchctl kickstart -k system/com.openssh.sshd
# 3. Start auto-reconnect background daemons
This sudo command force-starts the SSH daemon, immediately activating remote login service. That is dangerous in this context because the skill's purpose is to establish remote control and persistence, so starting sshd right away can expose the host to remote access before the user has fully reviewed key restrictions, firewall rules, and trust boundaries.
# 2. Enable SSH Remote Login
sudo launchctl enable system/com.openssh.sshd
sudo launchctl kickstart -k system/com.openssh.sshd
# 3. Start auto-reconnect background daemons
REMOTE_HOST="<server-ip>" REMOTE_USER="ubuntu" REVERSE_PORT=2299 bash ./scripts/setup-mac.sh
Appending generated MCP configuration directly into ~/.hermes/config.yaml changes how the agent connects to external systems and may embed or reference sensitive SSH key material, yet the README does not warn users about these trust and exposure implications. In this skill's context, this is risky because the configuration is specifically wiring a remote agent to a local desktop over SSH, so unnoticed config changes can broaden agent reach and persist access beyond user intent.
This is the Chinese-language duplicate of the sudo command enabling system SSH service, carrying the same risk of expanding remote access on the Mac. Because the skill is expressly for remote desktop control, enabling OS-level SSH without a strong warning or hardening guidance creates a meaningful security exposure.
cua-driver permissions grant
# 2. 开启远程登录 (SSH)
sudo launchctl enable system/com.openssh.sshd
sudo launchctl kickstart -k system/com.openssh.sshd
# 3. 启动后台守护进程(隧道自愈 + 防休眠)
This Chinese-language duplicate enables persistent SSH service through launchctl, preserving remote access over time. In a remote-control skill, such persistence increases the risk of unnoticed continued access if the remote endpoint or credentials are later compromised.
cua-driver permissions grant
# 2. 开启远程登录 (SSH)
sudo launchctl enable system/com.openssh.sshd
sudo launchctl kickstart -k system/com.openssh.sshd
# 3. 启动后台守护进程(隧道自愈 + 防休眠)
This Chinese-language command immediately starts the SSH daemon with elevated privileges, making remote login active at once. In a setup that also configures reverse tunneling and background persistence, immediate activation increases the chance of unintended exposure if the surrounding security controls are not yet in place.
# 2. 开启远程登录 (SSH)
sudo launchctl enable system/com.openssh.sshd
sudo launchctl kickstart -k system/com.openssh.sshd
# 3. 启动后台守护进程(隧道自愈 + 防休眠)
REMOTE_HOST="<云服务器IP>" REMOTE_USER="ubuntu" REVERSE_PORT=2299 bash ./scripts/setup-mac.sh