scapy.layers.netbios module

NetBIOS over TCP/IP

[RFC 1001/1002]

class scapy.layers.netbios.NBNSNodeStatusResponse

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.netbios.NBNSNodeStatusResponse'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NBNSNodeStatusResponse).NAME_TRN_ID>, <Field (NBNSNodeStatusResponse).FLAGS>, <Field (NBNSNodeStatusResponse).QDCOUNT>, <Field (NBNSNodeStatusResponse).ANCOUNT>, <Field (NBNSNodeStatusResponse).NSCOUNT>, <Field (NBNSNodeStatusResponse).ARCOUNT>, <Field (NBNSNodeStatusResponse).RR_NAME>, <Field (NBNSNodeStatusResponse).SUFFIX>, <Field (NBNSNodeStatusResponse).NULL>, <Field (NBNSNodeStatusResponse).RR_TYPE>, <Field (NBNSNodeStatusResponse).RR_CLASS>, <Field (NBNSNodeStatusResponse).TTL>, <Field (NBNSNodeStatusResponse).RDLENGTH>, <Field (NBNSNodeStatusResponse).NUM_NAMES>]
payload_guess = [({}, <class 'scapy.layers.netbios.NBNSNodeStatusResponseService'>), ({}, <class 'scapy.layers.netbios.NBNSNodeStatusResponseService'>)]
class scapy.layers.netbios.NBNSNodeStatusResponseEnd

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.netbios.NBNSNodeStatusResponseEnd'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NBNSNodeStatusResponseEnd).MAC_ADDRESS>, <Field (NBNSNodeStatusResponseEnd).STATISTICS>]
class scapy.layers.netbios.NBNSNodeStatusResponseService

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.netbios.NBNSNodeStatusResponseService'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NBNSNodeStatusResponseService).NETBIOS_NAME>, <Field (NBNSNodeStatusResponseService).SUFFIX>, <Field (NBNSNodeStatusResponseService).NAME_FLAGS>, <Field (NBNSNodeStatusResponseService).UNUSED>]
payload_guess = [({}, <class 'scapy.layers.netbios.NBNSNodeStatusResponseService'>), ({}, <class 'scapy.layers.netbios.NBNSNodeStatusResponseEnd'>)]
class scapy.layers.netbios.NBNSQueryRequest

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.netbios.NBNSQueryRequest'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NBNSQueryRequest).NAME_TRN_ID>, <Field (NBNSQueryRequest).FLAGS>, <Field (NBNSQueryRequest).QDCOUNT>, <Field (NBNSQueryRequest).ANCOUNT>, <Field (NBNSQueryRequest).NSCOUNT>, <Field (NBNSQueryRequest).ARCOUNT>, <Field (NBNSQueryRequest).QUESTION_NAME>, <Field (NBNSQueryRequest).SUFFIX>, <Field (NBNSQueryRequest).NULL>, <Field (NBNSQueryRequest).QUESTION_TYPE>, <Field (NBNSQueryRequest).QUESTION_CLASS>]
class scapy.layers.netbios.NBNSQueryResponse

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.netbios.NBNSQueryResponse'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NBNSQueryResponse).NAME_TRN_ID>, <Field (NBNSQueryResponse).FLAGS>, <Field (NBNSQueryResponse).QDCOUNT>, <Field (NBNSQueryResponse).ANCOUNT>, <Field (NBNSQueryResponse).NSCOUNT>, <Field (NBNSQueryResponse).ARCOUNT>, <Field (NBNSQueryResponse).RR_NAME>, <Field (NBNSQueryResponse).SUFFIX>, <Field (NBNSQueryResponse).NULL>, <Field (NBNSQueryResponse).QUESTION_TYPE>, <Field (NBNSQueryResponse).QUESTION_CLASS>, <Field (NBNSQueryResponse).TTL>, <Field (NBNSQueryResponse).RDLENGTH>, <Field (NBNSQueryResponse).NB_FLAGS>, <Field (NBNSQueryResponse).NB_ADDRESS>]
class scapy.layers.netbios.NBNSQueryResponseNegative

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.netbios.NBNSQueryResponseNegative'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NBNSQueryResponseNegative).NAME_TRN_ID>, <Field (NBNSQueryResponseNegative).FLAGS>, <Field (NBNSQueryResponseNegative).QDCOUNT>, <Field (NBNSQueryResponseNegative).ANCOUNT>, <Field (NBNSQueryResponseNegative).NSCOUNT>, <Field (NBNSQueryResponseNegative).ARCOUNT>, <Field (NBNSQueryResponseNegative).RR_NAME>, <Field (NBNSQueryResponseNegative).SUFFIX>, <Field (NBNSQueryResponseNegative).NULL>, <Field (NBNSQueryResponseNegative).RR_TYPE>, <Field (NBNSQueryResponseNegative).RR_CLASS>, <Field (NBNSQueryResponseNegative).TTL>, <Field (NBNSQueryResponseNegative).RDLENGTH>, <Field (NBNSQueryResponseNegative).G>, <Field (NBNSQueryResponseNegative).OWNER_NODE_TYPE>, <Field (NBNSQueryResponseNegative).UNUSED>, <Field (NBNSQueryResponseNegative).NB_ADDRESS>]
class scapy.layers.netbios.NBNSRequest

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.netbios.NBNSRequest'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NBNSRequest).NAME_TRN_ID>, <Field (NBNSRequest).FLAGS>, <Field (NBNSRequest).QDCOUNT>, <Field (NBNSRequest).ANCOUNT>, <Field (NBNSRequest).NSCOUNT>, <Field (NBNSRequest).ARCOUNT>, <Field (NBNSRequest).QUESTION_NAME>, <Field (NBNSRequest).SUFFIX>, <Field (NBNSRequest).NULL>, <Field (NBNSRequest).QUESTION_TYPE>, <Field (NBNSRequest).QUESTION_CLASS>, <Field (NBNSRequest).RR_NAME>, <Field (NBNSRequest).RR_TYPE>, <Field (NBNSRequest).RR_CLASS>, <Field (NBNSRequest).TTL>, <Field (NBNSRequest).RDLENGTH>, <Field (NBNSRequest).G>, <Field (NBNSRequest).OWNER_NODE_TYPE>, <Field (NBNSRequest).UNUSED>, <Field (NBNSRequest).NB_ADDRESS>]
class scapy.layers.netbios.NBNSWackResponse

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.netbios.NBNSWackResponse'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NBNSWackResponse).NAME_TRN_ID>, <Field (NBNSWackResponse).FLAGS>, <Field (NBNSWackResponse).QDCOUNT>, <Field (NBNSWackResponse).ANCOUNT>, <Field (NBNSWackResponse).NSCOUNT>, <Field (NBNSWackResponse).ARCOUNT>, <Field (NBNSWackResponse).RR_NAME>, <Field (NBNSWackResponse).SUFFIX>, <Field (NBNSWackResponse).NULL>, <Field (NBNSWackResponse).RR_TYPE>, <Field (NBNSWackResponse).RR_CLASS>, <Field (NBNSWackResponse).TTL>, <Field (NBNSWackResponse).RDLENGTH>, <Field (NBNSWackResponse).RDATA>]
class scapy.layers.netbios.NBTDatagram

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.netbios.NBTDatagram'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NBTDatagram).Type>, <Field (NBTDatagram).Flags>, <Field (NBTDatagram).ID>, <Field (NBTDatagram).SourceIP>, <Field (NBTDatagram).SourcePort>, <Field (NBTDatagram).Length>, <Field (NBTDatagram).Offset>, <Field (NBTDatagram).SourceName>, <Field (NBTDatagram).SUFFIX1>, <Field (NBTDatagram).NULL>, <Field (NBTDatagram).DestinationName>, <Field (NBTDatagram).SUFFIX2>, <Field (NBTDatagram).NULL>]
class scapy.layers.netbios.NBTSession

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.netbios.NBTSession'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NBTSession).TYPE>, <Field (NBTSession).RESERVED>, <Field (NBTSession).LENGTH>]
payload_guess = [({}, <class 'scapy.layers.smb.SMBNegociate_Protocol_Request_Header'>), ({'ExtendedSecurity': 1}, <class 'scapy.layers.smb.SMBNegociate_Protocol_Response_Advanced_Security'>), ({'ExtendedSecurity': 0, 'EncryptionKeyLength': 8}, <class 'scapy.layers.smb.SMBNegociate_Protocol_Response_No_Security'>), ({'ExtendedSecurity': 0, 'EncryptionKeyLength': 0}, <class 'scapy.layers.smb.SMBNegociate_Protocol_Response_No_Security_No_Key'>), ({}, <class 'scapy.layers.smb.SMBSession_Setup_AndX_Request'>), ({}, <class 'scapy.layers.smb.SMBSession_Setup_AndX_Response'>)]
class scapy.layers.netbios.NetBIOS_DS

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.netbios.NetBIOS_DS'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NetBIOS_DS).type>, <Field (NetBIOS_DS).flags>, <Field (NetBIOS_DS).id>, <Field (NetBIOS_DS).src>, <Field (NetBIOS_DS).sport>, <Field (NetBIOS_DS).len>, <Field (NetBIOS_DS).ofs>, <Field (NetBIOS_DS).srcname>, <Field (NetBIOS_DS).dstname>]
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload