Back to skill

Security audit

Remote Disk Mount

Security checks for vulnerabilities and agentic risk

Overview

The skill is not overtly malicious, but its root-level mount guidance includes unsafe password handling and cleartext network examples that users should review carefully.

Review and modify the commands before use. Prefer SFTP or HTTPS WebDAV, avoid cleartext FTP and HTTP WebDAV, do not place passwords in generated shell commands, use a temporary credential file with strict permissions and cleanup, validate all server and mount-point inputs, and approve each sudo command only after checking the fully expanded command.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:67
Finding

Persistent Plaintext SMB Credentials at a Predictable Root-Owned Path

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:77
Finding

Cleartext FTP and WebDAV Transports Expose Credentials and Mounted Data

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:25
Finding

Unvalidated User Input Is Interpolated into Shell and Privileged Mount Commands

Content
View full analysis
``` ```bash # 1. Create credential file echo "username=$USERNAME" | sudo tee /root/.smbcredentials echo "password=$PASSWORD" | sudo tee -a /root/.smbcredentials sudo chmod 600 /root/.smbcredentials # 2. Mount sudo mount.cifs //SERVER_IP/share ~/mount_name -o credentials=/root/.smbcredentials,uid=1000,gid=1000 ``` ```bash curlftpfs -o user=$USERNAME ftp://SERVER_IP/ ~/mount_name ``` ```bash sshfs $USERNAME@SERVER_IP:/ ~/mount_name -o uid=1000,gid=1000 # Use -o identityfile=~/.ssh/id_rsa for key-based auth ``` ```bash sudo mount -t davfs http://SERVER_IP/webdav /mnt/webdav -o uid=1000,gid=1000 # Password prompted interactively ``` ### Technical Analysis The Skill instructs the Agent to collect hostnames, usernames, share names, and mount-point names and then place them into shell command templates. It provides no mandatory syntax validation, robust quoting rules, canonicalization, or rejection of shell metacharacters and option-like values. If an Agent performs literal string substitution, values containing whitespace, semicolons, command substitutions, redirection operators, glob characters, or leading hyphens can change how the shell or the called utility interprets the command. Quoting in the SMB credential-writing example does not solve all concerns: embedded newlines can alter the credential-file format, while the server, share, username, UR ...[truncated 2721 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (19)

Chaining Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

Piping data into a privileged writer (| sudo tee) is a chaining pattern that can amplify mistakes and causes command contents to traverse more surfaces such as logs and transcripts. In this skill, it is especially risky because the same pattern is used immediately adjacent to write a password, making the chaining approach part of an insecure secret-handling workflow.

Content

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

Credential file method:

bash
# 1. Create credential file
echo "username=$USERNAME" | sudo tee /root/.smbcredentials
echo "password=$PASSWORD" | sudo tee -a /root/.smbcredentials
sudo chmod 600 /root/.smbcredentials

Chaining Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

This pipeline sends a plaintext password through shell command text into sudo tee, creating multiple opportunities for disclosure via history, telemetry, transcripts, debugging output, or audit tooling. The combination of shell interpolation, pipeline chaining, and root file write makes this a true and material credential-handling vulnerability.

Content

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

bash
# 1. Create credential file
echo "username=$USERNAME" | sudo tee /root/.smbcredentials
echo "password=$PASSWORD" | sudo tee -a /root/.smbcredentials
sudo chmod 600 /root/.smbcredentials

# 2. Mount

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

Key-based auth (recommended):

bash
sshfs $USERNAME@SERVER_IP:/ ~/mount_name -o uid=1000,gid=1000
# Use -o identityfile=~/.ssh/id_rsa for key-based auth

WebDAV

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
## ⚠️ Security Guidelines

1. **Never pass passwords on command line** — Use credential files or interactive prompts instead
2. **Confirm with user before running sudo commands** — Don't auto-execute privileged operations
3. **Use SSH keys for SFTP** — Avoid password-based authentication
4. **Mount untrusted storage with caution** — It can expose local files

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
## ⚠️ Security Guidelines

1. **Never pass passwords on command line** — Use credential files or interactive prompts instead
2. **Confirm with user before running sudo commands** — Don't auto-execute privileged operations
3. **Use SSH keys for SFTP** — Avoid password-based authentication
4. **Mount untrusted storage with caution** — It can expose local files

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
## ⚠️ Security Guidelines

1. **Never pass passwords on command line** — Use credential files or interactive prompts instead
2. **Confirm with user before running sudo commands** — Don't auto-execute privileged operations
3. **Use SSH keys for SFTP** — Avoid password-based authentication
4. **Mount untrusted storage with caution** — It can expose local files

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
## ⚠️ Security Guidelines

1. **Never pass passwords on command line** — Use credential files or interactive prompts instead
2. **Confirm with user before running sudo commands** — Don't auto-execute privileged operations
3. **Use SSH keys for SFTP** — Avoid password-based authentication
4. **Mount untrusted storage with caution** — It can expose local files

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
## ⚠️ Security Guidelines

1. **Never pass passwords on command line** — Use credential files or interactive prompts instead
2. **Confirm with user before running sudo commands** — Don't auto-execute privileged operations
3. **Use SSH keys for SFTP** — Avoid password-based authentication
4. **Mount untrusted storage with caution** — It can expose local files

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
## ⚠️ Security Guidelines

1. **Never pass passwords on command line** — Use credential files or interactive prompts instead
2. **Confirm with user before running sudo commands** — Don't auto-execute privileged operations
3. **Use SSH keys for SFTP** — Avoid password-based authentication
4. **Mount untrusted storage with caution** — It can expose local files

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

bash
# SMB
sudo apt install smbclient cifs-utils -y

# FTP
sudo apt install curlftpfs -y

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

bash
# SMB
sudo apt install smbclient cifs-utils -y

# FTP
sudo apt install curlftpfs -y

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

bash
# SMB
sudo apt install smbclient cifs-utils -y

# FTP
sudo apt install curlftpfs -y

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

bash
# SMB
sudo apt install smbclient cifs-utils -y

# FTP
sudo apt install curlftpfs -y

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

bash
# SMB
sudo apt install smbclient cifs-utils -y

# FTP
sudo apt install curlftpfs -y

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

bash
# SMB
sudo apt install smbclient cifs-utils -y

# FTP
sudo apt install curlftpfs -y

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
96% confidence
Finding

This command pipes user-controlled content into sudo tee to create a root-owned credentials file, exposing the username in command text and establishing a risky pattern that is paired with password handling on the next line. Even if the username itself is not highly sensitive, using root pipelines for secret material increases logging and audit exposure and encourages unsafe credential handling.

Content

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

Credential file method:

bash
# 1. Create credential file
echo "username=$USERNAME" | sudo tee /root/.smbcredentials
echo "password=$PASSWORD" | sudo tee -a /root/.smbcredentials
sudo chmod 600 /root/.smbcredentials

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill claims not to support plaintext passwords on the command line, but the SMB example uses echo "password=$PASSWORD" | sudo tee ..., which places the secret in shell command text and likely shell history, agent logs, transcripts, or process/audit records. This contradiction makes the guidance unsafe because it normalizes insecure handling of credentials while writing them into a root-owned file via a pipeline.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
99% confidence
Finding

This line writes the SMB password into a root-owned file using echo "password=$PASSWORD" | sudo tee -a ..., directly exposing the secret in command text and likely in shell history, agent transcripts, monitoring, or audit logs. Because the skill explicitly says not to use plaintext passwords on the command line, this is a clear unsafe contradiction.

Content

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

bash
# 1. Create credential file
echo "username=$USERNAME" | sudo tee /root/.smbcredentials
echo "password=$PASSWORD" | sudo tee -a /root/.smbcredentials
sudo chmod 600 /root/.smbcredentials

# 2. Mount

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
# 1. Create credential file
echo "username=$USERNAME" | sudo tee /root/.smbcredentials
echo "password=$PASSWORD" | sudo tee -a /root/.smbcredentials
sudo chmod 600 /root/.smbcredentials

# 2. Mount
sudo mount.cifs //SERVER_IP/share ~/mount_name -o credentials=/root/.smbcredentials,uid=1000,gid=1000

Static analysis

No suspicious patterns detected.