scapy.layers.isakmp module

ISAKMP (Internet Security Association and Key Management Protocol).

class scapy.layers.isakmp.ISAKMP

Bases: scapy.layers.isakmp.ISAKMP_class

aliastypes = [<class 'scapy.layers.isakmp.ISAKMP'>, <class 'scapy.layers.isakmp.ISAKMP_class'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (ISAKMP).init_cookie>, <Field (ISAKMP).resp_cookie>, <Field (ISAKMP).next_payload>, <Field (ISAKMP).version>, <Field (ISAKMP).exch_type>, <Field (ISAKMP).flags>, <Field (ISAKMP).id>, <Field (ISAKMP).length>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
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

class scapy.layers.isakmp.ISAKMPTransformSetField(name, default, fld=None, length_from=None, max_length=None)

Bases: scapy.fields.StrLenField

i2m(pkt, i)

Convert internal value to machine value

islist = 1
m2i(pkt, m)

Convert machine value to internal value

static num2type(typ, enc)
static type2num(type_val_tuple)
class scapy.layers.isakmp.ISAKMP_class

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.layers.isakmp.ISAKMP_class'>, <class 'scapy.packet.Packet'>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
class scapy.layers.isakmp.ISAKMP_payload

Bases: scapy.layers.isakmp.ISAKMP_class

aliastypes = [<class 'scapy.layers.isakmp.ISAKMP_payload'>, <class 'scapy.layers.isakmp.ISAKMP_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).next_payload>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).res>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).length>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).load>]
class scapy.layers.isakmp.ISAKMP_payload_Hash

Bases: scapy.layers.isakmp.ISAKMP_payload

aliastypes = [<class 'scapy.layers.isakmp.ISAKMP_payload_Hash'>, <class 'scapy.layers.isakmp.ISAKMP_payload'>, <class 'scapy.layers.isakmp.ISAKMP_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).next_payload>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).res>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).length>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).load>]
class scapy.layers.isakmp.ISAKMP_payload_ID

Bases: scapy.layers.isakmp.ISAKMP_class

aliastypes = [<class 'scapy.layers.isakmp.ISAKMP_payload_ID'>, <class 'scapy.layers.isakmp.ISAKMP_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ISAKMP_payload_ID).next_payload>, <Field (ISAKMP_payload_ID).res>, <Field (ISAKMP_payload_ID).length>, <Field (ISAKMP_payload_ID).IDtype>, <Field (ISAKMP_payload_ID).ProtoID>, <Field (ISAKMP_payload_ID).Port>, <Field (ISAKMP_payload_ID).load>]
class scapy.layers.isakmp.ISAKMP_payload_KE

Bases: scapy.layers.isakmp.ISAKMP_payload

aliastypes = [<class 'scapy.layers.isakmp.ISAKMP_payload_KE'>, <class 'scapy.layers.isakmp.ISAKMP_payload'>, <class 'scapy.layers.isakmp.ISAKMP_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).next_payload>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).res>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).length>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).load>]
class scapy.layers.isakmp.ISAKMP_payload_Nonce

Bases: scapy.layers.isakmp.ISAKMP_payload

aliastypes = [<class 'scapy.layers.isakmp.ISAKMP_payload_Nonce'>, <class 'scapy.layers.isakmp.ISAKMP_payload'>, <class 'scapy.layers.isakmp.ISAKMP_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).next_payload>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).res>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).length>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).load>]
class scapy.layers.isakmp.ISAKMP_payload_Proposal

Bases: scapy.layers.isakmp.ISAKMP_class

aliastypes = [<class 'scapy.layers.isakmp.ISAKMP_payload_Proposal'>, <class 'scapy.layers.isakmp.ISAKMP_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ISAKMP_payload_Proposal).next_payload>, <Field (ISAKMP_payload_Proposal).res>, <Field (ISAKMP_payload_Proposal).length>, <Field (ISAKMP_payload_Proposal).proposal>, <Field (ISAKMP_payload_Proposal).proto>, <Field (ISAKMP_payload_Proposal).SPIsize>, <Field (ISAKMP_payload_Proposal).trans_nb>, <Field (ISAKMP_payload_Proposal).SPI>, <Field (ISAKMP_payload_Proposal).trans>]
class scapy.layers.isakmp.ISAKMP_payload_SA

Bases: scapy.layers.isakmp.ISAKMP_class

aliastypes = [<class 'scapy.layers.isakmp.ISAKMP_payload_SA'>, <class 'scapy.layers.isakmp.ISAKMP_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ISAKMP_payload_SA).next_payload>, <Field (ISAKMP_payload_SA).res>, <Field (ISAKMP_payload_SA).length>, <Field (ISAKMP_payload_SA).DOI>, <Field (ISAKMP_payload_SA).situation>, <Field (ISAKMP_payload_SA).prop>]
class scapy.layers.isakmp.ISAKMP_payload_Transform

Bases: scapy.layers.isakmp.ISAKMP_class

aliastypes = [<class 'scapy.layers.isakmp.ISAKMP_payload_Transform'>, <class 'scapy.layers.isakmp.ISAKMP_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ISAKMP_payload_Transform).next_payload>, <Field (ISAKMP_payload_Transform).res>, <Field (ISAKMP_payload_Transform).length>, <Field (ISAKMP_payload_Transform).num>, <Field (ISAKMP_payload_Transform).id>, <Field (ISAKMP_payload_Transform).res2>, <Field (ISAKMP_payload_Transform).transforms>]
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

class scapy.layers.isakmp.ISAKMP_payload_VendorID

Bases: scapy.layers.isakmp.ISAKMP_payload

aliastypes = [<class 'scapy.layers.isakmp.ISAKMP_payload_VendorID'>, <class 'scapy.layers.isakmp.ISAKMP_payload'>, <class 'scapy.layers.isakmp.ISAKMP_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).next_payload>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).res>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).length>, <Field (ISAKMP_payload,ISAKMP_payload_VendorID,ISAKMP_payload_Nonce,ISAKMP_payload_KE,ISAKMP_payload_Hash).load>]
scapy.layers.isakmp.ikescan(ip)

Sends/receives a ISAMPK payload SA with payload proposal