scapy.contrib.dce_rpc¶
A basic dissector for DCE/RPC. Isn’t reliable for all packets and for building
-
class
scapy.contrib.dce_rpc.
DceRpc
(*args, **kargs)¶ Bases:
scapy.packet.Packet
DCE/RPC 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VERSION | TYPE | FLAGS1 | FLAGS2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |ENDIANN|ENCODIN| FLOAT |DATAREPR RESERV| SERIAL HIGH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | OBJECT UUID | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | INTERFACE UUID | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ACTIVITY | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | BOOT TIME | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | INTERFACE VERSION | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SEQUENCE NUM | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | OPNUM | INTERFACE HINT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ACTIVITY HINT | FRAG LEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | FRAG NUM | AUTH | SERIAL LOW | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. DceRpc
DceRpc fields¶ version
4
type
0
flags1
FlagsField
(8 bits)<Flag 0 ()>
flags2
FlagsField
(8 bits)<Flag 0 ()>
endianness
BitEnumField
(4 bits)0
encoding
BitEnumField
(4 bits)0
float
0
DataRepr_reserved
0
serial_high
0
object_uuid
None
interface_uuid
None
activity
None
boot_time
0
interface_version
1
sequence_num
0
opnum
0
interface_hint
65535
activity_hint
65535
frag_len
None
frag_num
0
auth
0
serial_low
0
-
payload_guess
¶ Possible sublayers:
DceRpcPayload
-
-
class
scapy.contrib.dce_rpc.
DceRpcPayload
(*args, **kargs)¶ Bases:
scapy.packet.Packet
Dummy class which use the dispatch_hook to find the payload class
-
aliastypes
¶
-
classmethod
dispatch_hook
(_pkt, _underlayer=None, *args, **kargs)¶ dispatch_hook to choose among different registered payloads
-
classmethod
register_possible_payload
(pay)¶ Method to call from possible DCE/RPC endpoint to register it as possible payload
-
-
class
scapy.contrib.dce_rpc.
EndiannessField
(fld, endianess_from)¶ Bases:
object
Field which change the endianness of a sub-field
-
addfield
(pkt, buf, val)¶ add the field with endianness to the buffer
-
endianess_from
¶
-
fld
¶
-
getfield
(pkt, buf)¶ retrieve the field with endianness
-
set_endianess
(pkt)¶ Add the endianness to the format
-
-
scapy.contrib.dce_rpc.
dce_rpc_endianess
(pkt)¶ Determine the right endianness sign for a given DCE/RPC packet