Documentation ¶
Index ¶
- Constants
- Variables
- type BindAckDecoder
- type CreateService
- type CreateServiceRequest
- type CreateServiceResponse
- type DeleteService
- type DeleteServiceRequest
- type DeleteServiceResponse
- type NetShareEnumAllRequest
- type NetShareEnumAllResponseDecoder
- type NetrShareEnumRequest
- type OpenSCManager
- type OpenSCManagerRequest
- type OpenSCManagerResponse
- type OpenService
- type OpenServiceRequest
- type OpenServiceResponse
- type OpenedPipe
- type RpcBindRequest
- type RpcBindRequestContextEntry
- type RpcHeaderStruct
- type RpcRequestStruct
- type SCRpcHandle
- type SVCCTLHandle
- type StartService
- type StartServiceRequest
- type StartServiceResponse
Constants ¶
View Source
const ( PDURequest = 0 PDUPing = 1 PDUResponse = 2 PDUFault = 3 PDUWorking = 4 PDUNoCall = 5 PDUReject = 6 PDUAck = 7 PDUCl_Cancel = 8 PDUFack = 9 PDUCancel_Ack = 10 PDUBind = 11 PDUBind_Ack = 12 PDUBind_Nak = 13 PDUAlter_Context = 14 PDUAlter_Context_Resp = 15 PDUShutdown = 17 PDUCo_Cancel = 18 PDUOrphaned = 19 )
PDU PacketType https://pubs.opengroup.org/onlinepubs/9629399/chap12.htm
View Source
const ( //PDUFlagReserved_01 = 0x01 FirstFrag = 0x01 LastFrag = 0x02 //PDUFlagLastFrag = 0x02 PDUFlagPending = 0x03 CancelPending = 0x04 //PDUFlagFrag = 0x04 PDUFlagNoFack = 0x08 PDUFlagMayBe = 0x10 PDUFlagIdemPotent = 0x20 PDUFlagBroadcast = 0x40 PDUFlagReserved_80 = 0x80 )
PDU PacketFlags https://pubs.opengroup.org/onlinepubs/9629399/chap12.htm
View Source
const ( RPC_VERSION = 5 RPC_VERSION_MINOR = 0 RPC_TYPE_REQUEST = 0 RPC_TYPE_RESPONSE = 2 RPC_TYPE_BIND = 11 RPC_TYPE_BIND_ACK = 12 RPC_PACKET_FLAG_FIRST = 0x01 RPC_PACKET_FLAG_LAST = 0x02 NDR_VERSION = 2 NDR64_VERSION = 1 )
View Source
const ( SVCCTL_VERSION = 2 SVCCTL_VERSION_MINOR = 0 SVCCTL_DLL = "svcctl" )
View Source
const ( RCloseServiceHandle = 0 RControlService = 1 RDeleteService = 2 RLockServiceDatabase = 3 RQueryServiceObjectSecurity = 4 RSetServiceObjectSecurity = 5 RQueryServiceStatus = 6 RSetServiceStatus = 7 RUnlockServiceDatabase = 8 RNotifyBootConfigStatus = 9 RChangeServiceConfigW = 11 RCreateServiceW = 12 REnumDependentServicesW = 13 REnumServicesStatusW = 14 ROpenSCManagerW = 15 ROpenServiceW = 16 RQueryServiceConfigW = 17 RQueryServiceLockStatusW = 18 RStartServiceW = 19 RGetServiceDisplayNameW = 20 RGetServiceKeyNameW = 21 RChangeServiceConfigA = 23 RCreateServiceA = 24 REnumDependentServicesA = 25 REnumServicesStatusA = 26 ROpenSCManagerA = 27 ROpenServiceA = 28 RQueryServiceConfigA = 29 RQueryServiceLockStatusA = 30 RStartServiceA = 31 RGetServiceDisplayNameA = 32 RGetServiceKeyNameA = 33 REnumServiceGroupW = 35 RChangeServiceConfig2A = 36 RChangeServiceConfig2W = 37 RQueryServiceConfig2A = 38 RQueryServiceConfig2W = 39 RQueryServiceStatusEx = 40 REnumServicesStatusExA = 41 REnumServicesStatusExW = 42 RCreateServiceWOW64A = 44 RCreateServiceWOW64W = 45 RNotifyServiceStatusChange = 47 RGetNotifyResults = 48 RCloseNotifyHandle = 49 RControlServiceExA = 50 RControlServiceExW = 51 RQueryServiceConfigEx = 56 RCreateWowService = 60 ROpenSCManager2 = 64 )
View Source
const ( SERVICE_ALL_ACCESS = 0x000F01FF SC_MANAGER_CREATE_SERVICE = 0x00000002 SC_MANAGER_CONNECT = 0x00000001 )
access request https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-scmr/0d7a7011-9f41-470d-ad52-8535b47ac282
View Source
const ( SERVICE_KERNEL_DRIVER = 0x00000001 SERVICE_FILE_SYSTEM_DRIVER = 0x00000002 SERVICE_WIN32_OWN_PROCESS = 0x00000010 SERVICE_WIN32_SHARE_PROCESS = 0x00000020 SERVICE_INTERACTIVE_PROCESS = 0x00000100 )
View Source
const ( SERVICE_BOOT_START = 0x00000000 SERVICE_SYSTEM_START = 0x00000001 SERVICE_AUTO_START = 0x00000002 SERVICE_DEMAND_START = 0x00000003 SERVICE_DISABLED = 0x00000004 )
Service Start Type
View Source
const ( SERVICE_ERROR_IGNORE = 0x00000000 SERVICE_ERROR_NORMAL = 0x00000001 SERVICE_ERROR_SEVERE = 0x00000002 SERVICE_ERROR_CRITICAL = 0x00000003 )
Service Error Control
View Source
const ( SRVSVC_VERSION = 3 SRVSVC_VERSION_MINOR = 0 OP_NET_SHARE_ENUM = 15 )
Variables ¶
View Source
var ( // NDR v1: 8a885d04-1ceb-11c9-9fe8-08002b104860 NDR_UUID = []byte("045d888aeb1cc9119fe808002b104860") // NDR64 v1: 71710533-beba-4937-8319-b5dbef9ccc36 NDR64_UUID = []byte("33057171babe37498319b5dbef9ccc36") )
View Source
var SRVSVC_UUID = []byte("c84f324b7016d30112785a47bf6ee188")
View Source
var SVCCTL_UUID = []byte("81bb7a364498f135ad3298f038001003")
Functions ¶
This section is empty.
Types ¶
type BindAckDecoder ¶
type BindAckDecoder []byte
func (BindAckDecoder) CallId ¶
func (c BindAckDecoder) CallId() uint32
func (BindAckDecoder) IsInvalid ¶
func (c BindAckDecoder) IsInvalid() bool
func (BindAckDecoder) PacketType ¶
func (c BindAckDecoder) PacketType() uint8
func (BindAckDecoder) Version ¶
func (c BindAckDecoder) Version() uint8
func (BindAckDecoder) VersionMinor ¶
func (c BindAckDecoder) VersionMinor() uint8
type CreateService ¶
type CreateService struct { CallId uint32 ServiceName string DisplayName string BinaryPathName string ContextHandle []byte `smb:"fixed:20"` }
func (*CreateService) Encode ¶
func (r *CreateService) Encode(b []byte)
func (*CreateService) Size ¶
func (r *CreateService) Size() int
type CreateServiceRequest ¶
type CreateServiceRequest struct { ContextHandle []byte `smb:"fixed:20"` ServiceName SCRpcHandle Reserved1 uint16 DisplayName SVCCTLHandle Reserved2 uint16 AccessMask uint32 ServiceType uint32 ServiceStartType uint32 ServiceErrorControl uint32 BinaryPathName SCRpcHandle NULLPointer uint32 TagId uint32 NULLPointer2 uint32 DependSize uint32 NULLPointer3 uint32 NULLPointer4 uint32 PasswordSize uint32 }
type CreateServiceResponse ¶
type DeleteService ¶
func (*DeleteService) Encode ¶
func (r *DeleteService) Encode(b []byte)
func (*DeleteService) Size ¶
func (r *DeleteService) Size() int
type DeleteServiceRequest ¶
type DeleteServiceRequest struct {
ContextHandle []byte `smb:"fixed:20"`
}
type DeleteServiceResponse ¶
type NetShareEnumAllRequest ¶
type NetShareEnumAllRequest struct {}
func NewNetShareEnumAllRequest ¶
func NewNetShareEnumAllRequest(callid uint32, srvname string) *NetShareEnumAllRequest
func (*NetShareEnumAllRequest) Encode ¶
func (r *NetShareEnumAllRequest) Encode(b []byte)
func (*NetShareEnumAllRequest) Size ¶
func (r *NetShareEnumAllRequest) Size() int
type NetShareEnumAllResponseDecoder ¶
type NetShareEnumAllResponseDecoder []byte
func (NetShareEnumAllResponseDecoder) Buffer ¶
func (c NetShareEnumAllResponseDecoder) Buffer() []byte
func (NetShareEnumAllResponseDecoder) CallId ¶
func (c NetShareEnumAllResponseDecoder) CallId() uint32
func (NetShareEnumAllResponseDecoder) IsIncomplete ¶
func (c NetShareEnumAllResponseDecoder) IsIncomplete() bool
func (NetShareEnumAllResponseDecoder) IsInvalid ¶
func (c NetShareEnumAllResponseDecoder) IsInvalid() bool
func (NetShareEnumAllResponseDecoder) ShareNameList ¶
func (c NetShareEnumAllResponseDecoder) ShareNameList() []string
type NetrShareEnumRequest ¶
type OpenSCManager ¶
func (*OpenSCManager) Encode ¶
func (r *OpenSCManager) Encode(b []byte)
func (*OpenSCManager) Size ¶
func (r *OpenSCManager) Size() int
type OpenSCManagerRequest ¶
type OpenSCManagerRequest struct { MachineName SVCCTLHandle DatabaseName SVCCTLHandle Reserved uint16 AccessMask uint32 }
type OpenSCManagerResponse ¶
type OpenService ¶
func (*OpenService) Encode ¶
func (r *OpenService) Encode(b []byte)
func (*OpenService) Size ¶
func (r *OpenService) Size() int
type OpenServiceRequest ¶
type OpenServiceRequest struct { ContextHandle []byte `smb:"fixed:20"` ServiceName SCRpcHandle Reserved uint16 AccessMask uint32 }
type OpenServiceResponse ¶
type RpcBindRequest ¶
type RpcBindRequest struct { RpcHeaderStruct MaxSendFrag uint16 MaxRecvFrag uint16 AssocGroup uint32 ContextCount uint32 RpcBindRequestContextEntry }
func NewRpcBindRequestHeader ¶
func NewRpcBindRequestHeader(callid uint32, op OpenedPipe) *RpcBindRequest
func (*RpcBindRequest) Bytes ¶
func (rbh *RpcBindRequest) Bytes() []byte
func (*RpcBindRequest) Encode ¶
func (rbr *RpcBindRequest) Encode(b []byte)
func (*RpcBindRequest) Size ¶
func (r *RpcBindRequest) Size() int
type RpcHeaderStruct ¶
type RpcRequestStruct ¶
type RpcRequestStruct struct { RpcHeaderStruct AllocHint uint32 ContextID uint16 OpNum uint16 Payload interface{} }
func (*RpcRequestStruct) Bytes ¶
func (req *RpcRequestStruct) Bytes() []byte
type SCRpcHandle ¶
type SVCCTLHandle ¶
type StartService ¶
func (*StartService) Encode ¶
func (r *StartService) Encode(b []byte)
func (*StartService) Size ¶
func (r *StartService) Size() int
type StartServiceRequest ¶
type StartServiceResponse ¶
Click to show internal directories.
Click to hide internal directories.