How to use the impacket.dcerpc.v5.ndr.NDRPOINTER function in impacket

To help you get started, we’ve selected a few impacket examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ropnop / impacket_static_binaries / impacket / dcerpc / v5 / srvs.py View on Github external
SRVSVC_HANDLE = WCHAR

class PSRVSVC_HANDLE(NDRPOINTER):
    referent = (
        ('Data', SRVSVC_HANDLE),
    )

# 2.2.1.2 SHARE_DEL_HANDLE
class SHARE_DEL_HANDLE(NDRSTRUCT):
    align = 1
    structure =  (
        ('Data','20s=""'),
    )

# 2.2.1.3 PSHARE_DEL_HANDLE
class PSHARE_DEL_HANDLE(NDRPOINTER):
    referent = (
        ('Data', SHARE_DEL_HANDLE),
    )

# 2.2.2.2 MAX_PREFERRED_LENGTH
MAX_PREFERRED_LENGTH = -1

# 2.2.2.3 Session User Flags
SESS_GUEST        = 0x00000001
SESS_NOENCRYPTION = 0x00000002

# 2.2.2.4 Share Types
STYPE_DISKTREE     = 0x00000000
STYPE_PRINTQ       = 0x00000001
STYPE_DEVICE       = 0x00000002
STYPE_IPC          = 0x00000003
github SecureAuthCorp / impacket / impacket / dcerpc / v5 / srvs.py View on Github external
}

# 2.2.4.5 CONNECT_ENUM_STRUCT
class CONNECT_ENUM_STRUCT(NDRSTRUCT):
    structure = (
        ('Level', DWORD),
        ('ConnectInfo', CONNECT_ENUM_UNION),
    )

# 2.2.4.6 FILE_INFO_2
class FILE_INFO_2(NDRSTRUCT):
    structure = (
        ('fi2_id', DWORD),
    )

class LPFILE_INFO_2(NDRPOINTER):
    referent = (
        ('Data', FILE_INFO_2),
    )

class FILE_INFO_2_ARRAY(NDRUniConformantArray):
    item = FILE_INFO_2

class LPFILE_INFO_2_ARRAY(NDRPOINTER):
    referent = (
        ('Data', FILE_INFO_2_ARRAY),
    )

# 2.2.4.7 FILE_INFO_3
class FILE_INFO_3(NDRSTRUCT):
    structure = (
        ('fi3_id', DWORD),
github ropnop / impacket_static_binaries / impacket / dcerpc / v5 / srvs.py View on Github external
structure = (
        ('sv1547_alertschedule', DWORD),
    )

class LPSERVER_INFO_1547(NDRPOINTER):
    referent = (
        ('Data', SERVER_INFO_1547),
    )

# 2.2.4.83 SERVER_INFO_1548
class SERVER_INFO_1548(NDRSTRUCT):
    structure = (
        ('sv1548_errorthreshold', DWORD),
    )

class LPSERVER_INFO_1548(NDRPOINTER):
    referent = (
        ('Data', SERVER_INFO_1548),
    )

# 2.2.4.84 SERVER_INFO_1549
class SERVER_INFO_1549(NDRSTRUCT):
    structure = (
        ('sv1549_networkerrorthreshold', DWORD),
    )

class LPSERVER_INFO_1549(NDRPOINTER):
    referent = (
        ('Data', SERVER_INFO_1549),
    )

# 2.2.4.85 SERVER_INFO_1550
github Coalfire-Research / Slackor / impacket / impacket / dcerpc / v5 / srvs.py View on Github external
class DISK_INFO(NDRSTRUCT):
    structure = (
        ('Disk', WCHAR_ARRAY),
    )

class LPDISK_INFO(NDRPOINTER):
    referent = (
        ('Data', DISK_INFO),
    )

class DISK_INFO_ARRAY(NDRUniConformantVaryingArray):
    item = DISK_INFO

class LPDISK_INFO_ARRAY(NDRPOINTER):
    referent = (
        ('Data', DISK_INFO_ARRAY),
    )

# 2.2.4.92 DISK_ENUM_CONTAINER
class DISK_ENUM_CONTAINER(NDRSTRUCT):
    structure = (
        ('EntriesRead', DWORD),
        ('Buffer', LPDISK_INFO_ARRAY),
    )

class LPDISK_ENUM_CONTAINER(NDRPOINTER):
    referent = (
        ('Data', DISK_ENUM_CONTAINER),
    )
github Coalfire-Research / Slackor / impacket / impacket / dcerpc / v5 / dcomrt.py View on Github external
# 2.2.13.4 ORPCTHAT
class ORPCTHAT(NDRSTRUCT):
    structure = (
        ('flags',ULONG),
        ('extensions',PORPC_EXTENT_ARRAY),
    )

# 2.2.14 MInterfacePointer
class MInterfacePointer(NDRSTRUCT):
    structure = (
        ('ulCntData',ULONG),
        ('abData',BYTE_ARRAY),
    )

# 2.2.15 PMInterfacePointerInternal
class PMInterfacePointerInternal(NDRPOINTER):
    referent = (
        ('Data', MInterfacePointer),
    )

# 2.2.16 PMInterfacePointer
class PMInterfacePointer(NDRPOINTER):
    referent = (
        ('Data', MInterfacePointer),
    )

class PPMInterfacePointer(NDRPOINTER):
    referent = (
        ('Data', PMInterfacePointer),
    )

# 2.2.18 OBJREF
github SecureAuthCorp / impacket / impacket / dcerpc / v5 / samr.py View on Github external
class SAMPR_ENUMERATION_BUFFER(NDRSTRUCT):
    structure = (
        ('EntriesRead',ULONG ),
        ('Buffer',PSAMPR_RID_ENUMERATION_ARRAY ),
    )

class PSAMPR_ENUMERATION_BUFFER(NDRPOINTER):
    referent = (
        ('Data',SAMPR_ENUMERATION_BUFFER),
    )

# 2.2.3.11 SAMPR_SR_SECURITY_DESCRIPTOR
class CHAR_ARRAY(NDRUniConformantArray):
    pass

class PCHAR_ARRAY(NDRPOINTER):
    referent = (
        ('Data', CHAR_ARRAY),
    )

class SAMPR_SR_SECURITY_DESCRIPTOR(NDRSTRUCT):
    structure = (
        ('Length', ULONG),
        ('SecurityDescriptor', PCHAR_ARRAY),
    )

class PSAMPR_SR_SECURITY_DESCRIPTOR(NDRPOINTER):
    referent = (
        ('Data', SAMPR_SR_SECURITY_DESCRIPTOR),
    )

# 2.2.3.12 GROUP_MEMBERSHIP
github ropnop / impacket_static_binaries / impacket / dcerpc / v5 / nrpc.py View on Github external
('ModifiedId', OLD_LARGE_INTEGER),
        ('DatabaseCreationTime', OLD_LARGE_INTEGER),
        ('SecurityInformation', SECURITY_INFORMATION),
        ('SecuritySize', ULONG),
        ('SecurityDescriptor', PUCHAR_ARRAY),
        ('DummyString1', RPC_UNICODE_STRING),
        ('DummyString2', RPC_UNICODE_STRING),
        ('DummyString3', RPC_UNICODE_STRING),
        ('DummyString4', RPC_UNICODE_STRING),
        ('DummyLong1', ULONG),
        ('DummyLong2', ULONG),
        ('DummyLong3', ULONG),
        ('DummyLong4', ULONG),
    )

class PNETLOGON_DELTA_POLICY(NDRPOINTER):
    referent = (
        ('Data', NETLOGON_DELTA_POLICY),
    )

# 2.2.1.5.22 NETLOGON_DELTA_TRUSTED_DOMAINS
class NETLOGON_DELTA_TRUSTED_DOMAINS(NDRSTRUCT):
    structure = (
        ('DomainName', RPC_UNICODE_STRING),
        ('NumControllerEntries', ULONG),
        ('ControllerNames', PRPC_UNICODE_STRING_ARRAY),
        ('SecurityInformation', SECURITY_INFORMATION),
        ('SecuritySize', ULONG),
        ('SecurityDescriptor', PUCHAR_ARRAY),
        ('DummyString1', RPC_UNICODE_STRING),
        ('DummyString2', RPC_UNICODE_STRING),
        ('DummyString3', RPC_UNICODE_STRING),
github ropnop / impacket_static_binaries / impacket / dcerpc / v5 / dhcpm.py View on Github external
)

class LPDHCP_CLIENT_INFO_PB(NDRPOINTER):
    referent = (
        ('Data', DHCP_CLIENT_INFO_PB),
    )

class LPDHCP_CLIENT_INFO_VQ(NDRPOINTER):
    referent = (
        ('Data', DHCP_CLIENT_INFO_VQ),
    )

class DHCP_CLIENT_INFO_VQ_ARRAY(NDRUniConformantArray):
    item = LPDHCP_CLIENT_INFO_VQ

class LPDHCP_CLIENT_INFO_VQ_ARRAY(NDRPOINTER):
    referent = (
        ('Data', DHCP_CLIENT_INFO_VQ_ARRAY),
    )

class DHCP_CLIENT_INFO_ARRAY_VQ(NDRSTRUCT):
    structure = (
        ('NumElements', DWORD),
        ('Clients', LPDHCP_CLIENT_INFO_VQ_ARRAY),
    )

class LPDHCP_CLIENT_INFO_ARRAY_VQ(NDRPOINTER):
    referent = (
        ('Data', DHCP_CLIENT_INFO_ARRAY_VQ),
    )

class DHCP_CLIENT_INFO_V4_ARRAY(NDRUniConformantArray):
github SecureAuthCorp / impacket / impacket / dcerpc / v5 / wkst.py View on Github external
('ui2_domainname', LPWSTR),
    )

class LPUSE_INFO_2(NDRPOINTER):
    referent = (
        ('Data', USE_INFO_2),
    )

# 2.2.5.24 USE_INFO_3
class USE_INFO_3(NDRSTRUCT):
    structure = (
        ('ui3_ui2', USE_INFO_2),
        ('ui3_flags', ULONG),
    )

class LPUSE_INFO_3(NDRPOINTER):
    referent = (
        ('Data', USE_INFO_3),
    )

# 2.2.4.2 USE_INFO
class USE_INFO(NDRUNION):
    commonHdr = (
        ('tag', ULONG),
    )

    union = {
        0: ('UseInfo0', LPUSE_INFO_0),
        1: ('UseInfo1', LPUSE_INFO_1),
        2: ('UseInfo2', LPUSE_INFO_2),
        3: ('UseInfo3', LPUSE_INFO_3),
    }
github SecureAuthCorp / impacket / impacket / dcerpc / v5 / even6.py View on Github external
referent = (
        ('Data', CONTEXT_HANDLE_LOG_QUERY),
    )

class LPPCONTEXT_HANDLE_LOG_QUERY(NDRPOINTER):
    referent = (
        ('Data', PCONTEXT_HANDLE_LOG_QUERY),
    )

class CONTEXT_HANDLE_OPERATION_CONTROL(NDRSTRUCT):
    align = 1
    structure = (
        ('Data', '20s=""'),
    )

class PCONTEXT_HANDLE_OPERATION_CONTROL(NDRPOINTER):
    referent = (
        ('Data', CONTEXT_HANDLE_OPERATION_CONTROL),
    )

# 2.2.11 EvtRpcQueryChannelInfo
class EvtRpcQueryChannelInfo(NDRSTRUCT):
    structure = (
        ('Name', LPWSTR),
        ('Status', DWORD),
    )

class EvtRpcQueryChannelInfoArray(NDRUniVaryingArray):
    item = EvtRpcQueryChannelInfo

class LPEvtRpcQueryChannelInfoArray(NDRPOINTER):
    referent = (