scapy.contrib.wireguard¶
WireGuard Module Implements the WireGuard network tunnel protocol. Based on the whitepaper: https://www.wireguard.com/papers/wireguard.pdf
-
class
scapy.contrib.wireguard.Wireguard(*args, **kargs)¶ Bases:
scapy.packet.PacketWrapper that only contains the message type.
-
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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MESSAGE TYPE | RESERVED ZERO | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+ Fig. WireguardWireguard fields¶ message_type
1reserved_zero
0
-
payload_guess¶ Possible sublayers:
WireguardCookieReply,WireguardInitiation,WireguardResponse,WireguardTransport
-
-
class
scapy.contrib.wireguard.WireguardCookieReply(*args, **kargs)¶ Bases:
scapy.packet.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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RECEIVER INDEX | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NONCE | ENCRYPTED COOKIE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. WireguardCookieReplyWireguardCookieReply fields¶ receiver_index
0nonce
0encrypted_cookie
0
-
-
class
scapy.contrib.wireguard.WireguardInitiation(*args, **kargs)¶ Bases:
scapy.packet.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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SENDER INDEX | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | UNENCRYPTED EPHEMERAL | ENCRYPTED STATIC | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ENCRYPTED TIMESTAMP | MAC1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MAC2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. WireguardInitiationWireguardInitiation fields¶ sender_index
0unencrypted_ephemeral
0encrypted_static
0encrypted_timestamp
0mac1
0mac2
0
-
-
class
scapy.contrib.wireguard.WireguardResponse(*args, **kargs)¶ Bases:
scapy.packet.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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SENDER INDEX | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RECEIVER INDEX | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | UNENCRYPTED EPHEMERAL | ENCRYPTED NOTHING | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MAC1 | MAC2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. WireguardResponseWireguardResponse fields¶ sender_index
0receiver_index
0unencrypted_ephemeral
0encrypted_nothing
0mac1
0mac2
0
-
-
class
scapy.contrib.wireguard.WireguardTransport(*args, **kargs)¶ Bases:
scapy.packet.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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RECEIVER INDEX | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | COUNTER | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ENCRYPTED ENCAPSULATED PACKET | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. WireguardTransportWireguardTransport fields¶ receiver_index
0counter
0encrypted_encapsulated_packet
None
-