Generated from Manticore v1.1.5 • 201 packages. View on pkg.go.dev

rpcinterface_367abb81984435f1ad3298f038001003_2_0

import "github.com/TheManticoreProject/Manticore/network/dcerpc/interfaces/367abb81-9844-35f1-ad32-98f038001003/2.0"

Package rpcinterface_367abb81984435f1ad3298f038001003_2_0 is the descriptor for the svcctl RPC interface, abstract syntax 367abb81-9844-35f1-ad32-98f038001003 version 2.0 ([MS-SCMR]).

Generated by tools/idlgen (descriptor phase) from the IDL, then reviewed: the PipeName, the status-code table, and doc comments are not derivable from the IDL and must be confirmed by hand (see the TODO markers).

Index

Constants

Opnums for the on-the-wire methods. Opnums 10, 22, 34, 43, 46, 52, 53, 54, 55, 57, 58, 59, 61, 62, 63 are “not used on the wire” and are omitted.

const (
    OpnumRCloseServiceHandle         uint16 = 0
    OpnumRControlService             uint16 = 1
    OpnumRDeleteService              uint16 = 2
    OpnumRLockServiceDatabase        uint16 = 3
    OpnumRQueryServiceObjectSecurity uint16 = 4
    OpnumRSetServiceObjectSecurity   uint16 = 5
    OpnumRQueryServiceStatus         uint16 = 6
    OpnumRSetServiceStatus           uint16 = 7
    OpnumRUnlockServiceDatabase      uint16 = 8
    OpnumRNotifyBootConfigStatus     uint16 = 9
    OpnumRChangeServiceConfigW       uint16 = 11
    OpnumRCreateServiceW             uint16 = 12
    OpnumREnumDependentServicesW     uint16 = 13
    OpnumREnumServicesStatusW        uint16 = 14
    OpnumROpenSCManagerW             uint16 = 15
    OpnumROpenServiceW               uint16 = 16
    OpnumRQueryServiceConfigW        uint16 = 17
    OpnumRQueryServiceLockStatusW    uint16 = 18
    OpnumRStartServiceW              uint16 = 19
    OpnumRGetServiceDisplayNameW     uint16 = 20
    OpnumRGetServiceKeyNameW         uint16 = 21
    OpnumRChangeServiceConfigA       uint16 = 23
    OpnumRCreateServiceA             uint16 = 24
    OpnumREnumDependentServicesA     uint16 = 25
    OpnumREnumServicesStatusA        uint16 = 26
    OpnumROpenSCManagerA             uint16 = 27
    OpnumROpenServiceA               uint16 = 28
    OpnumRQueryServiceConfigA        uint16 = 29
    OpnumRQueryServiceLockStatusA    uint16 = 30
    OpnumRStartServiceA              uint16 = 31
    OpnumRGetServiceDisplayNameA     uint16 = 32
    OpnumRGetServiceKeyNameA         uint16 = 33
    OpnumREnumServiceGroupW          uint16 = 35
    OpnumRChangeServiceConfig2A      uint16 = 36
    OpnumRChangeServiceConfig2W      uint16 = 37
    OpnumRQueryServiceConfig2A       uint16 = 38
    OpnumRQueryServiceConfig2W       uint16 = 39
    OpnumRQueryServiceStatusEx       uint16 = 40
    OpnumREnumServicesStatusExA      uint16 = 41
    OpnumREnumServicesStatusExW      uint16 = 42
    OpnumRCreateServiceWOW64A        uint16 = 44
    OpnumRCreateServiceWOW64W        uint16 = 45
    OpnumRNotifyServiceStatusChange  uint16 = 47
    OpnumRGetNotifyResults           uint16 = 48
    OpnumRCloseNotifyHandle          uint16 = 49
    OpnumRControlServiceExA          uint16 = 50
    OpnumRControlServiceExW          uint16 = 51
    OpnumRQueryServiceConfigEx       uint16 = 56
    OpnumRCreateWowService           uint16 = 60
    OpnumROpenSCManager2             uint16 = 64
)

Status codes returned by svcctl methods. Unlike the NTSTATUS-returning interfaces, the svcctl methods return a Win32 error code ([MS-ERREF] 2.2), so the values below are the Win32 codes (in hex) the methods document ([MS-SCMR] 3.1.4). StatusSuccess (ERROR_SUCCESS) is the canonical success value.

const (
    StatusSuccess uint32 = 0x00000000 // ERROR_SUCCESS

    ErrorFileNotFound             uint32 = 0x00000002 // ERROR_FILE_NOT_FOUND
    ErrorPathNotFound             uint32 = 0x00000003 // ERROR_PATH_NOT_FOUND
    ErrorAccessDenied             uint32 = 0x00000005 // ERROR_ACCESS_DENIED
    ErrorInvalidHandle            uint32 = 0x00000006 // ERROR_INVALID_HANDLE
    ErrorInvalidData              uint32 = 0x0000000D // ERROR_INVALID_DATA
    ErrorInvalidParameter         uint32 = 0x00000057 // ERROR_INVALID_PARAMETER
    ErrorInsufficientBuffer       uint32 = 0x0000007A // ERROR_INSUFFICIENT_BUFFER
    ErrorInvalidName              uint32 = 0x0000007B // ERROR_INVALID_NAME
    ErrorInvalidLevel             uint32 = 0x0000007C // ERROR_INVALID_LEVEL
    ErrorMoreData                 uint32 = 0x000000EA // ERROR_MORE_DATA
    ErrorDependentServicesRunning uint32 = 0x0000041B // ERROR_DEPENDENT_SERVICES_RUNNING
    ErrorInvalidServiceControl    uint32 = 0x0000041C // ERROR_INVALID_SERVICE_CONTROL
    ErrorServiceRequestTimeout    uint32 = 0x0000041D // ERROR_SERVICE_REQUEST_TIMEOUT
    ErrorServiceNoThread          uint32 = 0x0000041E // ERROR_SERVICE_NO_THREAD
    ErrorServiceDatabaseLocked    uint32 = 0x0000041F // ERROR_SERVICE_DATABASE_LOCKED
    ErrorServiceAlreadyRunning    uint32 = 0x00000420 // ERROR_SERVICE_ALREADY_RUNNING
    ErrorInvalidServiceAccount    uint32 = 0x00000421 // ERROR_INVALID_SERVICE_ACCOUNT
    ErrorServiceDisabled          uint32 = 0x00000422 // ERROR_SERVICE_DISABLED
    ErrorCircularDependency       uint32 = 0x00000423 // ERROR_CIRCULAR_DEPENDENCY
    ErrorServiceDoesNotExist      uint32 = 0x00000424 // ERROR_SERVICE_DOES_NOT_EXIST
    ErrorServiceCannotAcceptCtrl  uint32 = 0x00000425 // ERROR_SERVICE_CANNOT_ACCEPT_CTRL
    ErrorServiceNotActive         uint32 = 0x00000426 // ERROR_SERVICE_NOT_ACTIVE
    ErrorDatabaseDoesNotExist     uint32 = 0x00000429 // ERROR_DATABASE_DOES_NOT_EXIST
    ErrorServiceDependencyFail    uint32 = 0x0000042C // ERROR_SERVICE_DEPENDENCY_FAIL
    ErrorServiceLogonFailed       uint32 = 0x0000042D // ERROR_SERVICE_LOGON_FAILED
    ErrorServiceMarkedForDelete   uint32 = 0x00000430 // ERROR_SERVICE_MARKED_FOR_DELETE
    ErrorServiceExists            uint32 = 0x00000431 // ERROR_SERVICE_EXISTS
    ErrorServiceDependencyDeleted uint32 = 0x00000433 // ERROR_SERVICE_DEPENDENCY_DELETED
    ErrorDuplicateServiceName     uint32 = 0x00000436 // ERROR_DUPLICATE_SERVICE_NAME
    ErrorShutdownInProgress       uint32 = 0x0000045B // ERROR_SHUTDOWN_IN_PROGRESS
)

Service Control Manager object access rights ([MS-SCMR] 3.1.4, [MS-DTYP] 2.4.3). These are passed in dwDesiredAccess to ROpenSCManager*.

const (
    ScManagerConnect          uint32 = 0x0001
    ScManagerCreateService    uint32 = 0x0002
    ScManagerEnumerateService uint32 = 0x0004
    ScManagerLock             uint32 = 0x0008
    ScManagerQueryLockStatus  uint32 = 0x0010
    ScManagerModifyBootConfig uint32 = 0x0020
    ScManagerAllAccess        uint32 = 0x000F003F
)

Service object access rights ([MS-SCMR] 3.1.4). These are passed in dwDesiredAccess to ROpenService*/RCreateService*.

const (
    ServiceQueryConfig         uint32 = 0x0001
    ServiceChangeConfig        uint32 = 0x0002
    ServiceQueryStatus         uint32 = 0x0004
    ServiceEnumerateDependents uint32 = 0x0008
    ServiceStart               uint32 = 0x0010
    ServiceStop                uint32 = 0x0020
    ServicePauseContinue       uint32 = 0x0040
    ServiceInterrogate         uint32 = 0x0080
    ServiceUserDefinedControl  uint32 = 0x0100
    ServiceAllAccess           uint32 = 0x000F01FF
)

Standard access-rights bits shared by all securable objects ([MS-DTYP] 2.4.3), commonly combined with the service-specific rights above.

const (
    Delete               uint32 = 0x00010000
    ReadControl          uint32 = 0x00020000
    WriteDac             uint32 = 0x00040000
    WriteOwner           uint32 = 0x00080000
    AccessSystemSecurity uint32 = 0x01000000
    MaximumAllowed       uint32 = 0x02000000
    GenericAll           uint32 = 0x10000000
    GenericExecute       uint32 = 0x20000000
    GenericWrite         uint32 = 0x40000000
    GenericRead          uint32 = 0x80000000
)

Service types (dwServiceType) ([MS-SCMR] 2.2.15 / 3.1.4).

const (
    ServiceKernelDriver       uint32 = 0x00000001
    ServiceFileSystemDriver   uint32 = 0x00000002
    ServiceWin32OwnProcess    uint32 = 0x00000010
    ServiceWin32ShareProcess  uint32 = 0x00000020
    ServiceInteractiveProcess uint32 = 0x00000100
)

Service start types (dwStartType) ([MS-SCMR] 3.1.4).

const (
    ServiceBootStart   uint32 = 0x00000000
    ServiceSystemStart uint32 = 0x00000001
    ServiceAutoStart   uint32 = 0x00000002
    ServiceDemandStart uint32 = 0x00000003
    ServiceDisabled    uint32 = 0x00000004
)

Service error-control levels (dwErrorControl) ([MS-SCMR] 3.1.4).

const (
    ServiceErrorIgnore   uint32 = 0x00000000
    ServiceErrorNormal   uint32 = 0x00000001
    ServiceErrorSevere   uint32 = 0x00000002
    ServiceErrorCritical uint32 = 0x00000003
)

Service control codes (dwControl) passed to RControlService ([MS-SCMR] 3.1.4).

const (
    ServiceControlStop           uint32 = 0x00000001
    ServiceControlPause          uint32 = 0x00000002
    ServiceControlContinue       uint32 = 0x00000003
    ServiceControlInterrogate    uint32 = 0x00000004
    ServiceControlParamChange    uint32 = 0x00000006
    ServiceControlNetbindAdd     uint32 = 0x00000007
    ServiceControlNetbindRemove  uint32 = 0x00000008
    ServiceControlNetbindEnable  uint32 = 0x00000009
    ServiceControlNetbindDisable uint32 = 0x0000000A
)

Service current-state values (dwCurrentState) reported in SERVICE_STATUS ([MS-SCMR] 2.2.47).

const (
    ServiceStopped         uint32 = 0x00000001
    ServiceStartPending    uint32 = 0x00000002
    ServiceStopPending     uint32 = 0x00000003
    ServiceRunning         uint32 = 0x00000004
    ServiceContinuePending uint32 = 0x00000005
    ServicePausePending    uint32 = 0x00000006
    ServicePaused          uint32 = 0x00000007
)

Service-state filters (dwServiceState) for the enumeration methods ([MS-SCMR] 3.1.4).

const (
    ServiceActive   uint32 = 0x00000001
    ServiceInactive uint32 = 0x00000002
    ServiceStateAll uint32 = 0x00000003
)

PipeName is the IPC$-relative named pipe for the svcctl interface ([MS-SCMR] 2.1: the SCM listens on the \PIPE\svcctl endpoint over ncacn_np).

const PipeName = `\svcctl`

Variables

NameToOpnum is the reverse of OpnumToName, built at init so the two never drift.

var NameToOpnum = func() map[string]uint16 {
    m := make(map[string]uint16, len(OpnumToName))
    for op, name := range OpnumToName {
        m[name] = op
    }
    return m
}()

OpnumToName maps each on-the-wire opnum to its method name; the single source of truth.

var OpnumToName = map[uint16]string{
    OpnumRCloseServiceHandle:         "RCloseServiceHandle",
    OpnumRControlService:             "RControlService",
    OpnumRDeleteService:              "RDeleteService",
    OpnumRLockServiceDatabase:        "RLockServiceDatabase",
    OpnumRQueryServiceObjectSecurity: "RQueryServiceObjectSecurity",
    OpnumRSetServiceObjectSecurity:   "RSetServiceObjectSecurity",
    OpnumRQueryServiceStatus:         "RQueryServiceStatus",
    OpnumRSetServiceStatus:           "RSetServiceStatus",
    OpnumRUnlockServiceDatabase:      "RUnlockServiceDatabase",
    OpnumRNotifyBootConfigStatus:     "RNotifyBootConfigStatus",
    OpnumRChangeServiceConfigW:       "RChangeServiceConfigW",
    OpnumRCreateServiceW:             "RCreateServiceW",
    OpnumREnumDependentServicesW:     "REnumDependentServicesW",
    OpnumREnumServicesStatusW:        "REnumServicesStatusW",
    OpnumROpenSCManagerW:             "ROpenSCManagerW",
    OpnumROpenServiceW:               "ROpenServiceW",
    OpnumRQueryServiceConfigW:        "RQueryServiceConfigW",
    OpnumRQueryServiceLockStatusW:    "RQueryServiceLockStatusW",
    OpnumRStartServiceW:              "RStartServiceW",
    OpnumRGetServiceDisplayNameW:     "RGetServiceDisplayNameW",
    OpnumRGetServiceKeyNameW:         "RGetServiceKeyNameW",
    OpnumRChangeServiceConfigA:       "RChangeServiceConfigA",
    OpnumRCreateServiceA:             "RCreateServiceA",
    OpnumREnumDependentServicesA:     "REnumDependentServicesA",
    OpnumREnumServicesStatusA:        "REnumServicesStatusA",
    OpnumROpenSCManagerA:             "ROpenSCManagerA",
    OpnumROpenServiceA:               "ROpenServiceA",
    OpnumRQueryServiceConfigA:        "RQueryServiceConfigA",
    OpnumRQueryServiceLockStatusA:    "RQueryServiceLockStatusA",
    OpnumRStartServiceA:              "RStartServiceA",
    OpnumRGetServiceDisplayNameA:     "RGetServiceDisplayNameA",
    OpnumRGetServiceKeyNameA:         "RGetServiceKeyNameA",
    OpnumREnumServiceGroupW:          "REnumServiceGroupW",
    OpnumRChangeServiceConfig2A:      "RChangeServiceConfig2A",
    OpnumRChangeServiceConfig2W:      "RChangeServiceConfig2W",
    OpnumRQueryServiceConfig2A:       "RQueryServiceConfig2A",
    OpnumRQueryServiceConfig2W:       "RQueryServiceConfig2W",
    OpnumRQueryServiceStatusEx:       "RQueryServiceStatusEx",
    OpnumREnumServicesStatusExA:      "REnumServicesStatusExA",
    OpnumREnumServicesStatusExW:      "REnumServicesStatusExW",
    OpnumRCreateServiceWOW64A:        "RCreateServiceWOW64A",
    OpnumRCreateServiceWOW64W:        "RCreateServiceWOW64W",
    OpnumRNotifyServiceStatusChange:  "RNotifyServiceStatusChange",
    OpnumRGetNotifyResults:           "RGetNotifyResults",
    OpnumRCloseNotifyHandle:          "RCloseNotifyHandle",
    OpnumRControlServiceExA:          "RControlServiceExA",
    OpnumRControlServiceExW:          "RControlServiceExW",
    OpnumRQueryServiceConfigEx:       "RQueryServiceConfigEx",
    OpnumRCreateWowService:           "RCreateWowService",
    OpnumROpenSCManager2:             "ROpenSCManager2",
}

func StatusString

func StatusString(status uint32) string

StatusString returns a mnemonic for the documented status codes, otherwise the hex value.

func SyntaxID

func SyntaxID() syntax.SyntaxID

SyntaxID returns the svcctl abstract syntax identifier: 367abb81-9844-35f1-ad32-98f038001003, version 2.0.

Subpackages