aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorBryan McNulty <bryanmcnulty@protonmail.com>2025-03-12 10:36:38 -0500
committerBryan McNulty <bryanmcnulty@protonmail.com>2025-03-12 10:36:38 -0500
commitc29e70df5434a82ee43fa59826c67037d07d7b3a (patch)
treeadea65dcb7c7f2d3c461e0b98de444519c03bb42 /internal
parent8a2631d9348c81a724e30b0e2913f3e7bb1bb56f (diff)
downloadgoexec-c29e70df5434a82ee43fa59826c67037d07d7b3a.tar.gz
goexec-c29e70df5434a82ee43fa59826c67037d07d7b3a.zip
+Proxy support +Dockerfile
Diffstat (limited to 'internal')
-rw-r--r--internal/client/dce/dce.go15
1 files changed, 6 insertions, 9 deletions
diff --git a/internal/client/dce/dce.go b/internal/client/dce/dce.go
index 85512ac..142eda9 100644
--- a/internal/client/dce/dce.go
+++ b/internal/client/dce/dce.go
@@ -14,26 +14,23 @@ import (
)
type ConnectionMethodDCEConfig struct {
- NoEpm bool // NoEpm disables EPM
- EpmAuto bool // EpmAuto will find any suitable endpoint, without any filter
- Insecure bool
- NoSign bool
+ NoEpm bool // NoEpm disables EPM
+ EpmAuto bool // EpmAuto will find any suitable endpoint, without any filter
Endpoint *dcerpc.StringBinding // Endpoint is the explicit endpoint passed to dcerpc.WithEndpoint for use without EPM
EpmFilter *dcerpc.StringBinding // EpmFilter is the rough filter used to pick an EPM endpoint
+ Options []dcerpc.Option // Options stores the options that will be passed to all dialers
DceOptions []dcerpc.Option // DceOptions are the options passed to dcerpc.Dial
EpmOptions []dcerpc.Option // EpmOptions are the options passed to epm.EndpointMapper
}
-func (cfg *ConnectionMethodDCEConfig) GetDce(ctx context.Context, cred *adauth.Credential, target *adauth.Target, endpoint, object string, opts ...dcerpc.Option) (cc dcerpc.Conn, err error) {
- dceOpts := append(opts, cfg.DceOptions...)
- epmOpts := cfg.EpmOptions
+func (cfg *ConnectionMethodDCEConfig) GetDce(ctx context.Context, cred *adauth.Credential, target *adauth.Target, endpoint, object string, arbOpts ...dcerpc.Option) (cc dcerpc.Conn, err error) {
log := zerolog.Ctx(ctx).With().
Str("client", "DCERPC").Logger()
// Mandatory logging
- dceOpts = append(dceOpts, dcerpc.WithLogger(log))
- epmOpts = append(epmOpts, dcerpc.WithLogger(log))
+ dceOpts := append(append(cfg.Options, arbOpts...), append(cfg.DceOptions, dcerpc.WithLogger(log))...)
+ epmOpts := append(cfg.Options, append(cfg.EpmOptions, dcerpc.WithLogger(log))...)
ctx = gssapi.NewSecurityContext(ctx)
auth, err := dcerpcauth.AuthenticationOptions(ctx, cred, target, &dcerpcauth.Options{})