T09 · Insecure Skill Coding Practices
- Location
SKILL.md:11- Finding
SSH Host Verification Disabled for a Privileged Relay Connection
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 11-18
Vulnerability Type: Insecure SSH configuration
Risk Level: HighVulnerable Code:
text Host cloudrelay HostName 101.43.110.225 User administrator IdentityFile /home/cloudrelay/.ssh/id_rsa StrictHostKeyChecking=no BatchMode=yesTechnical Analysis
The SSH configuration explicitly sets
StrictHostKeyChecking=no. Consequently, the SSH client does not require the relay to present a previously trusted host key before using the configured private key to attempt authentication.This removes SSH's primary protection against server impersonation and machine-in-the-middle attacks. An attacker able to redirect or intercept traffic to
101.43.110.225could present an attacker-controlled SSH endpoint that the client accepts without an authenticity warning.The connection also uses the Windows
administratoraccount. Relay status checks and scheduled-task operations do not inherently require unrestricted administrator access, so the account appears broader than the minimum privilege required by the declared mail-server maintenance functionality. Although the Skill does not print, overwrite, or directly extract the private key, it causes that credential to be used against an unverified endpoint.An impersonating SSH server cannot derive the private key merely from public-key authentication. Nevertheless, it can observe attempted connection metadata and submitted commands, return forged status or log output, and potentially influence subsequent maintenance decisions. Separately, compromise of the configured credential would grant the privileges available to the remote administrator account.
Attack Path
- An attacker obtains a network position capable of redirecting traffic intended for
101.43.110.225, such as through route manipulation, local network compromise, or host-level redirection. - The attacker operates ...[truncated 1490 chars]
- An attacker obtains a network position capable of redirecting traffic intended for
- Remediation
View remediation
Remediation Suggestions
- Remove
StrictHostKeyChecking=noand require strict verification:text StrictHostKeyChecking=yes UserKnownHostsFile=/home/cloudrelay/.ssh/known_hosts - Provision the relay's verified host key into a protected
known_hostsfile through a trusted channel. Do not obtain and trust the key automatically during each invocation. - Replace the
administratorlogin with a dedicated service account that can only:- Query port
2526status. - Read the two required relay log files.
- Start and stop the named relay scheduled task.
- Query port
- Apply server-side SSH restrictions where supported, including command allowlisting, source-address restrictions, and denial of interactive shells, forwarding, and unrelated subsystem access.
- Protect the private key with restrictive ownership and permissions, and use a key dedicated exclusively to this relay.
- Fail closed when host-key verification fails. The Skill should not instruct an Agent to bypass or replace an unexpected host key without independent verification.
- Remove
