termhere

package module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 21 Imported by: 0

README

termhere

A simple reverse shell tunnel with pty support (window size, ctrl-c, ctrl-d, etc.)

Usage

  1. Get the binary termhere from GitHub Releases

  2. Start termhere server in Machine 1

    export TERMHERE_TOKEN=aaa
    ./termhere server
    
  3. Start termhere client in Machine 2

    export TERMHERE_TOKEN=aaa
    ./termhere client -s 10.10.10.10:7777 /bin/bash
    

Now you can get a shell of Machine 2 from the termhere server running in Machine 1

TLS Support

termhere supports TLS with client authentication, you can use --cert-file and --key-file to enable TLS, and use --client-ca-file to enable client authentication.

TLS Simple

# server
termhere server -l 'tcp+tls://:7777' --cert-file server.full-crt.pem --key-file server.key.pem
# client
termhere client -s "tcp+tls://127.0.0.1:7777" --ca-file rootca.crt.pem

TLS with Client Auth

# server
termhere server -l 'tcp+tls://:7777' --cert-file server.full-crt.pem --key-file server.key.pem --client-ca-file rootca.crt.pem
# client
termhere client -s "tcp+tls://127.0.0.1:7777" --ca-file rootca.crt.pem --cert-file client.full-crt.pem --key-file client.key.pem

Fore more information about TLS Support, please refer to uniconn

Credits

GUO YANKE, MIT License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunClient

func RunClient(opts ClientOptions) (err error)

func RunServer

func RunServer(opts ServerOptions) (err error)

Types

type ClientOptions

type ClientOptions struct {
	Token    string
	Server   string
	Command  []string
	CAFile   string
	CertFile string
	KeyFile  string
	Insecure bool
}

type ServerOptions

type ServerOptions struct {
	Token  string
	Listen string

	ClientCAFile string
	CertFile     string
	KeyFile      string
}

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL