From e87dd341dde93c289b6774f636e6767476b84a79 Mon Sep 17 00:00:00 2001 From: Bryan McNulty Date: Fri, 7 Mar 2025 08:52:48 -0600 Subject: Added wmiexec module + updated TODO --- internal/exec/wmi/module.go | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 internal/exec/wmi/module.go (limited to 'internal/exec/wmi/module.go') diff --git a/internal/exec/wmi/module.go b/internal/exec/wmi/module.go new file mode 100644 index 0000000..f90af42 --- /dev/null +++ b/internal/exec/wmi/module.go @@ -0,0 +1,33 @@ +package wmiexec + +import ( + "github.com/RedTeamPentesting/adauth" + "github.com/oiweiwei/go-msrpc/dcerpc" + "github.com/oiweiwei/go-msrpc/msrpc/dcom/wmi/iwbemservices/v0" + "github.com/rs/zerolog" +) + +type Module struct { + creds *adauth.Credential + target *adauth.Target + + log zerolog.Logger + dce dcerpc.Conn + sc iwbemservices.ServicesClient +} + +type MethodCustomConfig struct { + Class string + Method string + Arguments map[string]any +} + +type MethodProcessConfig struct { + Command string + WorkingDirectory string +} + +const ( + MethodCustom = "custom" + MethodProcess = "process" +) -- cgit v1.2.3