T05 · Unauthorized Access and Privilege Escalation
- Location
setup-guide.md:42- Finding
Passwordless SSH Key Grants Unrestricted Root Access to an AI Agent
- Content
View full analysis
``` ### Technical Analysis The guide directs the user to generate an unencrypted SSH private key specifically for use by an AI agent and authorize that key for direct login as `root`. Although privileged access is needed for portions of the initial installation, unrestricted and continuing root access exceeds the minimum privileges required for routine tunnel management. The absence of a passphrase means that possession of `~/.ssh/frp-vps` is sufficient to authenticate. No server-side restrictions such as `from=`, `restrict`, `command=`, or limited `sudo` rules are specified. Any process, extension, agent, or user capable of reading the private key can therefore obtain full administrative access to the VPS. ### Attack Path 1. An attacker compromises the local user account, AI-agent context, development tool, backup, or another process with read access to `~/.ssh/frp-vps`. 2. The attacker copies the unencrypted private key. 3. The attacker identifies the VPS address from the SSH configuration, command history, or Skill documentation. 4. The attacker runs: ```bash ssh -i frp-vps root@ ``` 5. Because the key is authorized directly for root and has no passphrase, the attacker receives an unrestricted root shell. 6. The attacker can replace FRP or Caddy, intercept tunneled traffic, extract configuration and credentials, or establish additional persistence. ### Impact Assessment Successful exploitation grants full root privile ...[truncated 448 chars]- Remediation
View remediation
