scapy.layers.eap

Extensible Authentication Protocol (EAP)

class scapy.layers.eap.EAP

Bases: scapy.packet.Packet

RFC 3748 - Extensible Authentication Protocol (EAP)

FAILURE = 4
FINISH = 6
INITIATE = 5
REQUEST = 1
RESPONSE = 2
SUCCESS = 3
aliastypes
answers(other)
classmethod dispatch_hook(_pkt=None, *args, **kargs)
fields_desc
EAP fields

code

ByteEnumField

4

id

ByteField

0

len

ShortField

None

type

ByteEnumField (Cond)

0

desired_auth_types

FieldListField (Cond)

[]

identity

StrLenField (Cond)

b''

message

StrLenField (Cond)

b''

getlayer(cls, nb=1, _track=None, _subclass=True, **flt)
guess_payload_class(_)
haslayer(cls)
mysummary()
post_build(p, pay)
classmethod register_variant()
registered_methods = {0: <class 'scapy.layers.eap.EAP'>, 4: <class 'scapy.layers.eap.EAP_MD5'>, 13: <class 'scapy.layers.eap.EAP_TLS'>, 17: <class 'scapy.layers.eap.LEAP'>, 21: <class 'scapy.layers.eap.EAP_TTLS'>, 25: <class 'scapy.layers.eap.EAP_PEAP'>, 43: <class 'scapy.layers.eap.EAP_FAST'>}
class scapy.layers.eap.EAPOL

Bases: scapy.packet.Packet

EAPOL - IEEE Std 802.1X-2010

ASF = 4
EAP_PACKET = 0
KEY = 3
LOGOFF = 2
START = 1
aliastypes
answers(other)
extract_padding(s)
fields_desc
EAPOL fields

version

ByteEnumField

1

type

ByteEnumField

0

len

LenField

None

hashret()
mysummary()
payload_guess

Possible sublayers: WPA_key, EAP, MKAPDU

class scapy.layers.eap.EAP_FAST

Bases: scapy.layers.eap.EAP

RFC 4851 - “The Flexible Authentication via Secure Tunneling Extensible Authentication Protocol Method (EAP-FAST)”

aliastypes
fields_desc
EAP_FAST fields

code

ByteEnumField

1

id

ByteField

0

len

FieldLenField

None

type

ByteEnumField

43

L

BitField (1 bit)

0

M

BitField (1 bit)

0

S

BitField (1 bit)

0

reserved

BitField (2 bits)

0

version

BitField (3 bits)

0

message_len

IntField (Cond)

0

data

XStrLenField

b''

class scapy.layers.eap.EAP_MD5

Bases: scapy.layers.eap.EAP

RFC 3748 - “Extensible Authentication Protocol (EAP)”

aliastypes
fields_desc
EAP_MD5 fields

code

ByteEnumField

1

id

ByteField

0

len

FieldLenField

None

type

ByteEnumField

4

value_size

FieldLenField

None

value

XStrLenField

b''

optional_name

XStrLenField

b''

class scapy.layers.eap.EAP_PEAP

Bases: scapy.layers.eap.EAP

draft-josefsson-pppext-eap-tls-eap-05.txt - “Protected EAP Protocol (PEAP)”

aliastypes
fields_desc
EAP_PEAP fields

code

ByteEnumField

1

id

ByteField

0

len

FieldLenField

None

type

ByteEnumField

25

L

BitField (1 bit)

0

M

BitField (1 bit)

0

S

BitField (1 bit)

0

reserved

BitField (3 bits)

0

version

BitField (2 bits)

1

tls_message_len

IntField (Cond)

0

tls_data

XStrLenField

b''

class scapy.layers.eap.EAP_TLS

Bases: scapy.layers.eap.EAP

RFC 5216 - “The EAP-TLS Authentication Protocol”

aliastypes
fields_desc
EAP_TLS fields

code

ByteEnumField

1

id

ByteField

0

len

FieldLenField

None

type

ByteEnumField

13

L

BitField (1 bit)

0

M

BitField (1 bit)

0

S

BitField (1 bit)

0

reserved

BitField (5 bits)

0

tls_message_len

IntField (Cond)

0

tls_data

XStrLenField

b''

class scapy.layers.eap.EAP_TTLS

Bases: scapy.layers.eap.EAP

RFC 5281 - “Extensible Authentication Protocol Tunneled Transport Layer Security Authenticated Protocol Version 0 (EAP-TTLSv0)”

aliastypes
fields_desc
EAP_TTLS fields

code

ByteEnumField

1

id

ByteField

0

len

FieldLenField

None

type

ByteEnumField

21

L

BitField (1 bit)

0

M

BitField (1 bit)

0

S

BitField (1 bit)

0

reserved

BitField (2 bits)

0

version

BitField (3 bits)

0

message_len

IntField (Cond)

0

data

XStrLenField

b''

class scapy.layers.eap.LEAP

Bases: scapy.layers.eap.EAP

Cisco LEAP (Lightweight EAP) https://freeradius.org/rfc/leap.txt

aliastypes
fields_desc
LEAP fields

code

ByteEnumField

1

id

ByteField

0

len

ShortField

None

type

ByteEnumField

17

version

ByteField

1

unused

XByteField

0

count

FieldLenField

None

challenge_response

XStrLenField

b''

username

StrLenField

b''

class scapy.layers.eap.MACsecSCI

Bases: scapy.packet.Packet

Secure Channel Identifier.

aliastypes
extract_padding(s)
fields_desc
MACsecSCI fields

system_identifier

SourceMACField

None

port_identifier

ShortField

0

class scapy.layers.eap.MKABasicParamSet

Bases: scapy.packet.Packet

Basic Parameter Set (802.1X-2010, section 11.11).

aliastypes
extract_padding(s)
fields_desc
MKABasicParamSet fields

mka_version_id

ByteField

0

key_server_priority

ByteField

0

key_server

BitField (1 bit)

0

macsec_desired

BitField (1 bit)

0

macsec_capability

BitField (2 bits)

0

param_set_body_len

BitField (12 bits)

0

SCI

PacketField

<MACsecSCI  |>

actor_member_id

XStrFixedLenField

b''

actor_message_number

XIntField

0

algorithm_agility

XIntField

0

cak_name

PadField

b''

class scapy.layers.eap.MKADistributedCAKParamSet

Bases: scapy.layers.eap.MKAParamSet

Distributed CAK Parameter Set (802.1X-2010, section 11.11).

aliastypes
fields_desc
MKADistributedCAKParamSet fields

param_set_type

PadField

5

param_set_body_len

ShortField

0

cak_aes_key_wrap

XStrFixedLenField

b''

cak_key_name

XStrField

b''

class scapy.layers.eap.MKADistributedSAKParamSet

Bases: scapy.layers.eap.MKAParamSet

Distributed SAK parameter set (802.1X-2010, section 11.11).

aliastypes
fields_desc
MKADistributedSAKParamSet fields

param_set_type

ByteEnumField

4

distributed_an

BitField (2 bits)

0

confidentiality_offset

BitField (2 bits)

0

unused

BitField (4 bits)

0

param_set_body_len

ShortField

0

key_number

XStrFixedLenField

b''

macsec_cipher_suite

XStrFixedLenField (Cond)

b''

sak_aes_key_wrap

XStrFixedLenField

b''

class scapy.layers.eap.MKAICVSet

Bases: scapy.layers.eap.MKAParamSet

ICV (802.1X-2010, section 11.11).

aliastypes
fields_desc
MKAICVSet fields

param_set_type

PadField

255

param_set_body_len

ShortField

0

icv

XStrFixedLenField

b''

class scapy.layers.eap.MKALivePeerListParamSet

Bases: scapy.layers.eap.MKAParamSet

Live Peer List parameter sets (802.1X-2010, section 11.11).

aliastypes
fields_desc
MKALivePeerListParamSet fields

param_set_type

PadField

1

param_set_body_len

ShortField

0

member_id_message_num

PacketListField

[]

class scapy.layers.eap.MKAPDU

Bases: scapy.packet.Packet

MACsec Key Agreement Protocol Data Unit.

aliastypes
extract_padding(s)
fields_desc
MKAPDU fields

basic_param_set

PacketField

b''

parameter_sets

MKAParamSetPacketListField

[]

class scapy.layers.eap.MKAParamSet

Bases: scapy.packet.Packet

Class from which every parameter set class inherits (except MKABasicParamSet, which has no “Parameter set type” field, and must come first in the list of parameter sets).

EAPOL_MKA_DEFAULT_KEY_WRAP_LEN = 24
MACSEC_DEFAULT_ICV_LEN = 16
aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)

Returns the right parameter set class.

class scapy.layers.eap.MKAParamSetPacketListField(name, default, cls=None, count_from=None, length_from=None, next_cls_cb=None)

Bases: scapy.fields.PacketListField

PacketListField that handles the parameter sets.

PARAM_SET_LEN_MASK = 4095
getfield(pkt, s)
m2i(pkt, m)
class scapy.layers.eap.MKAPeerListTuple

Bases: scapy.packet.Packet

Live / Potential Peer List parameter sets tuples (802.1X-2010, section 11.11). # noqa: E501

aliastypes
fields_desc
MKAPeerListTuple fields

member_id

XStrFixedLenField

b''

message_number

XStrFixedLenField

b''

class scapy.layers.eap.MKAPotentialPeerListParamSet

Bases: scapy.layers.eap.MKAParamSet

Potential Peer List parameter sets (802.1X-2010, section 11.11).

aliastypes
fields_desc
MKAPotentialPeerListParamSet fields

param_set_type

PadField

2

param_set_body_len

ShortField

0

member_id_message_num

PacketListField

[]

class scapy.layers.eap.MKASAKUseParamSet

Bases: scapy.layers.eap.MKAParamSet

SAK Use Parameter Set (802.1X-2010, section 11.11).

aliastypes
fields_desc
MKASAKUseParamSet fields

param_set_type

ByteEnumField

3

latest_key_an

BitField (2 bits)

0

latest_key_tx

BitField (1 bit)

0

latest_key_rx

BitField (1 bit)

0

old_key_an

BitField (2 bits)

0

old_key_tx

BitField (1 bit)

0

old_key_rx

BitField (1 bit)

0

plain_tx

BitField (1 bit)

0

plain_rx

BitField (1 bit)

0

X

BitField (1 bit)

0

delay_protect

BitField (1 bit)

0

param_set_body_len

BitField (12 bits)

0

latest_key_key_server_member_id

XStrFixedLenField

b''

latest_key_key_number

XStrFixedLenField

b''

latest_key_lowest_acceptable_pn

XStrFixedLenField

b''

old_key_key_server_member_id

XStrFixedLenField

b''

old_key_key_number

XStrFixedLenField

b''

old_key_lowest_acceptable_pn

XStrFixedLenField

b''