Back to skill

Security audit

Macos Connectivity Restore

Security checks for vulnerabilities and agentic risk

Overview

The skill’s purpose is mostly clear, but its persistent root startup job can execute a user-writable script path, creating a serious local privilege-escalation risk.

Review before installing. One-time repair behavior is understandable, but avoid installing the persistence workflow unless the root script is copied to a root-owned, non-user-writable location and uninstall steps are provided. This should be treated as a privileged system modification tool, not a routine preference helper.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/install-startup.sh:4
Finding

User-Writable Script Executed by a Root LaunchDaemon

Content
View full analysis
ProgramArguments ${SCRIPT_DIR}/restore-root.sh ${TARGET_USER} ``` The documented installation location is within the user's home directory: ```markdown 1. Ensure this skill has been installed to a stable path under `~/.claude/skills/macos-connectivity-restore`. 2. Run `scripts/install-startup.sh`. 3. Confirm these startup items exist: - `/Library/LaunchDaemons/com.joseph.macos-connectivity-restore.root.plist` - `~/Library/LaunchAgents/com.joseph.macos-connectivity-restore.user.plist` ``` ### Technical Analysis The installer creates a system LaunchDaemon whose `ProgramArguments` directly reference `restore-root.sh` in the Skill's existing directory. According to the documented workflow, that directory is under the target user's home directory. System LaunchDaemons execute as root unless another account is explicitly configured. Although the generated LaunchDaemon property list is copied into `/Library/LaunchDaemons`, assigned to `root:wheel`, and given mode `644`, the executable referenced by the property list is not copied into a root-controlled location. The installer only runs `chmod +x` on the original script and does not remove write access from the target user or verify that the script and all parent directories are owned and controlled by root. As a result, the target user—or malware already executing as that user—can replace or modify `restore-root.sh` after the administrator approves installation. When the LaunchDaemon subsequently starts, it executes the modified script with root pri ...[truncated 1914 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (63)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill description claims a bounded restorative action, but the documented behavior edits or creates managed preference files to enable AirDrop and Universal Control policy keys. Description-behavior mismatch is dangerous because reviewers and users may approve the skill under a narrower trust assumption while it actually changes policy-enforced system configuration.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill description claims a bounded restorative action, but the documented behavior edits or creates managed preference files to enable AirDrop and Universal Control policy keys. Description-behavior mismatch is dangerous because reviewers and users may approve the skill under a narrower trust assumption while it actually changes policy-enforced system configuration.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares executable shell-driven behavior but does not define any tool scope or allowed-tools boundaries. In practice, this leaves a powerful operational skill under-specified and increases the chance an agent will invoke shell actions with broader privileges than intended, including root-level changes described elsewhere in the file.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
93% confidence
Finding

The skill explicitly requires running a script as root to modify managed preferences under /Library/Managed Preferences. Any root-executed script is high risk because mistakes, path confusion, or hidden logic in the referenced script could alter system policy, weaken controls, or damage the host with full administrative privileges.

Content

Scanner excerpt · SKILL.md (reported line 39)May include surrounding context.

md
## Scripts

- `scripts/restore-root.sh`
  - Run as root. Fixes the managed preference files under `/Library/Managed Preferences`.
- `scripts/restore-user.sh`
  - Run as the logged-in user. Sets AirDrop receiving mode to `Contacts Only`.
- `scripts/install-startup.sh`

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The persistence section instructs installation of a LaunchDaemon and LaunchAgent that automatically reapply settings after reboot/login, but it lacks a prominent warning about ongoing autonomous modification of system and user settings. This reduces informed consent and can cause users to unintentionally install durable behavior that survives normal session boundaries.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
97% confidence
Finding

This line documents installation of a root LaunchDaemon, which is a true persistence mechanism that causes behavior to be re-applied automatically after reboot. Root-level startup persistence is especially sensitive because it can continually override administrator or user intent and executes with elevated privileges.

Content

Scanner excerpt · SKILL.md (reported line 64)May include surrounding context.

md
1. Ensure this skill has been installed to a stable path under `~/.claude/skills/macos-connectivity-restore`.
2. Run `scripts/install-startup.sh`.
3. Confirm these startup items exist:
   - `/Library/LaunchDaemons/com.joseph.macos-connectivity-restore.root.plist`
   - `~/Library/LaunchAgents/com.joseph.macos-connectivity-restore.user.plist`

## Verification Commands

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

This line documents a user LaunchAgent, which is a genuine login persistence mechanism. Even if intended for benign remediation, it automatically reasserts settings every login and can reduce user control or mask future troubleshooting by silently undoing changes.

Content

Scanner excerpt · SKILL.md (reported line 65)May include surrounding context.

md
2. Run `scripts/install-startup.sh`.
3. Confirm these startup items exist:
   - `/Library/LaunchDaemons/com.joseph.macos-connectivity-restore.root.plist`
   - `~/Library/LaunchAgents/com.joseph.macos-connectivity-restore.user.plist`

## Verification Commands

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

The defined paths under /Library/LaunchDaemons and the user's LaunchAgents directory indicate creation of persistent auto-start mechanisms. In a repair skill, this is more dangerous than a transient action because it causes future code execution at boot/login rather than a one-time fix.

Content

Scanner excerpt · scripts/install-startup.sh (reported line 11)May include surrounding context.

sh
ROOT_LABEL="com.joseph.macos-connectivity-restore.root"
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

The defined paths under /Library/LaunchDaemons and the user's LaunchAgents directory indicate creation of persistent auto-start mechanisms. In a repair skill, this is more dangerous than a transient action because it causes future code execution at boot/login rather than a one-time fix.

Content

Scanner excerpt · scripts/install-startup.sh (reported line 11)May include surrounding context.

sh
ROOT_LABEL="com.joseph.macos-connectivity-restore.root"
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

The per-user LaunchAgent path establishes login-session persistence for user-context execution. Combined with the root daemon, this broadens automatic execution coverage and makes the skill's behavior persist after reboot/login, which is significant for a settings-restoration tool.

Content

Scanner excerpt · scripts/install-startup.sh (reported line 12)May include surrounding context.

sh
ROOT_LABEL="com.joseph.macos-connectivity-restore.root"
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

The per-user LaunchAgent path establishes login-session persistence for user-context execution. Combined with the root daemon, this broadens automatic execution coverage and makes the skill's behavior persist after reboot/login, which is significant for a settings-restoration tool.

Content

Scanner excerpt · scripts/install-startup.sh (reported line 12)May include surrounding context.

sh
ROOT_LABEL="com.joseph.macos-connectivity-restore.root"
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 21)May include surrounding context.

md
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 23)May include surrounding context.

md
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 26)May include surrounding context.

md
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 70)May include surrounding context.

md
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 71)May include surrounding context.

md
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/install-startup.sh (reported line 13)May include surrounding context.

sh
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/install-startup.sh (reported line 21)May include surrounding context.

sh
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/install-startup.sh (reported line 22)May include surrounding context.

sh
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/install-startup.sh (reported line 38)May include surrounding context.

sh
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/install-startup.sh (reported line 43)May include surrounding context.

sh
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/install-startup.sh (reported line 44)May include surrounding context.

sh
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/install-startup.sh (reported line 63)May include surrounding context.

sh
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/restore-root.sh (reported line 24)May include surrounding context.

sh
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/restore-root.sh (reported line 29)May include surrounding context.

sh
USER_LABEL="com.joseph.macos-connectivity-restore.user"
ROOT_PLIST="/Library/LaunchDaemons/${ROOT_LABEL}.plist"
USER_PLIST="/Users/${TARGET_USER}/Library/LaunchAgents/${USER_LABEL}.plist"
ROOT_TMP="/tmp/${ROOT_LABEL}.plist"
ROOT_INSTALL_SH="/tmp/${ROOT_LABEL}.install.sh"

mkdir -p "/Users/${TARGET_USER}/Library/LaunchAgents"