Documentation ¶
Overview ¶
A minimal implementation of MS-RPC protocol
Index ¶
- Constants
- Variables
- type Bind
- type BindAck
- type Context
- type Decoder
- type Encoder
- type Frame
- type Header
- type InboundPacket
- type MdsOpenRequest
- type MdsOpenResponse
- type NetShareEnumAllRequest
- type NetShareEnumAllResponse
- type NetShareGetInfoRequest
- type NetShareInfo1
- type NetShareInfo1Response
- type OutboundPacket
- func NewBindAck(callID uint32, addr string, contexts []*Context) *OutboundPacket
- func NewCloseResponse(callID uint32, status uint32) *OutboundPacket
- func NewGetUserNameResponse(callID uint32, accountName, authorityName string, status uint32) *OutboundPacket
- func NewLookupNamesResponse(callID uint32, ctx ntlm.SecurityContext, status uint32) *OutboundPacket
- func NewMdsOpenResponse(callID uint32, req MdsOpenRequest, path string, status uint32) *OutboundPacket
- func NewNetShareEnumAllResponse(callID uint32, shares []NetShareInfo1, status uint32) *OutboundPacket
- func NewNetShareGetInfo1Response(callID uint32, share, remark string, status uint32) *OutboundPacket
- func NewOpenPolicy2Response(callID uint32, frame *Frame, status uint32) *OutboundPacket
- type Request
- type Response
- type ResponseBody
- type Result
- type SyntaxID
Constants ¶
View Source
const ( PACKET_TYPE_REQUEST = 0x00 PACKET_TYPE_RESPONSE = 0x02 PACKET_TYPE_FAULT = 0x03 PACKET_TYPE_BIND = 0x0b PACKET_TYPE_BIND_ACK = 0x0c PACKET_TYPE_BIND_NAK = 0x0d PACKET_TYPE_ALTER_CONTEXT = 0x0e PACKET_TYPE_ALTER_CONTEXT_RESPONSE = 0x0f PACKET_TYPE_AUTH3 = 0x10 PACKET_TYPE_SHUTDOWN = 0x11 PACKET_TYPE_CANCEL = 0x12 PACKET_TYPE_ORPHANED = 0x13 )
View Source
const ( PFC_FIRST_FRAG = 0x01 PFC_LAST_FRAG = 0x02 PFC_PENDING_CANCEL = 0x04 PFC_SUPPORT_HEADER_SIGN = 0x04 PFC_CONC_MPX = 0x10 PFC_DID_NOT_EXECUTE = 0x20 PFC_MAYBE = 0x40 PFC_OBJECT_UUID = 0x80 )
View Source
const ( LSA_CLOSE = 0x0000 LSA_LOOKUP_NAMES = 0x000e LSA_OPEN_POLICY_2 = 0x002c LSA_GET_USER_NAME = 0x002d NET_SHARE_GET_INFO = 0x0010 NET_SHARE_ENUM_ALL = 0x000f MDS_OPEN = 0x0000 )
View Source
const ( STYPE_DISKTREE = 0x00000000 STYPE_IPC_HIDDEN = 0x80000003 )
View Source
const (
HeaderSize = 16
)
Variables ¶
View Source
var ( NDR32 = []byte{ 0x04, 0x5d, 0x88, 0x8a, 0xeb, 0x1c, 0xc9, 0x11, 0x9f, 0xe8, 0x08, 0x00, 0x2b, 0x10, 0x48, 0x60, } NDR64 = []byte{ 0x33, 0x05, 0x71, 0x71, 0xba, 0xbe, 0x37, 0x49, 0x83, 0x19, 0xb5, 0xdb, 0xef, 0x9c, 0xcc, 0x36, } BIND_TIME_FEATURES = []byte{ 0x2c, 0x1c, 0xb7, 0x6c, 0x12, 0x98, 0x40, 0x45, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, } )
Functions ¶
This section is empty.
Types ¶
type Bind ¶
type BindAck ¶
type Frame ¶
type Frame struct { Handle lsarpc.Handle SecurityContext ntlm.SecurityContext }
type Header ¶
type InboundPacket ¶
func (*InboundPacket) Read ¶
func (ip *InboundPacket) Read(r io.Reader)
type MdsOpenRequest ¶
func (*MdsOpenRequest) Unmarshal ¶
func (req *MdsOpenRequest) Unmarshal(buf []byte)
type MdsOpenResponse ¶
type MdsOpenResponse struct { DeviceID uint32 Unkn2 uint32 Unkn3 uint32 PolicyHandle [20]byte MaxCount uint32 }
func (*MdsOpenResponse) MarshalNDR ¶
type NetShareEnumAllRequest ¶
type NetShareEnumAllRequest struct {}
func (*NetShareEnumAllRequest) Unmarshal ¶
func (req *NetShareEnumAllRequest) Unmarshal(buf []byte)
type NetShareEnumAllResponse ¶
type NetShareEnumAllResponse struct {}
func (*NetShareEnumAllResponse) MarshalNDR ¶
type NetShareGetInfoRequest ¶
type NetShareGetInfoRequest struct {}
func (*NetShareGetInfoRequest) Unmarshal ¶
func (req *NetShareGetInfoRequest) Unmarshal(buf []byte)
type NetShareInfo1 ¶
type NetShareInfo1 struct {}
type NetShareInfo1Response ¶
type NetShareInfo1Response struct {}
func (*NetShareInfo1Response) MarshalNDR ¶
type OutboundPacket ¶
func NewBindAck ¶
func NewBindAck(callID uint32, addr string, contexts []*Context) *OutboundPacket
func NewCloseResponse ¶
func NewCloseResponse(callID uint32, status uint32) *OutboundPacket
func NewGetUserNameResponse ¶
func NewGetUserNameResponse(callID uint32, accountName, authorityName string, status uint32) *OutboundPacket
func NewLookupNamesResponse ¶
func NewLookupNamesResponse(callID uint32, ctx ntlm.SecurityContext, status uint32) *OutboundPacket
func NewMdsOpenResponse ¶
func NewMdsOpenResponse(callID uint32, req MdsOpenRequest, path string, status uint32) *OutboundPacket
func NewNetShareEnumAllResponse ¶
func NewNetShareEnumAllResponse(callID uint32, shares []NetShareInfo1, status uint32) *OutboundPacket
func NewNetShareGetInfo1Response ¶
func NewNetShareGetInfo1Response(callID uint32, share, remark string, status uint32) *OutboundPacket
func NewOpenPolicy2Response ¶
func NewOpenPolicy2Response(callID uint32, frame *Frame, status uint32) *OutboundPacket
func (*OutboundPacket) Write ¶
func (op *OutboundPacket) Write(w io.Writer)
type ResponseBody ¶
func (*ResponseBody) Encode ¶
func (rb *ResponseBody) Encode(w io.Writer)
Click to show internal directories.
Click to hide internal directories.