T05 · Unauthorized Access and Privilege Escalation
- Location
SERVER_PROFILE.md:7- Finding
Shared Root SSH Key Creates Fleet-Wide Privilege Exposure
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is not clearly malicious, but it requests broad scheduled root-level server control with weak scoping and approval safeguards.
Review before installing. Use isolated testing first, replace the shared root key with per-host or per-client least-privilege credentials, authenticate approval replies through a trusted channel, remove or heavily restrict APPROVE ALL, validate client/server identifiers before file writes, and disable local CVE inventory fallback unless explicitly intended. Also decide whether /etc/shadow-derived checks can be replaced with safer derived-only outputs and redaction controls.
SERVER_PROFILE.md:7Shared Root SSH Key Creates Fleet-Wide Privilege Exposure
hooks/on-confirm-reply.md:6Approval Hook Does Not Explicitly Authenticate the Authorizing Sender
cve/cve-scan.sh:29Unvalidated Client and Server Identifiers Permit Filesystem Path Traversal
cve/cve-scan.sh:292Local Fallback Transmits Guardian-Host Package Inventory to OSV
The profile specifies a single shared SSH private key path used across all servers and explicitly states that all servers use the same root key. In a multi-client security automation context, compromise of that one key would grant broad root access across the entire fleet, creating a high-value single point of failure and enabling cross-client compromise.
## SSH MCP (REQUIRED — hard dependency)
- ssh_mcp_version: v2
- shared_key: ~/.ssh/id_ed25519 # All servers use same root key
## Email Accounts
- default: "" # The account used for ALL outgoing reports and alerts
This server entry shows root access configured with the same reusable SSH key path. Combined with the global shared_key setting, it reinforces that privileged access is centralized into one credential, magnifying blast radius if the key or agent environment is compromised.
| Server Name | Host | Port | Username | Key Path | Connection ID |
|-------------|------|------|----------|----------|---------------|
| server-01 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-02 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-03 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-04 | | 22 | root | ~/.ssh/id_ed25519 | |
This line repeats the pattern of direct root access using the same SSH key path for another server. Reuse of a privileged credential across multiple systems materially increases the chance of lateral movement and whole-fleet compromise.
| Server Name | Host | Port | Username | Key Path | Connection ID |
|-------------|------|------|----------|----------|---------------|
| server-01 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-02 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-03 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-04 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-05 | | 22 | root | ~/.ssh/id_ed25519 | |
Another server is configured for root login with the same key path, confirming a systemic credential-reuse issue rather than an isolated example. In a multi-client fleet-management skill, this design makes credential theft exceptionally damaging.
|-------------|------|------|----------|----------|---------------|
| server-01 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-02 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-03 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-04 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-05 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-06 | | 22 | root | ~/.ssh/id_ed25519 | |
This line continues the same pattern of root plus shared key usage. Because the skill runs autonomous nightly audits, any compromise of the executing environment or its key store could repeatedly expose or misuse this credential at scale.
| server-01 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-02 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-03 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-04 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-05 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-06 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-07 | | 22 | root | ~/.ssh/id_ed25519 | |
The configuration again ties privileged access for an additional server to the same SSH private key path. Repetition across fleet entries demonstrates insecure access architecture with substantial lateral-movement risk.
| server-02 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-03 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-04 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-05 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-06 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-07 | | 22 | root | ~/.ssh/id_ed25519 | |
This server record indicates direct root authentication through the same common key path. The danger is amplified because the skill spans multiple client environments, so one stolen key could collapse tenant separation and trust boundaries.
| server-03 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-04 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-05 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-06 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-07 | | 22 | root | ~/.ssh/id_ed25519 | |
### Per-Server Config
This final listed server also uses the same root key path, confirming consistent insecure credential reuse across the fleet. A single exposed private key would enable unauthorized root-level access to many servers with minimal additional effort.
| server-04 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-05 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-06 | | 22 | root | ~/.ssh/id_ed25519 | |
| server-07 | | 22 | root | ~/.ssh/id_ed25519 | |
### Per-Server Config
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
### Per-Server Config
| Server | Expected Ports | Expected Services | Sudo Users | SSL Domains |
|--------|---------------|-------------------|------------|-------------|
| server-01 | 22, 80, 443 | sshd, nginx | | |
| server-02 | 22, 80, 443 | sshd, nginx | | |
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
### Per-Server Config
| Server | Expected Ports | Expected Services | Sudo Users | SSL Domains |
|--------|---------------|-------------------|------------|-------------|
| server-01 | 22, 80, 443 | sshd, nginx | | |
| server-02 | 22, 80, 443 | sshd, nginx | | |
The declared description presents a comprehensive remote Linux security management skill with broad auditing and some controlled remediation across all clients and servers. The actual code chunk is much narrower: it only performs external CVE-source aggregation and report generation for one client/server at a time. It does include some declared sub-scope—specifically CISA KEV, OSV.dev, and NVD-based CVE scanning—but the overwhelming majority of the declared functionality is absent in this code. Additionally, the implementation includes local system inspection fallbacks (dpkg-query, rpm, /etc/os-release), which suggests local execution behavior rather than purely SSH-based remote fleet management. This is a material description/behavior mismatch, even if this file could be one component of a larger system, because the supplied chunk itself does not substantiate most of the declared purpose.
The supplied code does not implement the declared security-audit behavior. Instead, its primary purpose is maintaining backups of the skill's own files and restoring them locally. This is materially different from autonomous SSH-based Linux server security management, CVE scanning, hardening, reporting, or scheduled audit execution. The script also uses hardcoded local paths, which conflicts with the declaration that owner-specific configuration lives in config and that there are no hardcoded names/domains/emails; while not about emails/domains directly, it still shows undeclared, specific local resource usage. This is not merely a supporting implementation detail for auditing—it is a separate maintenance capability with distinct behavior and resources.
Reading /etc/shadow specifically exposes password-hash data and account metadata from remote hosts. In a multi-client automation context, centralizing such material on the guardian host or including it in artifacts dramatically enlarges blast radius if the host, logs, or email channel are compromised.
| Module | What it checks | SSH MCP Command |
|--------|---------------|-----------------|
| `01-system` | OS, kernel, uptime, last reboot, hardware | `ssh_exec(op="run", sessionId, command="uname -a; cat /etc/*release")` |
| `02-users` | Accounts, root access, sudo, empty passwords, inactive | `ssh_exec(op="run", sessionId, command="cat /etc/passwd; cat /etc/shadow; ...")` |
| `03-ssh` | sshd_config full audit — 20+ checks + weak ciphers/MACs/KexAlgorithms (CIS) | `ssh_exec(op="run", sessionId, command="cat /etc/ssh/sshd_config; sshd -T 2>/dev/null | grep -iE 'ciphers|macs|kex'")` |
| `04-auth` | Login history, failed logins, PAM config, fail2ban auto-install + SSH jail config, password policy enforcement | `ssh_exec(op="run", sessionId, command="last; cat /var/log/auth.log")` |
| `05-services` | Running services, unnecessary ones, failed units | `ssh_exec(op="run", sessionId, command="systemctl list-units ...")` |
Reading /etc/shadow specifically exposes password-hash data and account metadata from remote hosts. In a multi-client automation context, centralizing such material on the guardian host or including it in artifacts dramatically enlarges blast radius if the host, logs, or email channel are compromised.
| Module | What it checks | SSH MCP Command |
|--------|---------------|-----------------|
| `01-system` | OS, kernel, uptime, last reboot, hardware | `ssh_exec(op="run", sessionId, command="uname -a; cat /etc/*release")` |
| `02-users` | Accounts, root access, sudo, empty passwords, inactive | `ssh_exec(op="run", sessionId, command="cat /etc/passwd; cat /etc/shadow; ...")` |
| `03-ssh` | sshd_config full audit — 20+ checks + weak ciphers/MACs/KexAlgorithms (CIS) | `ssh_exec(op="run", sessionId, command="cat /etc/ssh/sshd_config; sshd -T 2>/dev/null | grep -iE 'ciphers|macs|kex'")` |
| `04-auth` | Login history, failed logins, PAM config, fail2ban auto-install + SSH jail config, password policy enforcement | `ssh_exec(op="run", sessionId, command="last; cat /var/log/auth.log")` |
| `05-services` | Running services, unnecessary ones, failed units | `ssh_exec(op="run", sessionId, command="systemctl list-units ...")` |
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
# Linux Security Guardian — Soul Context
## [WORKSPACE OWNER]
<!-- Loaded from core-extra/config/profile.md at runtime -->
- Owner: [core-extra/config/profile.md → Owner.name]
- Server: linux-security-guardian
- Initialized: [YYYY-MM-DD]
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# All users with login shell
grep -v "nologin\|false\|sync\|halt\|shutdown" /etc/passwd | cut -d: -f1,3,6,7
# UID 0 accounts (should only be root)
awk -F: '($3 == 0) { print $1 }' /etc/passwd
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# All users with login shell
grep -v "nologin\|false\|sync\|halt\|shutdown" /etc/passwd | cut -d: -f1,3,6,7
# UID 0 accounts (should only be root)
awk -F: '($3 == 0) { print $1 }' /etc/passwd
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# All users with login shell
grep -v "nologin\|false\|sync\|halt\|shutdown" /etc/passwd | cut -d: -f1,3,6,7
# UID 0 accounts (should only be root)
awk -F: '($3 == 0) { print $1 }' /etc/passwd
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# All users with login shell
grep -v "nologin\|false\|sync\|halt\|shutdown" /etc/passwd | cut -d: -f1,3,6,7
# UID 0 accounts (should only be root)
awk -F: '($3 == 0) { print $1 }' /etc/passwd
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# All users with login shell
grep -v "nologin\|false\|sync\|halt\|shutdown" /etc/passwd | cut -d: -f1,3,6,7
# UID 0 accounts (should only be root)
awk -F: '($3 == 0) { print $1 }' /etc/passwd
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# All users with login shell
grep -v "nologin\|false\|sync\|halt\|shutdown" /etc/passwd | cut -d: -f1,3,6,7
# UID 0 accounts (should only be root)
awk -F: '($3 == 0) { print $1 }' /etc/passwd
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# All users with login shell
grep -v "nologin\|false\|sync\|halt\|shutdown" /etc/passwd | cut -d: -f1,3,6,7
# UID 0 accounts (should only be root)
awk -F: '($3 == 0) { print $1 }' /etc/passwd
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# All users with login shell
grep -v "nologin\|false\|sync\|halt\|shutdown" /etc/passwd | cut -d: -f1,3,6,7
# UID 0 accounts (should only be root)
awk -F: '($3 == 0) { print $1 }' /etc/passwd
The module instructs reading /etc/shadow, a highly sensitive credential store, to detect empty passwords. Although the intent is defensive, this increases exposure of credential material in an autonomous system that also sends reports externally; unsafe logging, transport, or reuse of raw command output could leak sensitive account data.
ls /etc/sudoers.d/
# Empty passwords (CRITICAL)
awk -F: '($2 == "" || $2 == "!!" ) { print $1 }' /etc/shadow 2>/dev/null
# Password age
awk -F: '{print $1, $5}' /etc/shadow 2>/dev/null | grep "^[^:]*:[0-9]"
This command again reads /etc/shadow to inspect password age, which touches credential-adjacent sensitive data. In an autonomous multi-client audit pipeline, centralizing or exporting this information can expand blast radius if logs, reports, or the email plugin are compromised.
awk -F: '($2 == "" || $2 == "!!" ) { print $1 }' /etc/shadow 2>/dev/null
# Password age
awk -F: '{print $1, $5}' /etc/shadow 2>/dev/null | grep "^[^:]*:[0-9]"
# Last login for all users
lastlog | grep -v "Never\|Username"
No suspicious patterns detected.