dcomexec

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OptRemoteCreateInstance = "RemoteCreateInstance"
	OptRemoteActivation     = "RemoteActivation"
)
View Source
const (
	MethodExcelMacro     = "Excel:ExecuteExcel4Macro"
	MethodExcelXLL       = "Excel:RegisterXLL"
	ExcelApplicationUuid = "00020812-0000-0000-C000-000000000046"
)
View Source
const (
	MethodHtafile = "HTAFile"
	HtafileUuid   = "3050F4D8-98B5-11CF-BB82-00AA00BDCE0B"
)
View Source
const (
	UriCreateAllowRelative               uint32 = 0x00000001
	UriCreateAllowImplicitWildcardScheme uint32 = 0x00000002
	UriCreateAllowImplicitFileScheme     uint32 = 0x00000004
	UriCreateNoFrag                      uint32 = 0x00000008
	UriCreateNoCanonicalize              uint32 = 0x00000010
	UriCreateFileUseDosPath              uint32 = 0x00000020
	UriCreateDecodeExtraInfo             uint32 = 0x00000040
	UriCreateNoDecodeExtraInfo           uint32 = 0x00000080
	UriCreateCanonicalize                uint32 = 0x00000100
	UriCreateCrackUnknownSchemes         uint32 = 0x00000200
	UriCreateNoCrackUnknownSchemes       uint32 = 0x00000400
	UriCreatePreProcessHTMLURI           uint32 = 0x00000800
	UriCreateNoPreProcessHTMLURI         uint32 = 0x00001000
	UriCreateIESettings                  uint32 = 0x00002000
	UriCreateNoIESettings                uint32 = 0x00004000
	UriCreateNoEncodeForbiddenChars      uint32 = 0x00008000
	UriCreateNormalizeIntlChars          uint32 = 0x00010000
)
View Source
const (
	MethodMmc = "MMC20.Application" // MMC20.Application::Document.ActiveView.ExecuteShellCommand
	MmcUuid   = "49B2791A-B1AE-4C90-9B8E-E860BA07F889"
)
View Source
const (
	MethodShellBrowserWindow = "ShellBrowserWindow" // ShellBrowserWindow::Document.Application.ShellExecute
	ShellBrowserWindowUuid   = "C08AFD90-F2A1-11D1-8455-00A0C91F3880"
)
View Source
const (
	MethodShellWindows = "ShellWindows" // ShellWindows::Item().Document.Application.ShellExecute
	ShellWindowsUuid   = "9BA05972-F6A8-11CF-A442-00A0C90A8F39"
)
View Source
const (
	MethodVisualStudioDTE   = "VisualStudio.DTE:ExecuteCommand"
	VisualStudioDteUuid     = "33ABD590-0400-4FEF-AF98-5F5A8A99CFC3"
	VisualStudioDte2019Uuid = "2E1517DA-87BF-4443-984A-D2BF18F5A908"
)
View Source
const (
	LcEnglishUs uint32 = 0x409
)
View Source
const (
	ModuleName = "DCOM"
)

Variables

This section is empty.

Functions

func HtafileGetUrl added in v0.3.0

func HtafileGetUrl(url, jscript, vbscript string, execIO *goexec.ExecutionIO) string

Types

type Dcom

type Dcom struct {
	goexec.Cleaner
	goexec.Executor

	Client *dce.Client
	// contains filtered or unexported fields
}

func (*Dcom) Connect

func (m *Dcom) Connect(ctx context.Context) (err error)

func (*Dcom) Init

func (m *Dcom) Init(ctx context.Context) (err error)

type DcomExcel added in v0.3.0

type DcomExcel struct {
	Dispatch
}

func (*DcomExcel) Init added in v0.3.0

func (m *DcomExcel) Init(ctx context.Context) (err error)

Init will initialize the ShellBrowserWindow instance

type DcomExcelMacro added in v0.3.0

type DcomExcelMacro struct {
	DcomExcel
	Macros      []string
	MacroFile   string
	NoTerminate bool
}

func (*DcomExcelMacro) Execute added in v0.3.0

func (m *DcomExcelMacro) Execute(ctx context.Context, execIO *goexec.ExecutionIO) (err error)

type DcomExcelXll added in v0.3.0

type DcomExcelXll struct {
	DcomExcel
	XllLocation string
	NoTerminate bool
}

func (*DcomExcelXll) Call added in v0.3.0

func (m *DcomExcelXll) Call(ctx context.Context) (err error)

type DcomHtafile added in v0.3.0

type DcomHtafile struct {
	Dcom
	Url        string
	Vbscript   string
	Javascript string
	// contains filtered or unexported fields
}

func (*DcomHtafile) Execute added in v0.3.0

func (m *DcomHtafile) Execute(ctx context.Context, execIO *goexec.ExecutionIO) (err error)

func (*DcomHtafile) Init added in v0.3.0

func (m *DcomHtafile) Init(ctx context.Context) (err error)

Init will initialize the ShellBrowserWindow instance

type DcomMmc

type DcomMmc struct {
	Dispatch
	WorkingDirectory string
	WindowState      string
}

func (*DcomMmc) Execute

func (m *DcomMmc) Execute(ctx context.Context, execIO *goexec.ExecutionIO) (err error)

Execute will perform command execution via the MMC20.Application DCOM object.

func (*DcomMmc) Init added in v0.3.0

func (m *DcomMmc) Init(ctx context.Context) (err error)

Init will initialize the ShellBrowserWindow instance

type DcomShellBrowserWindow added in v0.2.0

type DcomShellBrowserWindow struct {
	Dispatch
	WorkingDirectory string
	WindowState      string
}

func (*DcomShellBrowserWindow) Execute added in v0.2.0

func (m *DcomShellBrowserWindow) Execute(ctx context.Context, execIO *goexec.ExecutionIO) (err error)

Execute will perform command execution via the ShellBrowserWindow object. See https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/

func (*DcomShellBrowserWindow) Init added in v0.3.0

func (m *DcomShellBrowserWindow) Init(ctx context.Context) (err error)

Init will initialize the ShellBrowserWindow instance

type DcomShellWindows added in v0.2.0

type DcomShellWindows struct {
	Dispatch

	WorkingDirectory string
	WindowState      string
}

func (*DcomShellWindows) Execute added in v0.2.0

func (m *DcomShellWindows) Execute(ctx context.Context, execIO *goexec.ExecutionIO) (err error)

Execute will perform command execution via the ShellWindows object. See https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/

func (*DcomShellWindows) Init added in v0.3.0

func (m *DcomShellWindows) Init(ctx context.Context) (err error)

Init will initialize the ShellWindows instance

type DcomVisualStudioDte added in v0.3.0

type DcomVisualStudioDte struct {
	Dispatch
	// Is2019 indicates that the installation is Visual Studio 2019
	Is2019 bool
	// CommandName is the name of the DTE command to invoke
	CommandName string
	// CommandArgs are the arguments to pass to the command
	CommandArgs string
}

func (*DcomVisualStudioDte) Execute added in v0.3.0

func (m *DcomVisualStudioDte) Execute(ctx context.Context, execIO *goexec.ExecutionIO) (err error)

func (*DcomVisualStudioDte) Init added in v0.3.0

func (m *DcomVisualStudioDte) Init(ctx context.Context) (err error)

type Dispatch added in v0.3.0

type Dispatch struct {
	Dcom
	// contains filtered or unexported fields
}

Dispatch represents a DCOM IDispatch client

type URLMoniker added in v0.3.0

type URLMoniker struct {
	URL           string
	HasExtras     bool   // whether to include trailer with SerialGUID/SerialVersion/URIFlags on marshal
	SerialVersion uint32 // should be 0 when HasExtras; preserved on unmarshal
	URIFlags      uint32 // the URICreateFlags bitmask (meaning per CreateUri)
}

func (URLMoniker) MarshalBinary added in v0.3.0

func (m URLMoniker) MarshalBinary() ([]byte, error)

MarshalBinary implements encoding.BinaryMarshaler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL