CESNET / ipfixprobe

IPFIX flow exporter with DPDK support capable of bi-directional flows, per-packet-information statistics, and extensibility via processing plugins (e.g., for application layer parsers).
https://cesnet.github.io/ipfixprobe/
BSD 3-Clause "New" or "Revised" License
41 stars 18 forks source link

QUIC: Extract more QUIC flow details #194

Closed jmuecke closed 7 months ago

jmuecke commented 1 year ago

We extend ipfixprobe's quic module by extracting the following additional QUIC meta information:

Output field Type Description
QUIC_SNI string Decrypted server name
QUIC_USER_AGENT string Decrypted user agent
QUIC_VERSION uint32 QUIC version from first server long header packets
QUIC_CLIENT_VERSION uint32 QUIC version from first client long header packet
QUIC_TOKEN_LENGTH uint64 Token length from Initial and Retry packets
QUIC_OCCID bytes Source Connection ID from first client packet
QUIC_OSCID bytes Destination Connection ID from first client packet
QUIC_SCID bytes Source Connection ID from first server packet
QUIC_RETRY_SCID bytes Source Connection ID from Retry packet
QUIC_MULTIPLEXED uint8 > 0 if multiplexed (at least two different QUIC_OSCIDs or SNIs)
QUIC_ZERO_RTT uint8 Number of 0-RTT packets in flow.
QUIC_SERVER_PORT uint16 TODO Server Port determined by packet type and TLS message
QUIC_PACKETS uint8* QUIC long header packet type (v1 encoded), version negotiation, QUIC bit
QUIC_CH_PARSED uint8 >0 if TLS Client Hello parsed without errors
QUIC_TLS_EXT_TYPE uint16* TLS extensions in the TLS Client Hello
QUIC_TLS_EXT_LEN uint16* Length of each TLS extension
QUIC_TLS_EXT string Payload of all/application_layer_protocol_negotiation and quic_transport params TLS extension

Additional improvements:

Limitations:

SiskaPavel commented 7 months ago

Hello, please apply changes from branch feature-quic-tud (commit c5297ff). After this the merge request will be ready for merge.

SiskaPavel commented 7 months ago

Modify this if statement:

process/quic.cpp: In member function ‘void ipxp::QUICPlugin::set_client_hello_fields(ipxp::QUICParser*, ipxp::Flow&, ipxp::RecordExtQUIC*, const ipxp::Packet&, bool)’:
process/quic.cpp:265:33: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
  265 |             || (!new_quic_flow) && (quic_data->retry_scid_length == dcid_len))
      |                ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jmuecke commented 7 months ago

I applied the commit and modified that condition to get rid of the compiler warning.

I also changed part or the retry code, to only act upon the first retry packet.