aboutsummaryrefslogtreecommitdiff
path: root/internal/exec/wmi/module.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/exec/wmi/module.go')
-rw-r--r--internal/exec/wmi/module.go33
1 files changed, 33 insertions, 0 deletions
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"
+)