quiclog / pcap2qlog

A tool to convert .pcap and .pcapng files into qlog files
MIT License
26 stars 7 forks source link

can't not gen qlog file using different version 's tshark #10

Open chizi-chizi opened 2 years ago

chizi-chizi commented 2 years ago

use tshark version 3.3.0:

root@acda019edc38:/pcap2qlog# /usr/local/bin/tshark  -v
Running as user "root" and group "root". This could be dangerous.
TShark (Wireshark) 3.3.0 (Git commit c37f1e4de0c0)

Copyright 1998-2020 Gerald Combs <gerald@wireshark.org> and contributors.
License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) without libpcap, with GLib 2.56.4, with zlib 1.2.11, without
SMI, with c-ares 1.14.0, without Lua, without GnuTLS, with Gcrypt 1.8.1, without
Kerberos, without MaxMind DB resolver, without nghttp2, without brotli, without
LZ4, without Zstandard, without Snappy, without libxml2.

Running on Linux 4.15.0-143-generic, with Intel(R) Xeon(R) CPU E5-2678 v3 @
2.50GHz (with SSE4.2), with 7975 MB of physical memory, with locale C, with
Gcrypt 1.8.1, with zlib 1.2.11, binary plugins supported (0 loaded).

Built using gcc 7.5.0.

root@acda019edc38:/pcap2qlog# PCAPDEBUG=true node out/main.js --input=`pwd`/pcap/quic.pcap --secrets=`pwd`/pcap/sslkey.keys  --output=`pwd`/pcap --tshark=/usr/local/bin/tshark
Found packets:  18
Of which QUIC:  18
Split over traces:  0
/pcap2qlog/pcap/cache/0a4e0eb71ecb3b6d0a24a8d795e010d8e572a40b.qlog

use tshark version 3.4.0:

root@acda019edc38:/pcap2qlog# /usr/local/bin/tshark  -v
Running as user "root" and group "root". This could be dangerous.
TShark (Wireshark) 3.4.0 (Git commit 9733f173ea5e)

Copyright 1998-2020 Gerald Combs <gerald@wireshark.org> and contributors.
License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) without libpcap, with GLib 2.56.4, with zlib 1.2.11, without
SMI, with c-ares 1.14.0, without Lua, without GnuTLS, with Gcrypt 1.8.1, without
Kerberos, without MaxMind DB resolver, without nghttp2, without brotli, without
LZ4, without Zstandard, without Snappy, without libxml2.

Running on Linux 4.15.0-143-generic, with Intel(R) Xeon(R) CPU E5-2678 v3 @
2.50GHz (with SSE4.2), with 7975 MB of physical memory, with locale C, with
Gcrypt 1.8.1, with zlib 1.2.11, binary plugins supported (0 loaded).

Built using gcc 7.5.0.
root@acda019edc38:/pcap2qlog# PCAPDEBUG=true node out/main.js --input=`pwd`/pcap/quic.pcap --secrets=`pwd`/pcap/sslkey.keys  --output=`pwd`/pcap --tshark=/usr/local/bin/tshark

```Found packets:  18
Of which QUIC:  18
Split over traces:  0
/pcap2qlog/pcap/cache/0a4e0eb71ecb3b6d0a24a8d795e010d8e572a40b.qlog

use tshark version 3.5.0:

root@acda019edc38:/pcap2qlog# /usr/local/bin/tshark -v
Running as user "root" and group "root". This could be dangerous.
TShark (Wireshark) 3.5.0 (Git commit e7296d5208ad)

Copyright 1998-2021 Gerald Combs <gerald@wireshark.org> and contributors.
License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) using GCC 7.5.0, with libpcap, without POSIX capabilities,
without libnl, with GLib 2.56.4, with zlib 1.2.11, without Lua, without GnuTLS,
with Gcrypt 1.8.1, without Kerberos, without MaxMind DB resolver, without
nghttp2, without brotli, without LZ4, without Zstandard, without Snappy, without
libxml2, without SMI.

Running on Linux 4.15.0-143-generic, with Intel(R) Xeon(R) CPU E5-2678 v3 @
2.50GHz (with SSE4.2), with 7975 MB of physical memory, with GLib 2.56.4, with
zlib 1.2.11, with libpcap 1.8.1, with c-ares 1.14.0, with Gcrypt 1.8.1, with
locale C, binary plugins supported (0 loaded).

root@acda019edc38:/pcap2qlog# PCAPDEBUG=true node out/main.js --input=`pwd`/pcap/quic.pcap --secrets=`pwd`/pcap/sslkey.keys  --output=`pwd`/pcap --tshark=/usr/local/bin/tshark
Processing rawEntry  0
ParserPCAP: adding new trace: ODCID  74b6d281d3d2bb441af9ae594fe96685  from client scid 3b568b2effdc2dab00e9d8014626a6230904eec1
convertPacketHeader: unknown QUIC packet type found!  [ { '_ws.expert':
     { 'quic.coalesced_padding_data': '',
       '_ws.expert.message': '(Random) padding data appended to the datagram',
       '_ws.expert.severity': '4194304',
       '_ws.expert.group': '150994944' } } ]
ParserPCAP: Error occured Error: convertPacketHeader: unknown QUIC packet type found!  : [object Object]
    at ParserPCAP.exit (/pcap2qlog/out/parsers/ParserPCAP.js:296:15)
    at ParserPCAP.convertPacketHeader (/pcap2qlog/out/parsers/ParserPCAP.js:494:22)
    at ParserPCAP.parse (/pcap2qlog/out/parsers/ParserPCAP.js:91:41)
    at Function.Parse (/pcap2qlog/out/parsers/ParserPCAP.js:51:31)
    at Function.TransformToQLog (/pcap2qlog/out/flow/jsontoqlog.js:44:44)
    at <anonymous>
/pcap2qlog/pcap/cache/0a4e0eb71ecb3b6d0a24a8d795e010d8e572a40b.qlog

use tshark version 3.6.0:

Running as user "root" and group "root". This could be dangerous.
TShark (Wireshark) 3.6.0 (Git commit 3a34e44d02c9)

Copyright 1998-2021 Gerald Combs <gerald@wireshark.org> and contributors.
License GPLv2+: GNU GPL version 2 or later <https://www.gnu.org/licenses/gpl-2.0.html>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) using GCC 7.5.0, with libpcap, without POSIX capabilities,
without libnl, with GLib 2.56.4, with zlib 1.2.11, without Lua, without GnuTLS,
with Gcrypt 1.8.1, without Kerberos, without MaxMind DB resolver, without
nghttp2, without brotli, without LZ4, without Zstandard, without Snappy, without
libxml2, without libsmi.

Running on Linux 4.15.0-143-generic, with Intel(R) Xeon(R) CPU E5-2678 v3 @
2.50GHz (with SSE4.2), with 7975 MB of physical memory, with GLib 2.56.4, with
zlib 1.2.11, with libpcap 1.8.1, with c-ares 1.14.0, with Gcrypt 1.8.1, with
LC_TYPE=C, binary plugins supported (0 loaded).

root@acda019edc38:/pcap2qlog# PCAPDEBUG=true node out/main.js --input=`pwd`/pcap/quic.pcap --secrets=`pwd`/pcap/sslkey.keys  --output=`pwd`/pcap --tshark=/usr/local/bin/tshark
Processing rawEntry  0
ParserPCAP: no tls info known for the first QUIC initial, not supported! Are you sure the trace decrypted? [ { 'QUIC Connection information': { 'quic.connection.number': '0' },
    'quic.packet_length': '334',
    'quic.header_form': '1',
    'quic.fixed_bit': '1',
    'quic.long.packet_type': '0',
    'quic.long.reserved': '0',
    'quic.packet_number_length': '0',
    'quic.version': '0x00000001',
    'quic.dcil': '16',
    'quic.dcid': '74:b6:d2:81:d3:d2:bb:44:1a:f9:ae:59:4f:e9:66:85',
    'quic.scil': '20',
    'quic.scid': '3b:56:8b:2e:ff:dc:2d:ab:00:e9:d8:01:46:26:a6:23:09:04:ee:c1',
    'quic.token_length': '0',
    'quic.length': '288',
    'quic.packet_number': '0',
    'quic.payload': '31:87:9f:d8:50:00:e4:3c:da:7b:6e:af:16:f2:ba:b6:c6:85:e0:70:58:4e:9c:57:31:1b:4b:fe:cc:01:11:be:cf:ce:02:bf:cf:af:35:d9:97:94:84:10:d6:93:ec:49:ee:23:2b:a2:c6:20:85:77:c1:93:c9:20:0f:61:2f:5c:46:97:5f:36:b7:50:81:5e:4d:1e:ba:43:11:8b:ae:ba:96:66:69:cc:dd:a8:85:26:c4:01:82:35:90:dd:d6:b3:62:d3:48:a1:c0:10:1f:ed:18:65:16:4e:f1:07:21:5e:1b:ed:bb:21:49:4f:80:57:aa:4a:a4:f9:a9:a8:d3:d3:90:b4:f3:0a:dd:bc:94:ee:d0:80:1e:0f:7c:bc:a4:95:a2:8b:d8:1f:72:07:af:df:29:5b:40:7a:07:ec:4a:f3:ef:15:37:2a:7f:9e:8c:cf:bd:ba:70:f3:99:ab:22:ce:20:25:48:4a:fd:d6:ad:a7:53:39:0a:5b:8c:9d:2e:2d:7d:90:6e:f1:8c:85:0a:18:cc:c7:ce:8f:57:8d:48:8b:36:6b:6e:eb:83:d8:e3:83:9d:8e:3d:cf:5d:78:9e:13:82:d4:80:37:0d:3d:43:80:17:c0:cd:29:39:a6:2f:bc:7f:a6:f5:79:27:26:54:05:fb:5f:14:8a:c0:da:98:53:c0:9b:70:f4:23:2a:c5:e3:d3:aa:92:d4:7f:ee:f9:7d:2b:0e:26:77:01:53:3c:09:03:c3:9d:92:37:d0:0b',
    'quic.frame':
     { 'quic.frame_type': '6',
       'quic.crypto.offset': '0',
       'quic.crypto.length': '267',
       'quic.crypto.crypto_data': '',
       tls: [Object] } },
  { 'quic.frame_type': '6',
    'quic.crypto.offset': '0',
    'quic.crypto.length': '267',
    'quic.crypto.crypto_data': '',
    tls: { 'tls.handshake': [Object] } } ]
ParserPCAP: Error occured Error: ParserPCAP: no tls info known for the first QUIC initial, not supported! Are you sure the trace decrypted? : [object Object], {"quic.frame_type":"6","quic.crypto.offset":"0","quic.crypto.length":"267","quic.crypto.crypto_data":"","tls":{"tls.handshake":{"tls.handshake.type":"1","tls.handshake.length":"263","tls.handshake.version":"0x0303","tls.handshake.random":"78:4d:b7:c3:93:a1:7f:87:b8:5c:73:cf:f6:86:71:8e:22:77:e8:03:f7:11:bd:f8:e5:7e:39:66:d7:29:71:07","tls.handshake.session_id_length":"0","tls.handshake.cipher_suites_length":"6","tls.handshake.ciphersuites":{"tls.handshake.ciphersuite":["0x1301","0x1302","0x1303"]},"tls.handshake.comp_methods_length":"1","tls.handshake.comp_methods":{"tls.handshake.comp_method":"0"},"tls.handshake.extensions_length":"216","Extension: server_name (len=14)":{"tls.handshake.extension.type":"0","tls.handshake.extension.len":"14","Server Name Indication extension":{"tls.handshake.extensions_server_name_list_len":"12","tls.handshake.extensions_server_name_type":"0","tls.handshake.extensions_server_name_len":"9","tls.handshake.extensions_server_name":"127.0.0.1"}},"Extension: supported_groups (len=8)":{"tls.handshake.extension.type":"10","tls.handshake.extension.len":"8","tls.handshake.extensions_supported_groups_length":"6","tls.handshake.extensions_supported_groups":{"tls.handshake.extensions_supported_group":["0x001d","0x0017","0x0018"]}},"Extension: application_layer_protocol_negotiation (len=23)":{"tls.handshake.extension.type":"16","tls.handshake.extension.len":"23","tls.handshake.extensions_alpn_len":"21","tls.handshake.extensions_alpn_list":{"tls.handshake.extensions_alpn_str_len":["2","5","5","5"],"tls.handshake.extensions_alpn_str":["h3","h3-29","h3-28","h3-27"]}},"Extension: signature_algorithms (len=20)":{"tls.handshake.extension.type":"13","tls.handshake.extension.len":"20","tls.handshake.sig_hash_alg_len":"18","tls.handshake.sig_hash_algs":{"tls.handshake.sig_hash_alg":["0x0403","0x0804","0x0401","0x0503","0x0805","0x0501","0x0806","0x0601","0x0201"],"tls.handshake.sig_hash_alg_tree":[{"tls.handshake.sig_hash_hash":"4","tls.handshake.sig_hash_sig":"3"},{"tls.handshake.sig_hash_hash":"8","tls.handshake.sig_hash_sig":"4"},{"tls.handshake.sig_hash_hash":"4","tls.handshake.sig_hash_sig":"1"},{"tls.handshake.sig_hash_hash":"5","tls.handshake.sig_hash_sig":"3"},{"tls.handshake.sig_hash_hash":"8","tls.handshake.sig_hash_sig":"5"},{"tls.handshake.sig_hash_hash":"5","tls.handshake.sig_hash_sig":"1"},{"tls.handshake.sig_hash_hash":"8","tls.handshake.sig_hash_sig":"6"},{"tls.handshake.sig_hash_hash":"6","tls.handshake.sig_hash_sig":"1"},{"tls.handshake.sig_hash_hash":"2","tls.handshake.sig_hash_sig":"1"}]}},"Extension: key_share (len=38)":{"tls.handshake.extension.type":"51","tls.handshake.extension.len":"38","Key Share extension":{"tls.handshake.extensions_key_share_client_length":"36","Key Share Entry: Group: x25519, Key Exchange length: 32":{"tls.handshake.extensions_key_share_group":"29","tls.handshake.extensions_key_share_key_exchange_length":"32","tls.handshake.extensions_key_share_key_exchange":"be:59:c8:e0:87:45:b9:75:46:5b:e3:03:04:af:4a:35:7f:e9:ac:c6:28:77:be:cf:8f:0d:4e:a0:db:77:2d:5f"}}},"Extension: psk_key_exchange_modes (len=2)":{"tls.handshake.extension.type":"45","tls.handshake.extension.len":"2","tls.extension.psk_ke_modes_length":"1","tls.extension.psk_ke_mode":"1"},"Extension: supported_versions (len=3)":{"tls.handshake.extension.type":"43","tls.handshake.extension.len":"3","tls.handshake.extensions.supported_versions_len":"2","tls.handshake.extensions.supported_version":"0x0304"},"Extension: quic_transport_parameters (len=76)":{"tls.handshake.extension.type":"57","tls.handshake.extension.len":"76","Parameter: max_idle_timeout (len=4) 60000 ms":{"tls.quic.parameter.type":"1","tls.quic.parameter.length":"4","tls.quic.parameter.value":"80:00:ea:60","tls.quic.parameter.max_idle_timeout":"60000"},"Parameter: max_udp_payload_size (len=4) 65527":{"tls.quic.parameter.type":"3","tls.quic.parameter.length":"4","tls.quic.parameter.value":"80:00:ff:f7","tls.quic.parameter.max_udp_payload_size":"65527"},"Parameter: initial_max_data (len=4) 1048576":{"tls.quic.parameter.type":"4","tls.quic.parameter.length":"4","tls.quic.parameter.value":"80:10:00:00","tls.quic.parameter.initial_max_data":"1048576"},"Parameter: initial_max_stream_data_bidi_local (len=4) 1048576":{"tls.quic.parameter.type":"5","tls.quic.parameter.length":"4","tls.quic.parameter.value":"80:10:00:00","tls.quic.parameter.initial_max_stream_data_bidi_local":"1048576"},"Parameter: initial_max_stream_data_bidi_remote (len=4) 1048576":{"tls.quic.parameter.type":"6","tls.quic.parameter.length":"4","tls.quic.parameter.value":"80:10:00:00","tls.quic.parameter.initial_max_stream_data_bidi_remote":"1048576"},"Parameter: initial_max_stream_data_uni (len=4) 1048576":{"tls.quic.parameter.type":"7","tls.quic.parameter.length":"4","tls.quic.parameter.value":"80:10:00:00","tls.quic.parameter.initial_max_stream_data_uni":"1048576"},"Parameter: initial_max_streams_bidi (len=4) 262144":{"tls.quic.parameter.type":"8","tls.quic.parameter.length":"4","tls.quic.parameter.value":"80:04:00:00","tls.quic.parameter.initial_max_streams_bidi":"262144"},"Parameter: initial_max_streams_uni (len=4) 262144":{"tls.quic.parameter.type":"9","tls.quic.parameter.length":"4","tls.quic.parameter.value":"80:04:00:00","tls.quic.parameter.initial_max_streams_uni":"262144"},"Parameter: ack_delay_exponent (len=1)":{"tls.quic.parameter.type":"10","tls.quic.parameter.length":"1","tls.quic.parameter.value":"03","tls.quic.parameter.ack_delay_exponent":"3"},"Parameter: GREASE (len=1) 25":{"tls.quic.parameter.type":"11","tls.quic.parameter.length":"1","tls.quic.parameter.value":"19","tls.quic.parameter.max_ack_delay":"25"},"Parameter: initial_source_connection_id (len=20)":{"tls.quic.parameter.type":"15","tls.quic.parameter.length":"20","tls.quic.parameter.value":"3b:56:8b:2e:ff:dc:2d:ab:00:e9:d8:01:46:26:a6:23:09:04:ee:c1","tls.quic.parameter.initial_source_connection_id":"3b:56:8b:2e:ff:dc:2d:ab:00:e9:d8:01:46:26:a6:23:09:04:ee:c1"}},"tls.handshake.ja3_full":"771,4865-4866-4867,0-10-16-13-51-45-43-57,29-23-24,","tls.handshake.ja3":"f75253b5e2b4dcb3fdae9b78ce8c6e49"}}}
    at ParserPCAP.exit (/pcap2qlog/out/parsers/ParserPCAP.js:296:15)
    at ParserPCAP.parse (/pcap2qlog/out/parsers/ParserPCAP.js:120:34)
    at Function.Parse (/pcap2qlog/out/parsers/ParserPCAP.js:51:31)
    at Function.TransformToQLog (/pcap2qlog/out/flow/jsontoqlog.js:44:44)
    at <anonymous>

quic.pcap.zip this attachment contains quic.pcap and sslkey.keys