Compare commits
9 Commits
ee933011a0
...
542abff250
| Author | SHA1 | Date |
|---|---|---|
|
|
542abff250 | |
|
|
2e43e00cc8 | |
|
|
f1e525a78d | |
|
|
caa444f059 | |
|
|
b84491e82f | |
|
|
78133c0dbd | |
|
|
acadaa7910 | |
|
|
c75074777c | |
|
|
394a519b96 |
|
|
@ -51,8 +51,8 @@ jobs:
|
|||
path: |
|
||||
dist
|
||||
|
||||
release-dll:
|
||||
name: Build release DLL
|
||||
goreleaser:
|
||||
name: Build releases with goreleaser
|
||||
environment: prod
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
|
@ -83,7 +83,13 @@ jobs:
|
|||
filename: "ssh_private_key"
|
||||
working-directory: "./resources"
|
||||
|
||||
- name: Run GoReleaser to build release DLL
|
||||
- name: Install upx
|
||||
run: sudo apt install upx
|
||||
|
||||
- name: Install garble
|
||||
run: make install-deps
|
||||
|
||||
- name: Run GoReleaser to build releases
|
||||
uses: goreleaser/goreleaser-action@v6
|
||||
with:
|
||||
# either 'goreleaser' (default) or 'goreleaser-pro'
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ before:
|
|||
# You may remove this if you don't use go modules.
|
||||
- go mod tidy
|
||||
# you may remove this if you don't need go generate
|
||||
- go generate ./...
|
||||
# - go generate ./...
|
||||
|
||||
builds:
|
||||
- id: "dll"
|
||||
- id: "win-amd64-dll-release"
|
||||
env:
|
||||
- CGO_ENABLED=1
|
||||
- CC=x86_64-w64-mingw32-gcc
|
||||
|
|
@ -26,12 +26,57 @@ builds:
|
|||
goarch:
|
||||
- amd64
|
||||
ldflags:
|
||||
- -H=windowsgui
|
||||
- -s -trimpath
|
||||
gobinary: "scripts/garble.sh"
|
||||
buildmode: c-shared
|
||||
tags:
|
||||
- release
|
||||
- dll
|
||||
|
||||
- id: "win-release"
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
goos:
|
||||
- windows
|
||||
goarch:
|
||||
- amd64
|
||||
ldflags:
|
||||
- -H=windowsgui
|
||||
gobinary: "scripts/garble.sh"
|
||||
tags:
|
||||
- release
|
||||
|
||||
upx:
|
||||
- # Whether to enable it or not.
|
||||
#
|
||||
# Templates: allowed.
|
||||
enabled: true
|
||||
|
||||
# Filter by build ID.
|
||||
#ids: [build1, build2]
|
||||
|
||||
# Filter by GOOS.
|
||||
goos: [windows]
|
||||
|
||||
# Filter by GOARCH.
|
||||
goarch: [amd64]
|
||||
|
||||
# Filter by GOARM.
|
||||
# goarm: [8]
|
||||
|
||||
# Filter by GOAMD64.
|
||||
# goamd64: [v1]
|
||||
|
||||
# Compress argument.
|
||||
# Valid options are from '1' (faster) to '9' (better), and 'best'.
|
||||
compress: best
|
||||
|
||||
# Whether to try LZMA (slower).
|
||||
lzma: true
|
||||
|
||||
# Whether to try all methods and filters (slow).
|
||||
brute: true
|
||||
|
||||
archives:
|
||||
- format: tar.gz
|
||||
# this name template makes the OS and Arch compatible with the results of `uname`.
|
||||
|
|
|
|||
16
Makefile
16
Makefile
|
|
@ -1,5 +1,6 @@
|
|||
SOURCES=Makefile main.go main_release.go main_debug.go config.go config_release.go config_template.go
|
||||
GARBLE_BIN = $(shell go env GOPATH)/bin/garble
|
||||
GARBLE_CMD = $(GARBLE_BIN) -literals -tiny
|
||||
|
||||
all: socks5-ssh-proxy
|
||||
|
||||
|
|
@ -14,17 +15,14 @@ test-release: socks5-ssh-proxy.release
|
|||
./socks5-ssh-proxy.release
|
||||
socks5-ssh-proxy: $(SOURCES)
|
||||
go build -o $@
|
||||
socks5-ssh-proxy.release: resources $(SOURCES)
|
||||
GOOS=darwin GOARCH=amd64 $(GO_ENV_VARS) go build -tags release -o $@
|
||||
socks5-ssh-proxy.release: resources $(SOURCES) $(GARBLE_BIN)
|
||||
GOOS=darwin GOARCH=amd64 $(GARBLE_CMD) build -tags release -o $@
|
||||
upx $@
|
||||
win: socks5-ssh-proxy.exe
|
||||
#socks5-ssh-proxy.exe: resources $(GARBLE_BIN) $(SOURCES)
|
||||
# GOOS=windows GOARCH=amd64 $(GARBLE_BIN) build -ldflags -H=windowsgui -tags release -o $@
|
||||
socks5-ssh-proxy.exe: resources $(SOURCES)
|
||||
GOOS=windows GOARCH=amd64 go build -ldflags -H=windowsgui -tags release -o $@
|
||||
dll: resources
|
||||
rm -Rf dist
|
||||
goreleaser build --snapshot
|
||||
socks5-ssh-proxy.exe: resources $(GARBLE_BIN) $(SOURCES)
|
||||
GOOS=windows GOARCH=amd64 $(GARBLE_CMD) build -ldflags -H=windowsgui -tags release -o $@
|
||||
goreleaser: resources $(GARBLE_BIN)
|
||||
goreleaser build --clean --snapshot --id win-release
|
||||
win-package: ChromeProxyHelperPlugin.zip
|
||||
ChromeProxyHelperPlugin.zip: socks5-ssh-proxy.exe
|
||||
cp socks5-ssh-proxy.exe chrome_proxy.exe
|
||||
|
|
|
|||
|
|
@ -68,10 +68,10 @@ Following detections have been tested:
|
|||
* <https://www.yourcts.com/2024/01/19/beware-of-new-go-based-malware/>
|
||||
* <https://posts.specterops.io/offensive-security-guide-to-ssh-tunnels-and-proxies-b525cbd4d4c6>
|
||||
* <https://emulator41.medium.com/golang-malware-used-by-cybercriminals-408276a276c8>
|
||||
|
||||
* <https://synzack.github.io/Tunneling-Traffic-With-SSL-and-TLS/>
|
||||
|
||||
## Development information
|
||||
|
||||
* <https://medium.com/analytics-vidhya/running-go-code-from-python-a65b3ae34a2d>
|
||||
* <https://github.com/weak1337/Alcatraz>
|
||||
* <https://github.com/burrowers/garble?tab=readme-ov-file#mechanism>>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
`go env GOPATH`/bin/garble -literals -tiny $@
|
||||
Loading…
Reference in New Issue