scapy.layers.ntlm
NTLM
https://winprotocoldoc.blob.core.windows.net/productionwindowsarchives/MS-NLMP/%5bMS-NLMP%5d.pdf
- class scapy.layers.ntlm.AV_PAIR(_pkt, /, *, AvId=0, AvLen=None, Value=None)[源代码]
基类:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AVID | AVLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. AV_PAIRAV_PAIR fields AvId
0AvLen
NoneValue
MultipleTypeField(LEIntEnumField, UTCTimeField, PacketField, XStrLenField, StrLenFieldUtf16)b''
- scapy.layers.ntlm.HTTP_ntlm_negotiate(ntlm_negotiate)[源代码]
Create an HTTP NTLM negotiate packet from an NTLM_NEGOTIATE message
- class scapy.layers.ntlm.LM_RESPONSE(_pkt, /, *, Response=b'')[源代码]
基类:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESPONSE | + + | | + + | | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. LM_RESPONSELM_RESPONSE fields Response
b''
- class scapy.layers.ntlm.LMv2_RESPONSE(_pkt, /, *, Response=b'', ChallengeFromClient=b'')[源代码]
基类:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESPONSE | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CHALLENGEFROMCLIENT | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. LMv2_RESPONSELMv2_RESPONSE fields Response
b''ChallengeFromClient
b''
- class scapy.layers.ntlm.NEGOEX_EXCHANGE_NTLM(_pkt, /, *, items=[])[源代码]
基类:
ASN1_PacketGSSAPI NegoEX Exchange metadata blob This was reversed and may be meaningless
- ASN1_codec = <ASN1Codec BER[1]>
- ASN1_root = <ASN1F_SEQUENCE(<ASN1F_SEQUENCE(<ASN1F_SEQUENCE_OF items>,)>,)>
- aliastypes
- class scapy.layers.ntlm.NEGOEX_EXCHANGE_NTLM_ITEM(_pkt, /, *, oid=<ASN1_OID['.']>, token=<ASN1_PRINTABLE_STRING['']>)[源代码]
基类:
ASN1_Packet- ASN1_codec = <ASN1Codec BER[1]>
- ASN1_root = <ASN1F_SEQUENCE(<ASN1F_SEQUENCE(<ASN1F_SEQUENCE(<scapy.asn1fields.ASN1F_OID object>, <scapy.asn1fields.ASN1F_PRINTABLE_STRING object>)>,)>,)>
- aliastypes
- class scapy.layers.ntlm.NTLMSSP_MESSAGE_SIGNATURE(_pkt, /, *, Version=1, Checksum=b'', SeqNum=0)[源代码]
基类:
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 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CHECKSUM | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SEQNUM | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NTLMSSP_MESSAGE_SIGNATURENTLMSSP_MESSAGE_SIGNATURE fields Version
1Checksum
b''SeqNum
0
- class scapy.layers.ntlm.NTLM_AUTHENTICATE(_pkt, /, *, Signature=b'NTLMSSP\x00', MessageType=3, LmChallengeResponseLen=None, LmChallengeResponseMaxLen=None, LmChallengeResponseBufferOffset=None, NtChallengeResponseLen=None, NtChallengeResponseMaxLen=None, NtChallengeResponseBufferOffset=None, DomainNameLen=None, DomainNameMaxLen=None, DomainNameBufferOffset=None, UserNameLen=None, UserNameMaxLen=None, UserNameBufferOffset=None, WorkstationLen=None, WorkstationMaxLen=None, WorkstationBufferOffset=None, EncryptedRandomSessionKeyLen=None, EncryptedRandomSessionKeyMaxLen=None, EncryptedRandomSessionKeyBufferOffset=None, NegotiateFlags=<Flag 0 ()>, ProductMajorVersion=0, ProductMinorVersion=0, ProductBuild=0, res_ver=0, NTLMRevisionCurrent=15, MIC=b'', Payload=[])[源代码]
基类:
_NTLMPayloadPacket- NTLM_VERSION = 1
- OFFSET = 88
- 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 | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MESSAGETYPE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LMCHALLENGERESPONSELEN | LMCHALLENGERESPONSEMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LMCHALLENGERESPONSEBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NTCHALLENGERESPONSELEN | NTCHALLENGERESPONSEMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NTCHALLENGERESPONSEBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DOMAINNAMELEN | DOMAINNAMEMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DOMAINNAMEBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | USERNAMELEN | USERNAMEMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | USERNAMEBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | WORKSTATIONLEN | WORKSTATIONMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | WORKSTATIONBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ENCRYPTEDRANDOMSESSIONKEYLEN |ENCRYPTEDRANDOMSESSIONKEYMAXLEN| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ENCRYPTEDRANDOMSESSIONKEYBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NEGOTIATEFLAGS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |PRODUCTMAJORVER|PRODUCTMINORVER| PRODUCTBUILD | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RES VER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |NTLMREVISIONCUR| MIC | +-+-+-+-+-+-+-+-+ + | | + + | | + + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | PAYLOAD | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NTLM_AUTHENTICATENTLM_AUTHENTICATE fields Signature
b'NTLMSSP\x00'MessageType
3LmChallengeResponseLen
NoneLmChallengeResponseMaxLen
NoneLmChallengeResponseBufferOffset
NoneNtChallengeResponseLen
NoneNtChallengeResponseMaxLen
NoneNtChallengeResponseBufferOffset
NoneDomainNameLen
NoneDomainNameMaxLen
NoneDomainNameBufferOffset
NoneUserNameLen
NoneUserNameMaxLen
NoneUserNameBufferOffset
NoneWorkstationLen
NoneWorkstationMaxLen
NoneWorkstationBufferOffset
NoneEncryptedRandomSessionKeyLen
NoneEncryptedRandomSessionKeyMaxLen
NoneEncryptedRandomSessionKeyBufferOffset
NoneNegotiateFlags
<Flag 0 ()>ProductMajorVersion
0ProductMinorVersion
0ProductBuild
0res_ver
0NTLMRevisionCurrent
15MIC
XStrFixedLenField(Cond)b''Payload
_NTLMPayloadField[]
- messageType = 3
- class scapy.layers.ntlm.NTLM_AUTHENTICATE_V2(_pkt, /, *, Signature=b'NTLMSSP\x00', MessageType=3, LmChallengeResponseLen=None, LmChallengeResponseMaxLen=None, LmChallengeResponseBufferOffset=None, NtChallengeResponseLen=None, NtChallengeResponseMaxLen=None, NtChallengeResponseBufferOffset=None, DomainNameLen=None, DomainNameMaxLen=None, DomainNameBufferOffset=None, UserNameLen=None, UserNameMaxLen=None, UserNameBufferOffset=None, WorkstationLen=None, WorkstationMaxLen=None, WorkstationBufferOffset=None, EncryptedRandomSessionKeyLen=None, EncryptedRandomSessionKeyMaxLen=None, EncryptedRandomSessionKeyBufferOffset=None, NegotiateFlags=<Flag 0 ()>, ProductMajorVersion=0, ProductMinorVersion=0, ProductBuild=0, res_ver=0, NTLMRevisionCurrent=15, MIC=b'', Payload=[])[源代码]
-
- NTLM_VERSION = 2
- 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 | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MESSAGETYPE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LMCHALLENGERESPONSELEN | LMCHALLENGERESPONSEMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LMCHALLENGERESPONSEBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NTCHALLENGERESPONSELEN | NTCHALLENGERESPONSEMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NTCHALLENGERESPONSEBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DOMAINNAMELEN | DOMAINNAMEMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DOMAINNAMEBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | USERNAMELEN | USERNAMEMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | USERNAMEBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | WORKSTATIONLEN | WORKSTATIONMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | WORKSTATIONBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ENCRYPTEDRANDOMSESSIONKEYLEN |ENCRYPTEDRANDOMSESSIONKEYMAXLEN| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ENCRYPTEDRANDOMSESSIONKEYBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NEGOTIATEFLAGS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |PRODUCTMAJORVER|PRODUCTMINORVER| PRODUCTBUILD | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RES VER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |NTLMREVISIONCUR| MIC | +-+-+-+-+-+-+-+-+ + | | + + | | + + | | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | PAYLOAD | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NTLM_AUTHENTICATE_V2NTLM_AUTHENTICATE_V2 fields Signature
b'NTLMSSP\x00'MessageType
3LmChallengeResponseLen
NoneLmChallengeResponseMaxLen
NoneLmChallengeResponseBufferOffset
NoneNtChallengeResponseLen
NoneNtChallengeResponseMaxLen
NoneNtChallengeResponseBufferOffset
NoneDomainNameLen
NoneDomainNameMaxLen
NoneDomainNameBufferOffset
NoneUserNameLen
NoneUserNameMaxLen
NoneUserNameBufferOffset
NoneWorkstationLen
NoneWorkstationMaxLen
NoneWorkstationBufferOffset
NoneEncryptedRandomSessionKeyLen
NoneEncryptedRandomSessionKeyMaxLen
NoneEncryptedRandomSessionKeyBufferOffset
NoneNegotiateFlags
<Flag 0 ()>ProductMajorVersion
0ProductMinorVersion
0ProductBuild
0res_ver
0NTLMRevisionCurrent
15MIC
XStrFixedLenField(Cond)b''Payload
_NTLMPayloadField[]
- class scapy.layers.ntlm.NTLM_CHALLENGE(_pkt, /, *, Signature=b'NTLMSSP\x00', MessageType=3, TargetNameLen=None, TargetNameMaxLen=None, TargetNameBufferOffset=None, NegotiateFlags=<Flag 0 ()>, ServerChallenge=None, Reserved=None, TargetInfoLen=None, TargetInfoMaxLen=None, TargetInfoBufferOffset=None, ProductMajorVersion=0, ProductMinorVersion=0, ProductBuild=0, res_ver=0, NTLMRevisionCurrent=15, Payload=[])[源代码]
基类:
_NTLMPayloadPacket- OFFSET = 56
- 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 | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MESSAGETYPE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TARGETNAMELEN | TARGETNAMEMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TARGETNAMEBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NEGOTIATEFLAGS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SERVERCHALLENGE | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESERVED | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TARGETINFOLEN | TARGETINFOMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TARGETINFOBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |PRODUCTMAJORVER|PRODUCTMINORVER| PRODUCTBUILD | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RES VER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |NTLMREVISIONCUR| PAYLOAD | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NTLM_CHALLENGENTLM_CHALLENGE fields Signature
b'NTLMSSP\x00'MessageType
3TargetNameLen
NoneTargetNameMaxLen
NoneTargetNameBufferOffset
NoneNegotiateFlags
<Flag 0 ()>ServerChallenge
NoneReserved
NoneTargetInfoLen
NoneTargetInfoMaxLen
NoneTargetInfoBufferOffset
NoneProductMajorVersion
0ProductMinorVersion
0ProductBuild
0res_ver
0NTLMRevisionCurrent
15Payload
_NTLMPayloadField[]
- messageType = 2
- class scapy.layers.ntlm.NTLM_Client(self, debug: int = 0, store: int = 1, **kargs: Any)[源代码]
基类:
_NTLM_AutomatonA class to overload to create a client automaton when using NTLM.
- actions: Dict[str, List[_StateWrapper]] = {}
- bind(srv_atmt: NTLM_Server) None[源代码]
- breakpoints: Set[_StateWrapper]
- conditions: Dict[str, List[_StateWrapper]] = {}
- initial_states: List[_StateWrapper] = []
- interception_points: Set[_StateWrapper]
- ioevents: Dict[str, List[_StateWrapper]] = {}
- ionames: List[str] = []
- iosupersockets: List[SuperSocket] = []
- kwargs_cls = {}
- packets: PacketList
- port = 445
- recv_conditions: Dict[str, List[_StateWrapper]] = {}
- ssl = False
- states: Dict[str, _StateWrapper] = {}
- stop_states: List[_StateWrapper] = []
- threadid: int | None
- timeout: Dict[str, _TimerList] = {}
- class scapy.layers.ntlm.NTLM_Header(_pkt, /, *, Signature=b'NTLMSSP\x00', MessageType=3)[源代码]
基类:
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 | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MESSAGETYPE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NTLM_HeaderNTLM_Header fields Signature
b'NTLMSSP\x00'MessageType
3
- class scapy.layers.ntlm.NTLM_NEGOTIATE(_pkt, /, *, Signature=b'NTLMSSP\x00', MessageType=3, NegotiateFlags=<Flag 0 ()>, DomainNameLen=None, DomainNameMaxLen=None, DomainNameBufferOffset=None, WorkstationNameLen=None, WorkstationNameMaxLen=None, WorkstationNameBufferOffset=None, ProductMajorVersion=0, ProductMinorVersion=0, ProductBuild=0, res_ver=0, NTLMRevisionCurrent=15, Payload=[])[源代码]
基类:
_NTLMPayloadPacket- OFFSET = 40
- 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 | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MESSAGETYPE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NEGOTIATEFLAGS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DOMAINNAMELEN | DOMAINNAMEMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DOMAINNAMEBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | WORKSTATIONNAMELEN | WORKSTATIONNAMEMAXLEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | WORKSTATIONNAMEBUFFEROFFSET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |PRODUCTMAJORVER|PRODUCTMINORVER| PRODUCTBUILD | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RES VER | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |NTLMREVISIONCUR| PAYLOAD | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NTLM_NEGOTIATENTLM_NEGOTIATE fields Signature
b'NTLMSSP\x00'MessageType
3NegotiateFlags
<Flag 0 ()>DomainNameLen
NoneDomainNameMaxLen
NoneDomainNameBufferOffset
NoneWorkstationNameLen
NoneWorkstationNameMaxLen
NoneWorkstationNameBufferOffset
NoneProductMajorVersion
0ProductMinorVersion
0ProductBuild
0res_ver
0NTLMRevisionCurrent
15Payload
_NTLMPayloadField[]
- messageType = 1
- class scapy.layers.ntlm.NTLM_RESPONSE(_pkt, /, *, Response=b'')[源代码]
基类:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESPONSE | + + | | + + | | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NTLM_RESPONSENTLM_RESPONSE fields Response
b''
- class scapy.layers.ntlm.NTLM_Server(self, debug: int = 0, store: int = 1, **kargs: Any)[源代码]
基类:
_NTLM_AutomatonA class to overload to create a server automaton when using NTLM.
- 参数:
NTLM_VALUES -- a dict whose keys are - "NetbiosDomainName" - "NetbiosComputerName" - "DnsDomainName" - "DnsComputerName" - "DnsTreeName" - "Flags" - "Timestamp"
IDENTITIES -- a dict {"username": NTOWFv2("password", "username", "domain")} (this is the KeyResponseNT). Setting this value enables signature computation and authenticates inbound users.
DOMAIN_AUTH -- a tuple ("<DC IP>", "machineName", b"machinePassword") to use for domain authentication, used to establish the netlogon session. (UNIMPLEMENTED)
- actions: Dict[str, List[_StateWrapper]] = {}
- bind(cli_atmt: NTLM_Client) None[源代码]
- breakpoints: Set[_StateWrapper]
- conditions: Dict[str, List[_StateWrapper]] = {}
- initial_states: List[_StateWrapper] = []
- interception_points: Set[_StateWrapper]
- ioevents: Dict[str, List[_StateWrapper]] = {}
- ionames: List[str] = []
- iosupersockets: List[SuperSocket] = []
- packets: PacketList
- port = 445
- recv_conditions: Dict[str, List[_StateWrapper]] = {}
- states: Dict[str, _StateWrapper] = {}
- stop_states: List[_StateWrapper] = []
- threadid: int | None
- timeout: Dict[str, _TimerList] = {}
- class scapy.layers.ntlm.NTLMv2_CLIENT_CHALLENGE(_pkt, /, *, RespType=0, HiRespType=0, Reserved1=0, Reserved2=0, TimeStamp=None, ChallengeFromClient=b'12345678', Reserved3=0, AvPairs=[<AV_PAIR |>])[源代码]
基类:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESPTYPE | HIRESPTYPE | RESERVED1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESERVED2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TIMESTAMP | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CHALLENGEFROMCLIENT | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESERVED3 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AVPAIRS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NTLMv2_CLIENT_CHALLENGENTLMv2_CLIENT_CHALLENGE fields RespType
0HiRespType
0Reserved1
0Reserved2
0TimeStamp
NoneChallengeFromClient
b'12345678'Reserved3
0AvPairs
[<AV_PAIR |>]
- class scapy.layers.ntlm.NTLMv2_RESPONSE(_pkt, /, *, NTProofStr=b'', RespType=0, HiRespType=0, Reserved1=0, Reserved2=0, TimeStamp=None, ChallengeFromClient=b'12345678', Reserved3=0, AvPairs=[<AV_PAIR |>])[源代码]
基类:
Packet- aliastypes
- computeNTProofStr(ResponseKeyNT, ServerChallenge)[源代码]
- Set temp to ConcatenationOf(Responserversion, HiResponserversion,
Z(6), Time, ClientChallenge, Z(4), ServerName, Z(4))
- Set NTProofStr to HMAC_MD5(ResponseKeyNT,
ConcatenationOf(CHALLENGE_MESSAGE.ServerChallenge,temp))
Remember ServerName = AvPairs
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NTPROOFSTR | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESPTYPE | HIRESPTYPE | RESERVED1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESERVED2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TIMESTAMP | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CHALLENGEFROMCLIENT | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESERVED3 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AVPAIRS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NTLMv2_RESPONSENTLMv2_RESPONSE fields NTProofStr
b''RespType
0HiRespType
0Reserved1
0Reserved2
0TimeStamp
NoneChallengeFromClient
b'12345678'Reserved3
0AvPairs
[<AV_PAIR |>]
- scapy.layers.ntlm.RC4K(key, data)[源代码]
Indicates the encryption of data item D with the key K using the RC4 algorithm.
- class scapy.layers.ntlm.Single_Host_Data(_pkt, /, *, Size=0, Z4=0, CustomData=b'', MachineID=b'')[源代码]
基类:
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SIZE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Z4 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CUSTOMDATA | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MACHINEID | + + | | + + | | + + | | + + | | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. Single_Host_DataSingle_Host_Data fields Size
0Z4
0CustomData
b''MachineID
b''
- scapy.layers.ntlm.ntlm_relay(serverCls, remoteIP, remoteClientCls, DROP_MIC_v1=False, DROP_MIC_v2=False, DROP_EXTENDED_SECURITY=False, ALLOW_SMB2=None, server_kwargs=None, client_kwargs=None, iface=None, debug=2)[源代码]
NTLM Relay
This class aims at implementing a simple pass-the-hash attack across various protocols.
- Usage example:
- ntlm_relay(port=445,
remoteIP="192.168.122.65", remotePort=445, iface="eth0")
- 参数:
port -- the port to open the relay on
remoteIP -- the address IP of the server to connect to for auth
remotePort -- the proto to connect to the server into