Skip to content

Commit

Permalink
Merge pull request #1180 from MrAle98/fix/external-builder-config
Browse files Browse the repository at this point in the history
fix implant configuration for external builders
  • Loading branch information
moloch-- committed Apr 5, 2023
2 parents 54afc61 + 04e8104 commit ec7e76f
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 27 deletions.
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

0 comments on commit ec7e76f

Please sign in to comment.