Skip to content

Commit d2b7d7d

Browse files
authored
Merge pull request #194 from netd-tud/feature-quic-tud
QUIC: Extract more QUIC flow details
2 parents 4e5681b + 24234d1 commit d2b7d7d

File tree

8 files changed

+1653
-266
lines changed

8 files changed

+1653
-266
lines changed

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,10 +613,27 @@ List of fields exported together with basic flow fields on interface by WG plugi
613613
### QUIC
614614

615615
List of fields exported together with basic flow fields on interface by quic plugin.
616-
617-
| Output field | Type | Description |
618-
|:------------------:|:------:|:-------------------------------:|
619-
| QUIC_SNI | string | Decrypted server name |
616+
`-with-quic-ch-full-tls-ext` enables extraction of all TLS extensions in the Client Hello.
617+
618+
| Output field | Type | Description |
619+
|:-------------------:|:--------:|:---------------------------------------------------------------------------------------------:|
620+
| QUIC_SNI | string | Decrypted server name |
621+
| QUIC_USER_AGENT | string | Decrypted user agent |
622+
| QUIC_VERSION | uint32 | QUIC version from first server long header packets |
623+
| QUIC_CLIENT_VERSION | uint32 | QUIC version from first client long header packet |
624+
| QUIC_TOKEN_LENGTH | uint64 | Token length from Initial and Retry packets |
625+
| QUIC_OCCID | bytes | Source Connection ID from first client packet |
626+
| QUIC_OSCID | bytes | Destination Connection ID from first client packet |
627+
| QUIC_SCID | bytes | Source Connection ID from first server packet |
628+
| QUIC_RETRY_SCID | bytes | Source Connection ID from Retry packet |
629+
| QUIC_MULTIPLEXED | uint8 | > 0 if multiplexed (at least two different QUIC_OSCIDs or SNIs) |
630+
| QUIC_ZERO_RTT | uint8 | Number of 0-RTT packets in flow. |
631+
| QUIC_SERVER_PORT | uint16 | TODO Server Port determined by packet type and TLS message |
632+
| QUIC_PACKETS | uint8\* | QUIC long header packet type (v1 encoded), version negotiation, QUIC bit |
633+
| QUIC_CH_PARSED | uint8 | >0 if TLS Client Hello parsed without errors |
634+
| QUIC_TLS_EXT_TYPE | uint16\* | TLS extensions in the TLS Client Hello |
635+
| QUIC_TLS_EXT_LEN | uint16\* | Length of each TLS extension |
636+
| QUIC_TLS_EXT | string | Payload of all/application_layer_protocol_negotiation and quic_transport params TLS extension |
620637

621638
### ICMP
622639

configure.ac

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ if [[ -z "$WITH_QUIC_TRUE" ]]; then
159159
AC_DEFINE([WITH_QUIC], [1], [Define to 1 if compile with quic plugin])
160160
fi
161161

162+
AC_ARG_WITH([quic-ch-full-tls-ext],
163+
AC_HELP_STRING([--with-quic-ch-full-tls-ext],[Extract all QUIC TLS payloads from the first client hello.]),
164+
[
165+
CPPFLAGS="$CPPFLAGS -DQUIC_CH_FULL_TLS_EXT"
166+
]
167+
)
162168

163169
AM_CONDITIONAL(OS_CYGWIN, test x${host_os} = xcygwin)
164170

@@ -402,6 +408,8 @@ AC_ARG_WITH([msects],
402408
)
403409

404410

411+
412+
405413
AM_CONDITIONAL(MAKE_RPMS, test x$RPMBUILD != x)
406414

407415
AM_CONDITIONAL(MAKE_DEB, test x$DEBUILD != x)

include/ipfixprobe/ipfix-elements.hpp

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,21 @@ namespace ipxp {
240240
#define QUIC_SNI(F) F(8057, 890, -1, nullptr)
241241
#define QUIC_USER_AGENT(F) F(8057, 891, -1, nullptr)
242242
#define QUIC_VERSION(F) F(8057, 892, 4, nullptr)
243+
#define QUIC_CLIENT_VERSION(F) F(8057, 893, 4, nullptr)
244+
#define QUIC_TOKEN_LENGTH(F) F(8057, 894, 8, nullptr)
245+
#define QUIC_OCCID(F) F(8057, 895, -1, nullptr)
246+
#define QUIC_OSCID(F) F(8057, 896, -1, nullptr)
247+
#define QUIC_SCID(F) F(8057, 897, -1, nullptr)
248+
#define QUIC_RETRY_SCID(F) F(8057, 898, -1, nullptr)
249+
#define QUIC_MULTIPLEXED(F) F(8057, 899, 1, nullptr)
250+
#define QUIC_ZERO_RTT(F) F(8057, 889, 1, nullptr)
251+
#define QUIC_SERVER_PORT(F) F(8057, 887, 2, nullptr)
252+
#define QUIC_PACKETS(F) F(0, 291, -1, nullptr) // BASIC LIST -- FIELD IS e8057id888 (uint16*)
253+
#define QUIC_CH_PARSED(F) F(8057, 886, 1, nullptr)
254+
#define QUIC_TLS_EXT_TYPE(F) F(0, 291, -1, nullptr) // BASIC LIST -- FIELD IS e8057id885 (uint16*)
255+
#define QUIC_TLS_EXT_LEN(F) F(0, 291, -1, nullptr) // BASIC LIST -- FIELD IS e8057id884 (uint16*)
256+
#define QUIC_TLS_EXT(F) F(8057, 883, -1, nullptr)
257+
243258

244259
#define OSQUERY_PROGRAM_NAME(F) F(8057, 852, -1, nullptr)
245260
#define OSQUERY_USERNAME(F) F(8057, 853, -1, nullptr)
@@ -496,7 +511,21 @@ namespace ipxp {
496511
#define IPFIX_QUIC_TEMPLATE(F) \
497512
F(QUIC_SNI) \
498513
F(QUIC_USER_AGENT) \
499-
F(QUIC_VERSION)
514+
F(QUIC_VERSION) \
515+
F(QUIC_CLIENT_VERSION) \
516+
F(QUIC_TOKEN_LENGTH) \
517+
F(QUIC_OCCID) \
518+
F(QUIC_OSCID) \
519+
F(QUIC_SCID) \
520+
F(QUIC_RETRY_SCID) \
521+
F(QUIC_MULTIPLEXED) \
522+
F(QUIC_ZERO_RTT) \
523+
F(QUIC_SERVER_PORT) \
524+
F(QUIC_PACKETS) \
525+
F(QUIC_CH_PARSED) \
526+
F(QUIC_TLS_EXT_TYPE) \
527+
F(QUIC_TLS_EXT_LEN) \
528+
F(QUIC_TLS_EXT)
500529

501530
#define IPFIX_OSQUERY_TEMPLATE(F) \
502531
F(OSQUERY_PROGRAM_NAME) \

0 commit comments

Comments
 (0)