T06 · System Persistence
- Location
references/setup.md:48- Finding
Persistent Execution of a Third-Party MCP Binary Through a macOS LaunchAgent
- Content
View full analysis
~/Library/LaunchAgents/com.xiaohongshu.mcp.plist << 'EOF' Label com.xiaohongshu.mcp ProgramArguments /Users/YOUR_USERNAME/xiaohongshu-mcp-darwin-arm64 RunAtLoad WorkingDirectory /Users/YOUR_USERNAME/xiaohongshu-mcp EOF launchctl load ~/Library/LaunchAgents/com.xiaohongshu.mcp.plist ``` ### Technical Analysis The setup instructions create a per-user macOS LaunchAgent and immediately register it with `launchctl`. The `RunAtLoad` property causes the specified MCP executable to run automatically when the user logs in, allowing execution to continue across sessions. Cross-session startup is not required for the Skill's core functions of generating content and publishing a post. The MCP service can instead be started explicitly when a user intends to publish. The persistence mechanism therefore exceeds the minimum execution lifetime necessary for the declared functionality. The persisted executable is also a separately downloaded third-party binary. The LaunchAgent contains no integrity check, version pin, sandbox profile, resource restriction, or other control that would prevent a replaced or compromised executable at the configured path from being launched automatically. ### Attack Path 1. A user follows the setup guide and downloads the externally hosted MCP executable. 2. The user creates the LaunchAgent property list under `~/Library/LaunchAgents`. 3. The user loads the property list with `launchc ...[truncated 944 chars]- Remediation
View remediation
