scapy.layers.msrpce.msdcom

[MS-DCOM]

https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-dcom/4a893f3d-bd29-48cd-9f43-d9777a4415b0

class scapy.layers.msrpce.msdcom.ACTVFLAGS(*values)[source]

Bases: IntEnum

ACTIVATE_32_BIT_SERVER = 4
ACTIVATE_64_BIT_SERVER = 8
DISABLE_AAA = 2
NO_FAILURE_LOG = 32
class scapy.layers.msrpce.msdcom.ActivationContextInfoData(_pkt, /, *, clientOK=0, bReserved1=0, dwReserved1=0, dwReserved2=0, pIFDClientCtx=None, pIFDPrototypeCtx=None)[source]

Bases: NDRPacket

ALIGNMENT = (4, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            CLIENTOK           |           BRESERVED1          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          DWRESERVED1          |          DWRESERVED2          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         PIFDCLIENTCTX         |        PIFDPROTOTYPECTX       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. ActivationContextInfoData                  
ActivationContextInfoData fields

clientOK

NDRSignedIntField

0

bReserved1

NDRSignedIntField

0

dwReserved1

NDRIntField

0

dwReserved2

NDRIntField

0

pIFDClientCtx

NDRFullEmbPointerField

None

pIFDPrototypeCtx

NDRFullEmbPointerField

None

class scapy.layers.msrpce.msdcom.ActivationPropertiesBlob(_pkt, /, *, dwSize=None, dwReserved=0, CustomHeader=<CustomHeader  classInfoClsid=<GUID  |> |>, Property=[])[source]

Bases: Packet

aliastypes
default_payload_class(payload)[source]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             DWSIZE                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           DWRESERVED                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          CUSTOMHEADER         |            PROPERTY           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. ActivationPropertiesBlob                   
ActivationPropertiesBlob fields

dwSize

FieldLenField

None

dwReserved

LEIntField

0

CustomHeader

NDRSerializeType1PacketField

<CustomHeader  classInfoClsid=<GUID  |> |>

Property

_ActivationPropertiesField

[]

class scapy.layers.msrpce.msdcom.COSERVERINFO(_pkt, /, *, dwReserved1=0, pwszName=None, pdwReserved=None, dwReserved2=0)[source]

Bases: NDRPacket

ALIGNMENT = (4, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          DWRESERVED1          |            PWSZNAME           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          PDWRESERVED          |          DWRESERVED2          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. COSERVERINFO                         
COSERVERINFO fields

dwReserved1

NDRIntField

0

pwszName

NDRFullEmbPointerField

None

pdwReserved

NDRFullEmbPointerField

None

dwReserved2

NDRIntField

0

class scapy.layers.msrpce.msdcom.Context(_pkt, /, *, MajorVersion=1, MinVersion=1, ContextId=None, Flags=<Flag 0 ()>, Reserved=0, dwNumExtents=0, cbExtents=0, MshlFlags=0, Count=None, Frozen=1, PropMarshalHeader=[])[source]

Bases: Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          MAJORVERSION         |           MINVERSION          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           CONTEXTID                           |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             FLAGS                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            RESERVED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          DWNUMEXTENTS                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           CBEXTENTS                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           MSHLFLAGS                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             COUNT                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             FROZEN                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       PROPMARSHALHEADER       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                           Fig. Context                           
Context fields

MajorVersion

LEShortField

1

MinVersion

LEShortField

1

ContextId

UUIDField

None

Flags

FlagsField

<Flag 0 ()>

Reserved

LEIntField

0

dwNumExtents

LEIntField

0

cbExtents

LEIntField

0

MshlFlags

LEIntField

0

Count

FieldLenField

None

Frozen

LEIntField

1

PropMarshalHeader

PacketListField

[]

class scapy.layers.msrpce.msdcom.CustomHeader(_pkt, /, *, totalSize=0, headerSize=0, dwReserved=0, destCtx=2, cIfs=None, classInfoClsid=<GUID  |>, pclsid=None, pSizes=None, pdwReserved=None)[source]

Bases: NDRPacket

ALIGNMENT = (4, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           TOTALSIZE           |           HEADERSIZE          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           DWRESERVED          |            DESTCTX            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |            padding            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              CIFS             |         CLASSINFOCLSID        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             PCLSID            |             PSIZES            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          PDWRESERVED          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. CustomHeader                         
CustomHeader fields

totalSize

NDRIntField

0

headerSize

NDRIntField

0

dwReserved

NDRIntField

0

destCtx

NDRIntEnumField

2

cIfs

NDRIntField

None

classInfoClsid

NDRPacketField

<GUID  |>

pclsid

NDRFullEmbPointerField

None

pSizes

NDRFullEmbPointerField

None

pdwReserved

NDRFullEmbPointerField

None

class scapy.layers.msrpce.msdcom.DATAELEMENT(_pkt, /, *, dataID=None, cbSize=None, cbRounded=None, Data=b'')[source]

Bases: Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             DATAID                            |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             CBSIZE                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           CBROUNDED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |            padding            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. DATAELEMENT                         
DATAELEMENT fields

dataID

UUIDField

None

cbSize

FieldLenField

None

cbRounded

FieldLenField

None

Data

PadField

b''

class scapy.layers.msrpce.msdcom.DCOM_Client(cid: GUID = None, verb=True, **kwargs)[source]

Bases: DCERPC_Client

A wrapper of DCERPC_Client that adds functions to use COM interfaces.

Parameters:

cid – the client identifier

AcquireInterface(ipid: UUID, iids: List[ComInterface], cPublicRefs: int)[source]

[MS-DCOM] 3.2.4.4.3 - Acquiring Additional Interfaces on the Object

IREMUNKNOWN = <COM Interface IRemUnknown2>
RemRelease(ipid: UUID)[source]

3.2.4.4.2 Releasing Reference Counts on an Interface

RemoteCreateInstance(clsid: UUID, iids: List[ComInterface]) ObjectInstance[source]

Calls IRemoteSCMActivator::RemoteCreateInstance and returns a OXID_Entry that points to an instance of the provided class.

Parameters:
  • clsid – the class ID to initialize

  • iids – the IDs of the interfaces to request

RemoteGetClassObject(clsid: UUID, iids: List[ComInterface]) ObjectInstance[source]

Calls IRemoteSCMActivator::RemoteGetClassObject and returns a OXID_Entry that points to the factory.

Parameters:
  • clsid – the class ID to initialize

  • iids – the IDs of the interfaces to request

ResolveOxid2(oxid: int, host: str | None = None, port: int | None = None)[source]

[MS-DCOM] 3.2.4.1.2.2 Issuing the OXID Resolution Request

Parameters:
  • oxid – the OXID to resolve

  • host – (optional) connect to a different host

  • port – (optional) connect to a different port

UnmarshallObjectReference(mifaceptr: MInterfacePointer, iid: ComInterface)[source]

[MS-DCOM] 3.2.4.3 Marshaling an Object Reference

Unmarshall a MInterfacePointer received by the applicative layer.

connect(host: str, timeout=5)[source]

Initiate a connection to the object resolver.

Parameters:
  • host – the host to connect to

  • timeout – (optional) the connection timeout (default 5)

sr1_orpc_req(pkt: NDRPacket, ipid: UUID, ssp=None, auth_level=None, timeout=5, **kwargs)[source]

Make an ORPC call.

Parameters:
  • ipid – the reference to a specific interface on an object.

  • pkt – the request to make.

  • ssp – (optional) non default SSP to use to connect to the object exporter

  • auth_level – (optional) non default authn level to use

  • timeout – (optional) timeout for the connection

sr1_req(pkt, **kwargs)[source]
class scapy.layers.msrpce.msdcom.IPID_Entry[source]

Bases: object

An entry in the IPID table [MS-DCOM] 3.1.1.1 Abstract Data Model

class scapy.layers.msrpce.msdcom.InstanceInfoData(_pkt, /, *, fileName=None, mode=0, ifdROT=None, ifdStg=None)[source]

Bases: NDRPacket

ALIGNMENT = (4, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            FILENAME           |              MODE             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             IFDROT            |             IFDSTG            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. InstanceInfoData                       
InstanceInfoData fields

fileName

NDRFullEmbPointerField

None

mode

NDRIntField

0

ifdROT

NDRFullEmbPointerField

None

ifdStg

NDRFullEmbPointerField

None

class scapy.layers.msrpce.msdcom.InstantiationInfoData(_pkt, /, *, classId=<GUID  |>, classCtx=0, actvflags=0, fIsSurrogate=0, cIID=None, instFlag=0, pIID=None, thisSize=0, clientCOMVersion=<COMVERSION  |>)[source]

Bases: NDRPacket

ALIGNMENT = (4, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            CLASSID            |            padding            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            CLASSCTX           |           ACTVFLAGS           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          FISSURROGATE         |              CIID             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            INSTFLAG           |              PIID             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            THISSIZE           |        CLIENTCOMVERSION       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. InstantiationInfoData                    
InstantiationInfoData fields

classId

NDRPacketField

<GUID  |>

classCtx

NDRIntField

0

actvflags

NDRIntField

0

fIsSurrogate

NDRSignedIntField

0

cIID

NDRIntField

None

instFlag

NDRIntField

0

pIID

NDRFullEmbPointerField

None

thisSize

NDRIntField

0

clientCOMVersion

NDRPacketField

<COMVERSION  |>

class scapy.layers.msrpce.msdcom.LocationInfoData(_pkt, /, *, machineName=None, processId=0, apartmentId=0, contextId=0)[source]

Bases: NDRPacket

ALIGNMENT = (4, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          MACHINENAME          |           PROCESSID           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          APARTMENTID          |           CONTEXTID           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. LocationInfoData                       
LocationInfoData fields

machineName

NDRFullEmbPointerField

None

processId

NDRIntField

0

apartmentId

NDRIntField

0

contextId

NDRIntField

0

class scapy.layers.msrpce.msdcom.OBJREF(_pkt, /, *, signature=b'MEOW', flags=4, iid=UUID('000001a2-0000-0000-c000-000000000046'))[source]

Bases: Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           SIGNATURE                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             FLAGS                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              IID                              |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                           Fig. OBJREF                            
OBJREF fields

signature

XStrFixedLenField

b'MEOW'

flags

LEIntField

4

iid

UUIDField

UUID('000001a2-0000-0000-c000-000000000046')

payload_guess

Possible sublayers: OBJREF_CUSTOM, OBJREF_EXTENDED, OBJREF_HANDLER, OBJREF_STANDARD

class scapy.layers.msrpce.msdcom.OBJREF_CUSTOM(_pkt, /, *, clsid=UUID('00000338-0000-0000-c000-000000000046'), cbExtension=0, reserved=None, pObjectData=<ActivationPropertiesBlob  CustomHeader=<CustomHeader  classInfoClsid=<GUID  |> |> |>)[source]

Bases: Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             CLSID                             |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          CBEXTENSION                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            RESERVED                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          POBJECTDATA          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. OBJREF_CUSTOM                        
OBJREF_CUSTOM fields

clsid

UUIDField

UUID('00000338-0000-0000-c000-000000000046')

cbExtension

LEIntField

0

reserved

FieldLenField

None

pObjectData

_pObjectDataField

<ActivationPropertiesBlob  CustomHeader=<CustomHeader  classInfoClsid=<GUID  |> |> |>

class scapy.layers.msrpce.msdcom.OBJREF_EXTENDED(_pkt, /, *, std=<STDOBJREF  |>, Signature1=1314085206, saResAddr=<DUALSTRINGARRAY  |>, nElms=1, Signature2=1314085206, ElmArray=<DATAELEMENT  |>)[source]

Bases: Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              STD              |           SIGNATURE1          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |           SARESADDR           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             NELMS                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           SIGNATURE2                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            ELMARRAY           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. OBJREF_EXTENDED                       
OBJREF_EXTENDED fields

std

PacketField

<STDOBJREF  |>

Signature1

LEIntField

1314085206

saResAddr

PacketField

<DUALSTRINGARRAY  |>

nElms

LEIntField

1

Signature2

LEIntField

1314085206

ElmArray

PacketField

<DATAELEMENT  |>

class scapy.layers.msrpce.msdcom.OBJREF_HANDLER(_pkt, /, *, std=<STDOBJREF  |>, clsid=None, saResAddr=<DUALSTRINGARRAY  |>)[source]

Bases: Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              STD              |             CLSID             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |           SARESADDR           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. OBJREF_HANDLER                        
OBJREF_HANDLER fields

std

PacketField

<STDOBJREF  |>

clsid

UUIDField

None

saResAddr

PacketField

<DUALSTRINGARRAY  |>

class scapy.layers.msrpce.msdcom.OBJREF_STANDARD(_pkt, /, *, std=<STDOBJREF  |>, saResAddr=<DUALSTRINGARRAY  |>)[source]

Bases: Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              STD              |           SARESADDR           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. OBJREF_STANDARD                       
OBJREF_STANDARD fields

std

PacketField

<STDOBJREF  |>

saResAddr

PacketField

<DUALSTRINGARRAY  |>

class scapy.layers.msrpce.msdcom.OID_Entry[source]

Bases: object

An entry in the OID table [MS-DCOM] 3.1.1.1 Abstract Data Model

class scapy.layers.msrpce.msdcom.OXID_Entry[source]

Bases: object

An entry in the OXID table. [MS-DCOM] 3.2.1 Abstract Data Model

class scapy.layers.msrpce.msdcom.ObjectInstance(client: DCOM_Client, oid: int)[source]

Bases: object

An reference to an instantiated object.

This is a helper to manipulate this object and perform calls over it.

property ndr64

Whether NDR64 is required to talk to this object

release()[source]

Call IRemUnknown2::RemRelease to release counts on an object reference.

sr1_req(pkt: NDRPacket, iface: ComInterface, ssp=None, auth_level=None, timeout=None, **kwargs)[source]

Make an ORPC call on this object instance.

Parameters:
  • iface – the ComInterface to call.

  • pkt – the request to make.

  • ssp – (optional) non default SSP to use to connect to the object exporter

  • auth_level – (optional) non default authn level to use

  • timeout – (optional) timeout for the connection

property valid

Returns whether the current object still exists

class scapy.layers.msrpce.msdcom.PROPMARSHALHEADER(_pkt, /, *, clsid=None, policyId=None, flags=<Flag 0 ()>, cb=None, ctxProperty=b'')[source]

Bases: Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             CLSID                             |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            POLICYID                           |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             FLAGS                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               CB              |          CTXPROPERTY          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. PROPMARSHALHEADER                      
PROPMARSHALHEADER fields

clsid

UUIDField

None

policyId

UUIDField

None

flags

FlagsField

<Flag 0 ()>

cb

FieldLenField

None

ctxProperty

StrLenField

b''

class scapy.layers.msrpce.msdcom.PropsOutInfo(_pkt, /, *, cIfs=None, piid=None, phresults=None, ppIntfData=None)[source]

Bases: NDRPacket

ALIGNMENT = (4, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              CIFS             |              PIID             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           PHRESULTS           |           PPINTFDATA          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. PropsOutInfo                         
PropsOutInfo fields

cIfs

NDRIntField

None

piid

NDRFullEmbPointerField

None

phresults

NDRFullEmbPointerField

None

ppIntfData

NDRFullEmbPointerField

None

class scapy.layers.msrpce.msdcom.Resolver_Entry[source]

Bases: object

An entry in the Resolver table. [MS-DCOM] 3.2.1 Abstract Data Model

class scapy.layers.msrpce.msdcom.SECURITYBINDING(_pkt, /, *, wAuthnSvc=0, Reserved=65535, aPrincName=b'')[source]

Bases: Packet

aliastypes
default_payload_class(payload)[source]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           WAUTHNSVC           |            RESERVED           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           APRINCNAME          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. SECURITYBINDING                       
SECURITYBINDING fields

wAuthnSvc

LEShortEnumField

0

Reserved

XShortField (Cond)

65535

aPrincName

StrNullFieldUtf16 (Cond)

b''

class scapy.layers.msrpce.msdcom.SETID_Entry[source]

Bases: object

An entry in the SETID table. [MS-DCOM] 3.2.1 Abstract Data Model

class scapy.layers.msrpce.msdcom.STDOBJREF(_pkt, /, *, flags=<Flag 0 ()>, cPublicRefs=0, oxid=0, oid=0, ipid=None)[source]

Bases: Packet

aliastypes
default_payload_class(payload)[source]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             FLAGS                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          CPUBLICREFS                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              OXID                             |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              OID                              |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              IPID                             |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. STDOBJREF                          
STDOBJREF fields

flags

FlagsField

<Flag 0 ()>

cPublicRefs

LEIntField

0

oxid

LELongField

0

oid

LELongField

0

ipid

UUIDField

None

class scapy.layers.msrpce.msdcom.STRINGBINDING(_pkt, /, *, wTowerId=0, aNetworkAddr=b'')[source]

Bases: Packet

aliastypes
default_payload_class(payload)[source]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            WTOWERID           |          ANETWORKADDR         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. STRINGBINDING                        
STRINGBINDING fields

wTowerId

LEShortEnumField

0

aNetworkAddr

StrNullFieldUtf16

b''

class scapy.layers.msrpce.msdcom.ScmReplyInfoData(_pkt, /, *, pdwReserved=None, remoteReply=None)[source]

Bases: NDRPacket

ALIGNMENT = (4, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          PDWRESERVED          |          REMOTEREPLY          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. ScmReplyInfoData                       
ScmReplyInfoData fields

pdwReserved

NDRFullEmbPointerField

None

remoteReply

NDRFullEmbPointerField

None

class scapy.layers.msrpce.msdcom.ScmRequestInfoData(_pkt, /, *, pdwReserved=None, remoteRequest=None)[source]

Bases: NDRPacket

ALIGNMENT = (4, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          PDWRESERVED          |         REMOTEREQUEST         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. ScmRequestInfoData                      
ScmRequestInfoData fields

pdwReserved

NDRFullEmbPointerField

None

remoteRequest

NDRFullEmbPointerField

None

class scapy.layers.msrpce.msdcom.SecurityInfoData(_pkt, /, *, dwAuthnFlags=0, pServerInfo=None, pdwReserved=None)[source]

Bases: NDRPacket

ALIGNMENT = (4, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          DWAUTHNFLAGS         |          PSERVERINFO          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          PDWRESERVED          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. SecurityInfoData                       
SecurityInfoData fields

dwAuthnFlags

NDRIntField

0

pServerInfo

NDRFullEmbPointerField

None

pdwReserved

NDRFullPointerField

None

scapy.layers.msrpce.msdcom.ServerAlive2(host, timeout=5) Tuple[List[STRINGBINDING], List[SECURITYBINDING]][source]

Call IObjectExporter::ServerAlive2

class scapy.layers.msrpce.msdcom.SpecialPropertiesData(_pkt, /, *, dwSessionId=4294967295, fRemoteThisSessionId=0, fClientImpersonating=0, fPartitionIDPresent=0, dwDefaultAuthnLvl=RPC_C_AUTHN_LEVEL.PKT_INTEGRITY, guidPartition=<GUID  |>, dwPRTFlags=0, dwOrigClsctx=0, dwFlags=0, Reserved1=0, Reserved2=0, Reserved3=[0, 0, 0, 0, 0])[source]

Bases: NDRPacket

ALIGNMENT = (8, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          DWSESSIONID          |      FREMOTETHISSESSIONID     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      FCLIENTIMPERSONATING     |      FPARTITIONIDPRESENT      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       DWDEFAULTAUTHNLVL       |         GUIDPARTITION         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           DWPRTFLAGS          |          DWORIGCLSCTX         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            DWFLAGS                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           RESERVED1           |           RESERVED2           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           RESERVED3           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. SpecialPropertiesData                    
SpecialPropertiesData fields

dwSessionId

NDRIntField

4294967295

fRemoteThisSessionId

NDRSignedIntField

0

fClientImpersonating

NDRSignedIntField

0

fPartitionIDPresent

NDRSignedIntField

0

dwDefaultAuthnLvl

NDRIntField

<RPC_C_AUTHN_LEVEL.PKT_INTEGRITY: 5>

guidPartition

NDRPacketField

<GUID  |>

dwPRTFlags

NDRIntField

0

dwOrigClsctx

NDRIntField

0

dwFlags

NDRIntEnumField

0

Reserved1

NDRIntField

0

Reserved2

NDRLongField

0

Reserved3

NDRFieldListField

[0, 0, 0, 0, 0]

class scapy.layers.msrpce.msdcom.customREMOTE_REPLY_SCM_INFO(_pkt, /, *, Oxid=0, pdsaOxidBindings=None, ipidRemUnknown=<GUID  |>, authnHint=0, serverVersion=<COMVERSION  |>)[source]

Bases: NDRPacket

ALIGNMENT = (8, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              OXID             |        PDSAOXIDBINDINGS       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         IPIDREMUNKNOWN        |            padding            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           AUTHNHINT           |         SERVERVERSION         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. customREMOTE_REPLY_SCM_INFO                 
customREMOTE_REPLY_SCM_INFO fields

Oxid

NDRLongField

0

pdsaOxidBindings

NDRFullEmbPointerField

None

ipidRemUnknown

NDRPacketField

<GUID  |>

authnHint

NDRIntField

0

serverVersion

NDRPacketField

<COMVERSION  |>

class scapy.layers.msrpce.msdcom.customREMOTE_REQUEST_SCM_INFO(_pkt, /, *, ClientImpLevel=2, cRequestedProtseqs=None, pRequestedProtseqs=None)[source]

Bases: NDRPacket

ALIGNMENT = (4, 8)
aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         CLIENTIMPLEVEL        |       CREQUESTEDPROTSEQS      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       PREQUESTEDPROTSEQS      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Fig. customREMOTE_REQUEST_SCM_INFO                
customREMOTE_REQUEST_SCM_INFO fields

ClientImpLevel

NDRIntField

2

cRequestedProtseqs

NDRShortField

None

pRequestedProtseqs

NDRFullEmbPointerField

None