Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix implant configuration for external builders #1180

Merged
merged 2 commits into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 22 additions & 11 deletions protobuf/clientpb/client.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions protobuf/clientpb/client.proto
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,11 @@ message ImplantConfig {
string MtlsCert = 21;
string MtlsKey = 22;

string ECCPublicKey = 23;
string ECCPrivateKey = 24;
string ECCPublicKeySignature = 25;
string MinisignServerPublicKey = 26;
string ECCServerPublicKey = 23;
string ECCPublicKey = 24;
string ECCPrivateKey = 25;
string ECCPublicKeySignature = 26;
string MinisignServerPublicKey = 27;

string WGImplantPrivKey = 30;
string WGServerPubKey = 31;
Expand Down
2 changes: 1 addition & 1 deletion protobuf/commonpb/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion protobuf/dnspb/dns.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion protobuf/rpcpb/services.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion protobuf/rpcpb/services_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion protobuf/sliverpb/sliver.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions server/db/models/implant.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,14 @@ func (ic *ImplantConfig) ToProtobuf() *clientpb.ImplantConfig {
BeaconInterval: ic.BeaconInterval,
BeaconJitter: ic.BeaconJitter,

GOOS: ic.GOOS,
GOARCH: ic.GOARCH,

MtlsCACert: ic.MtlsCACert,
MtlsCert: ic.MtlsCert,
MtlsKey: ic.MtlsKey,
GOOS: ic.GOOS,
GOARCH: ic.GOARCH,
ECCServerPublicKey: ic.ECCServerPublicKey,
ECCPublicKey: ic.ECCPublicKey,
ECCPrivateKey: ic.ECCPrivateKey,
MtlsCACert: ic.MtlsCACert,
MtlsCert: ic.MtlsCert,
MtlsKey: ic.MtlsKey,

Debug: ic.Debug,
DebugFile: ic.DebugFile,
Expand Down Expand Up @@ -188,7 +190,6 @@ func (ic *ImplantConfig) ToProtobuf() *clientpb.ImplantConfig {

FileName: ic.FileName,
}

// Copy Canary Domains
config.CanaryDomains = []string{}
for _, canaryDomain := range ic.CanaryDomains {
Expand Down
4 changes: 4 additions & 0 deletions server/generate/binaries.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ func ImplantConfigFromProtobuf(pbConfig *clientpb.ImplantConfig) (string, *model
cfg.BeaconInterval = pbConfig.BeaconInterval
cfg.BeaconJitter = pbConfig.BeaconJitter

cfg.ECCServerPublicKey = pbConfig.ECCServerPublicKey
cfg.ECCPrivateKey = pbConfig.ECCPrivateKey
cfg.ECCPublicKey = pbConfig.ECCPublicKey

cfg.GOOS = pbConfig.GOOS
cfg.GOARCH = pbConfig.GOARCH
cfg.MtlsCACert = pbConfig.MtlsCACert
Expand Down