1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-11-08 07:49:17 +01:00

Add LocalCommand option to SSH

SSH has a LocalCommand option that will run a given command on the client machine after a successful connection.  It is generally disabled, but can be enabled on the command line with "-oPermitLocalCommand=yes".  This is useful for bypassing restricted shells.

Co-authored-by: Andrea Cardaci <cyrus.and@gmail.com>
This commit is contained in:
James Spadaro 2022-05-01 05:07:53 -04:00 committed by GitHub
parent 3d0d4a76d9
commit cd05b58e70
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

@ -5,6 +5,8 @@ functions:
code: ssh localhost $SHELL --noprofile --norc code: ssh localhost $SHELL --noprofile --norc
- description: Spawn interactive shell through ProxyCommand option. - description: Spawn interactive shell through ProxyCommand option.
code: ssh -o ProxyCommand=';sh 0<&2 1>&2' x code: ssh -o ProxyCommand=';sh 0<&2 1>&2' x
- description: Spawn interactive shell on client, requires a successful connection towards `host`.
code: ssh -o PermitLocalCommand=yes -o LocalCommand=/bin/sh host
file-upload: file-upload:
- description: Send local file to a SSH server. - description: Send local file to a SSH server.
code: | code: |