aboutsummaryrefslogtreecommitdiff
path: root/internal/exec/wmi/module.go
blob: f90af4267dd9bff15e0ac53d920497a0881c2bb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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"
)