Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QUIC: Extract more QUIC flow details #194

Merged
merged 23 commits into from
Apr 22, 2024
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
72fdac7
QUIC: Extract more QUIC flow details
jmuecke Oct 25, 2023
bd964ef
Fix IPFIX ID collision of QUIC_ZERO_RTT.
jmuecke Oct 31, 2023
d0bbe9f
VN: Add QUIC extension if FLOW_FLUSH. Version = VN is not an error.
jmuecke Oct 31, 2023
4ba9896
<README> Use correct type for CID fields.
jmuecke Oct 31, 2023
1c4f8b8
<quic> 0-RTT collect client CID. But no other CIDs or version.
jmuecke Nov 1, 2023
6825aa4
<quic> Add quic packet type information for each datagram.
jmuecke Nov 2, 2023
85e0975
Enforce CID lengths are within the defined spec. Parse packet type last.
jmuecke Nov 2, 2023
c2dfa2a
Export detected quic server port.
jmuecke Nov 2, 2023
1fab916
vn: Add server port before flushing flow
jmuecke Nov 2, 2023
f6ae322
quic versions: Support all versions triggering vns.
jmuecke Nov 2, 2023
fa271e9
Fix processing of version negotiation eliciting version.
jmuecke Nov 2, 2023
c77c89f
<quic> tested and improved quic module
jmuecke Nov 23, 2023
53ba8f7
<quic> Restrict TLS extraction to alpn and quic_transport parameters
jmuecke Jan 23, 2024
0ecfefb
<quic> Fix text output
jmuecke Jan 24, 2024
531c54a
QUIC - Fix required output IPFIX buffer size
hynekkar Feb 12, 2024
13c522a
QUIC - Fix payload len underflow, when smaller than expected
hynekkar Feb 12, 2024
131613c
QUIC - Avoid source buffer overflow in crypto frame copy
hynekkar Feb 12, 2024
f7b6f44
<quic> Return proper QUIC version.
jmuecke Feb 13, 2024
3cfa8a7
QUIC - Fix IPFIX IDs for basic list elements
hynekkar Feb 15, 2024
71683ab
<quic> Change payload_len only if previously modified.
jmuecke Feb 20, 2024
b3cdfb7
quic - fix code format
SiskaPavel Apr 3, 2024
8a1e370
<quic> Only act on first retry packet
jmuecke Apr 16, 2024
24234d1
test - update reference file of quic test
SiskaPavel Apr 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -613,10 +613,27 @@ List of fields exported together with basic flow fields on interface by WG plugi
### QUIC

List of fields exported together with basic flow fields on interface by quic plugin.

| Output field | Type | Description |
|:------------------:|:------:|:-------------------------------:|
| QUIC_SNI | string | Decrypted server name |
`-with-quic-ch-full-tls-ext` enables extraction of all TLS extensions in the Client Hello.

| 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 |

### ICMP

8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -159,6 +159,12 @@ if [[ -z "$WITH_QUIC_TRUE" ]]; then
AC_DEFINE([WITH_QUIC], [1], [Define to 1 if compile with quic plugin])
fi

AC_ARG_WITH([quic-ch-full-tls-ext],
AC_HELP_STRING([--with-quic-ch-full-tls-ext],[Extract all QUIC TLS payloads from the first client hello.]),
[
CPPFLAGS="$CPPFLAGS -DQUIC_CH_FULL_TLS_EXT"
]
)

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

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




AM_CONDITIONAL(MAKE_RPMS, test x$RPMBUILD != x)

AM_CONDITIONAL(MAKE_DEB, test x$DEBUILD != x)
31 changes: 30 additions & 1 deletion include/ipfixprobe/ipfix-elements.hpp
Original file line number Diff line number Diff line change
@@ -240,6 +240,21 @@ namespace ipxp {
#define QUIC_SNI(F) F(8057, 890, -1, nullptr)
#define QUIC_USER_AGENT(F) F(8057, 891, -1, nullptr)
#define QUIC_VERSION(F) F(8057, 892, 4, nullptr)
#define QUIC_CLIENT_VERSION(F) F(8057, 893, 4, nullptr)
#define QUIC_TOKEN_LENGTH(F) F(8057, 894, 8, nullptr)
#define QUIC_OCCID(F) F(8057, 895, -1, nullptr)
#define QUIC_OSCID(F) F(8057, 896, -1, nullptr)
#define QUIC_SCID(F) F(8057, 897, -1, nullptr)
#define QUIC_RETRY_SCID(F) F(8057, 898, -1, nullptr)
#define QUIC_MULTIPLEXED(F) F(8057, 899, 1, nullptr)
#define QUIC_ZERO_RTT(F) F(8057, 889, 1, nullptr)
#define QUIC_SERVER_PORT(F) F(8057, 887, 2, nullptr)
#define QUIC_PACKETS(F) F(0, 291, -1, nullptr) // BASIC LIST -- FIELD IS e8057id888 (uint16*)
#define QUIC_CH_PARSED(F) F(8057, 886, 1, nullptr)
#define QUIC_TLS_EXT_TYPE(F) F(0, 291, -1, nullptr) // BASIC LIST -- FIELD IS e8057id885 (uint16*)
#define QUIC_TLS_EXT_LEN(F) F(0, 291, -1, nullptr) // BASIC LIST -- FIELD IS e8057id884 (uint16*)
#define QUIC_TLS_EXT(F) F(8057, 883, -1, nullptr)


#define OSQUERY_PROGRAM_NAME(F) F(8057, 852, -1, nullptr)
#define OSQUERY_USERNAME(F) F(8057, 853, -1, nullptr)
@@ -494,7 +509,21 @@ namespace ipxp {
#define IPFIX_QUIC_TEMPLATE(F) \
F(QUIC_SNI) \
F(QUIC_USER_AGENT) \
F(QUIC_VERSION)
F(QUIC_VERSION) \
F(QUIC_CLIENT_VERSION) \
F(QUIC_TOKEN_LENGTH) \
F(QUIC_OCCID) \
F(QUIC_OSCID) \
F(QUIC_SCID) \
F(QUIC_RETRY_SCID) \
F(QUIC_MULTIPLEXED) \
F(QUIC_ZERO_RTT) \
F(QUIC_SERVER_PORT) \
F(QUIC_PACKETS) \
F(QUIC_CH_PARSED) \
F(QUIC_TLS_EXT_TYPE) \
F(QUIC_TLS_EXT_LEN) \
F(QUIC_TLS_EXT)

#define IPFIX_OSQUERY_TEMPLATE(F) \
F(OSQUERY_PROGRAM_NAME) \
Loading
Loading