diff options
author | Gtker <wireshark@gtker.com> | 2021-05-08 15:48:13 +0200 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-05-11 20:08:32 +0000 |
commit | 1d998afb066478ca3c627d256524cf5c2db9527b (patch) | |
tree | ca3b7eecb97534c0edf742a4a9fc76fcfd7995f1 /epan/dissectors/packet-wow.c | |
parent | 84f785e5fc669f485f18c4f96c01b2b724f24e4c (diff) |
packet-wow: Add reconnection proof
Wiki reference:
https://wowdev.wiki/Packets/Login/Vanilla#Reconnection_proof_packets
C++ implementation:
Client:
https://github.com/EmberEmu/Ember/blob/development/src/login/grunt/client/ReconnectProof.h
Server:
https://github.com/EmberEmu/Ember/blob/development/src/login/grunt/server/ReconnectProof.h
Diffstat (limited to 'epan/dissectors/packet-wow.c')
-rw-r--r-- | epan/dissectors/packet-wow.c | 81 |
1 files changed, 62 insertions, 19 deletions
diff --git a/epan/dissectors/packet-wow.c b/epan/dissectors/packet-wow.c index b91194cead..82301fea5a 100644 --- a/epan/dissectors/packet-wow.c +++ b/epan/dissectors/packet-wow.c @@ -23,28 +23,30 @@ void proto_register_wow(void); void proto_reg_handoff_wow(void); typedef enum { - AUTH_LOGON_CHALLENGE = 0x00, - AUTH_LOGON_PROOF = 0x01, - AUTH_LOGON_RECONNECT = 0x02, - REALM_LIST = 0x10, - XFER_INITIATE = 0x30, - XFER_DATA = 0x31, - XFER_ACCEPT = 0x32, - XFER_RESUME = 0x33, - XFER_CANCEL = 0x34 + AUTH_LOGON_CHALLENGE = 0x00, + AUTH_LOGON_PROOF = 0x01, + AUTH_LOGON_RECONNECT = 0x02, + AUTH_LOGON_RECONNECT_PROOF = 0x03, + REALM_LIST = 0x10, + XFER_INITIATE = 0x30, + XFER_DATA = 0x31, + XFER_ACCEPT = 0x32, + XFER_RESUME = 0x33, + XFER_CANCEL = 0x34 } auth_cmd_e; static const value_string cmd_vs[] = { - { AUTH_LOGON_CHALLENGE, "Authentication Logon Challenge" }, - { AUTH_LOGON_PROOF, "Authentication Logon Proof" }, - { AUTH_LOGON_RECONNECT, "Authentication Reconnect Challenge" }, - { REALM_LIST, "Realm List" }, - { XFER_INITIATE, "Transfer Initiate" }, - { XFER_DATA, "Transfer Data" }, - { XFER_ACCEPT, "Transfer Accept" }, - { XFER_RESUME, "Transfer Resume" }, - { XFER_CANCEL, "Transfer Cancel" }, - { 0, NULL } + { AUTH_LOGON_CHALLENGE, "Authentication Logon Challenge" }, + { AUTH_LOGON_PROOF, "Authentication Logon Proof" }, + { AUTH_LOGON_RECONNECT, "Authentication Reconnect Challenge" }, + { AUTH_LOGON_RECONNECT_PROOF, "Authentication Reconnect Proof" }, + { REALM_LIST, "Realm List" }, + { XFER_INITIATE, "Transfer Initiate" }, + { XFER_DATA, "Transfer Data" }, + { XFER_ACCEPT, "Transfer Accept" }, + { XFER_RESUME, "Transfer Resume" }, + { XFER_CANCEL, "Transfer Cancel" }, + { 0, NULL } }; #if 0 @@ -119,6 +121,9 @@ static int hf_wow_srp_m2 = -1; static int hf_wow_challenge_data = -1; static int hf_wow_checksum_salt = -1; +static int hf_wow_client_proof = -1; +static int hf_wow_client_checksum = -1; + static int hf_wow_num_realms = -1; static int hf_wow_realm_type = -1; static int hf_wow_realm_status = -1; @@ -227,6 +232,34 @@ dissect_wow_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data switch(cmd) { + case AUTH_LOGON_RECONNECT_PROOF: + if (WOW_CLIENT_TO_SERVER) { + proto_tree_add_item(wow_tree, hf_wow_challenge_data, tvb, + offset, 16, ENC_LITTLE_ENDIAN); + offset += 16; + + proto_tree_add_item(wow_tree, hf_wow_client_proof, tvb, + offset, 20, ENC_LITTLE_ENDIAN); + offset += 20; + + proto_tree_add_item(wow_tree, hf_wow_client_checksum, tvb, + offset, 20, ENC_LITTLE_ENDIAN); + offset += 20; + + proto_tree_add_item(wow_tree, hf_wow_num_keys, + tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + } + else if (WOW_SERVER_TO_CLIENT) { + proto_tree_add_item(wow_tree, hf_wow_error, tvb, + offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + } + + break; + case AUTH_LOGON_RECONNECT: if (WOW_SERVER_TO_CLIENT) { proto_tree_add_item(wow_tree, hf_wow_error, tvb, @@ -683,6 +716,16 @@ proto_register_wow(void) FT_BYTES, BASE_NONE, 0, 0, "Unknown. Unused in 1.12", HFILL } }, + { &hf_wow_client_proof, + { "Reconnection Client Proof", "wow.reconnect_proof", + FT_BYTES, BASE_NONE, 0, 0, + "Client proof of knowing session key based on challenge data", HFILL } + }, + { &hf_wow_client_checksum, + { "Reconnection Checksum", "wow.reconnect_checksum", + FT_BYTES, BASE_NONE, 0, 0, + NULL, HFILL } + }, { &hf_wow_num_realms, { "Number of realms", "wow.num_realms", FT_UINT16, BASE_DEC, 0, 0, |