From 0a007c624eb73a1349b2ec4599e2827a92929751 Mon Sep 17 00:00:00 2001 From: lwthiker Date: Sun, 3 Jul 2022 10:40:18 +0300 Subject: [PATCH] Split signatures YAML database to multiple files For easier maintenance, split the YAML files with the browser signatures to multiple files, each per browser. --- tests/signatures.yaml | 1211 --------------------------------- tests/signatures/README.md | 10 + tests/signatures/chrome.yaml | 481 +++++++++++++ tests/signatures/edge.yaml | 289 ++++++++ tests/signatures/firefox.yaml | 353 ++++++++++ tests/signatures/safari.yaml | 84 +++ tests/test_impersonate.py | 18 +- 7 files changed, 1228 insertions(+), 1218 deletions(-) delete mode 100644 tests/signatures.yaml create mode 100644 tests/signatures/README.md create mode 100644 tests/signatures/chrome.yaml create mode 100644 tests/signatures/edge.yaml create mode 100644 tests/signatures/firefox.yaml create mode 100644 tests/signatures/safari.yaml diff --git a/tests/signatures.yaml b/tests/signatures.yaml deleted file mode 100644 index a2aa4d4..0000000 --- a/tests/signatures.yaml +++ /dev/null @@ -1,1211 +0,0 @@ -# Browser signatures database -# -# Each signature refers to the browser's behavior upon browsing to a site -# not cached or visited before. -# Each signature contains: -# * The parameters in the TLS client hello message. -# * The HTTP/2 HEADERS frame sent by the browser. -# * (planned) The HTTP/2 SETTINGS frame sent by the browser. ---- -name: chrome_98.0.4758.102_win10 -browser: - name: chrome - version: 98.0.4758.102 - os: win10 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 'GREASE', - 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, - 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, - 0x0035 - ] - comp_methods: [0x00] - extensions: - - type: GREASE - length: 0 - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 10 - supported_groups: [ - 'GREASE', - 0x001d, 0x0017, 0x0018 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: session_ticket - length: 0 - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: signature_algorithms - length: 18 - sig_hash_algs: [ - 0x0403, 0x0804, 0x0401, 0x0503, - 0x0805, 0x0501, 0x0806, 0x0601 - ] - - type: signed_certificate_timestamp - length: 0 - - type: keyshare - length: 43 - key_shares: - - group: GREASE - length: 1 - - group: 29 - length: 32 - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: supported_versions - length: 7 - supported_versions: [ - 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' - ] - - type: compress_certificate - length: 3 - algorithms: [0x02] - - type: application_settings - length: 5 - alps_alpn_list: ['h2'] - - type: GREASE - length: 1 - data: !!binary AA== - - type: padding - http2: - pseudo_headers: - - ':method' - - ':authority' - - ':scheme' - - ':path' - headers: - - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="98", "Google Chrome";v="98"' - - 'sec-ch-ua-mobile: ?0' - - 'sec-ch-ua-platform: "Windows"' - - 'upgrade-insecure-requests: 1' - - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36' - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' - - 'sec-fetch-site: none' - - 'sec-fetch-mode: navigate' - - 'sec-fetch-user: ?1' - - 'sec-fetch-dest: document' - - 'accept-encoding: gzip, deflate, br' - - 'accept-language: en-US,en;q=0.9' ---- -name: chrome_99.0.4844.51_win10 -browser: - name: chrome - version: 99.0.4844.51 - os: win10 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 'GREASE', - 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, - 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, - 0x0035 - ] - comp_methods: [0x00] - extensions: - - type: GREASE - length: 0 - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 10 - supported_groups: [ - 'GREASE', - 0x001d, 0x0017, 0x0018 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: session_ticket - length: 0 - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: signature_algorithms - length: 18 - sig_hash_algs: [ - 0x0403, 0x0804, 0x0401, 0x0503, - 0x0805, 0x0501, 0x0806, 0x0601 - ] - - type: signed_certificate_timestamp - length: 0 - - type: keyshare - length: 43 - key_shares: - - group: GREASE - length: 1 - - group: 29 - length: 32 - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: supported_versions - length: 7 - supported_versions: [ - 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' - ] - - type: compress_certificate - length: 3 - algorithms: [0x02] - - type: application_settings - length: 5 - alps_alpn_list: ['h2'] - - type: GREASE - length: 1 - data: !!binary AA== - - type: padding - http2: - pseudo_headers: - - ':method' - - ':authority' - - ':scheme' - - ':path' - headers: - - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="99", "Google Chrome";v="99"' - - 'sec-ch-ua-mobile: ?0' - - 'sec-ch-ua-platform: "Windows"' - - 'upgrade-insecure-requests: 1' - - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36' - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' - - 'sec-fetch-site: none' - - 'sec-fetch-mode: navigate' - - 'sec-fetch-user: ?1' - - 'sec-fetch-dest: document' - - 'accept-encoding: gzip, deflate, br' - - 'accept-language: en-US,en;q=0.9' ---- -name: chrome_100.0.4896.127_win10 -browser: - name: chrome - version: 100.0.4896.127 - os: win10 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 'GREASE', - 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, - 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, - 0x0035 - ] - comp_methods: [0x00] - extensions: - - type: GREASE - length: 0 - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 10 - supported_groups: [ - 'GREASE', - 0x001d, 0x0017, 0x0018 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: session_ticket - length: 0 - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: signature_algorithms - length: 18 - sig_hash_algs: [ - 0x0403, 0x0804, 0x0401, 0x0503, - 0x0805, 0x0501, 0x0806, 0x0601 - ] - - type: signed_certificate_timestamp - length: 0 - - type: keyshare - length: 43 - key_shares: - - group: GREASE - length: 1 - - group: 29 - length: 32 - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: supported_versions - length: 7 - supported_versions: [ - 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' - ] - - type: compress_certificate - length: 3 - algorithms: [0x02] - - type: application_settings - length: 5 - alps_alpn_list: ['h2'] - - type: GREASE - length: 1 - data: !!binary AA== - - type: padding - http2: - pseudo_headers: - - ':method' - - ':authority' - - ':scheme' - - ':path' - headers: - - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100"' - - 'sec-ch-ua-mobile: ?0' - - 'sec-ch-ua-platform: "Windows"' - - 'upgrade-insecure-requests: 1' - - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36' - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' - - 'sec-fetch-site: none' - - 'sec-fetch-mode: navigate' - - 'sec-fetch-user: ?1' - - 'sec-fetch-dest: document' - - 'accept-encoding: gzip, deflate, br' - - 'accept-language: en-US,en;q=0.9' ---- -name: chrome_101.0.4951.67_win10 -browser: - name: chrome - version: 101.0.4951.67 - os: win10 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 'GREASE', - 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, - 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, - 0x0035 - ] - comp_methods: [0x00] - extensions: - - type: GREASE - length: 0 - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 10 - supported_groups: [ - 'GREASE', - 0x001d, 0x0017, 0x0018 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: session_ticket - length: 0 - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: signature_algorithms - length: 18 - sig_hash_algs: [ - 0x0403, 0x0804, 0x0401, 0x0503, - 0x0805, 0x0501, 0x0806, 0x0601 - ] - - type: signed_certificate_timestamp - length: 0 - - type: keyshare - length: 43 - key_shares: - - group: GREASE - length: 1 - - group: 29 - length: 32 - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: supported_versions - length: 7 - supported_versions: [ - 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' - ] - - type: compress_certificate - length: 3 - algorithms: [0x02] - - type: application_settings - length: 5 - alps_alpn_list: ['h2'] - - type: GREASE - length: 1 - data: !!binary AA== - - type: padding - http2: - pseudo_headers: - - ':method' - - ':authority' - - ':scheme' - - ':path' - headers: - - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="101", "Google Chrome";v="101"' - - 'sec-ch-ua-mobile: ?0' - - 'sec-ch-ua-platform: "Windows"' - - 'upgrade-insecure-requests: 1' - - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36' - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' - - 'sec-fetch-site: none' - - 'sec-fetch-mode: navigate' - - 'sec-fetch-user: ?1' - - 'sec-fetch-dest: document' - - 'accept-encoding: gzip, deflate, br' - - 'accept-language: en-US,en;q=0.9' ---- -name: chrome_99.0.4844.73_android12-pixel6 -browser: - name: chrome - version: 99.0.4844.73 - os: android12 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 'GREASE', - 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, - 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, - 0x0035 - ] - comp_methods: [0x00] - extensions: - - type: GREASE - length: 0 - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 10 - supported_groups: [ - 'GREASE', - 0x001d, 0x0017, 0x0018 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: session_ticket - length: 0 - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: signature_algorithms - length: 18 - sig_hash_algs: [ - 0x0403, 0x0804, 0x0401, 0x0503, - 0x0805, 0x0501, 0x0806, 0x0601 - ] - - type: signed_certificate_timestamp - length: 0 - - type: keyshare - length: 43 - key_shares: - - group: GREASE - length: 1 - - group: 29 - length: 32 - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: supported_versions - length: 7 - supported_versions: [ - 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' - ] - - type: compress_certificate - length: 3 - algorithms: [0x02] - - type: application_settings - length: 5 - alps_alpn_list: ['h2'] - - type: GREASE - length: 1 - data: !!binary AA== - - type: padding - http2: - pseudo_headers: - - ':method' - - ':authority' - - ':scheme' - - ':path' - headers: - - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="99", "Google Chrome";v="99"' - - 'sec-ch-ua-mobile: ?1' - - 'sec-ch-ua-platform: "Android"' - - 'upgrade-insecure-requests: 1' - - "user-agent: Mozilla/5.0 (Linux; Android 12; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.58 Mobile Safari/537.36" - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' - - 'sec-fetch-site: none' - - 'sec-fetch-mode: navigate' - - 'sec-fetch-user: ?1' - - 'sec-fetch-dest: document' - - 'accept-encoding: gzip, deflate, br' - - 'accept-language: en-US,en;q=0.9' ---- -name: edge_98.0.1108.62_win10 -browser: - name: edge - version: 98.0.1108.62 - os: win10 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 'GREASE', - 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, - 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, - 0x0035 - ] - comp_methods: [0x00] - extensions: - - type: GREASE - length: 0 - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 10 - supported_groups: [ - 'GREASE', - 0x001d, 0x0017, 0x0018 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: session_ticket - length: 0 - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: signature_algorithms - length: 18 - sig_hash_algs: [ - 0x0403, 0x0804, 0x0401, 0x0503, - 0x0805, 0x0501, 0x0806, 0x0601 - ] - - type: signed_certificate_timestamp - length: 0 - - type: keyshare - length: 43 - key_shares: - - group: GREASE - length: 1 - - group: 29 - length: 32 - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: supported_versions - length: 7 - supported_versions: [ - 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' - ] - - type: compress_certificate - length: 3 - algorithms: [0x02] - - type: application_settings - length: 5 - alps_alpn_list: ['h2'] - - type: GREASE - length: 1 - data: !!binary AA== - - type: padding - http2: - pseudo_headers: - - ':method' - - ':authority' - - ':scheme' - - ':path' - headers: - - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="98", "Microsoft Edge";v="98"' - - 'sec-ch-ua-mobile: ?0' - - 'sec-ch-ua-platform: "Windows"' - - 'upgrade-insecure-requests: 1' - - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 Edg/98.0.1108.62' - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' - - 'sec-fetch-site: none' - - 'sec-fetch-mode: navigate' - - 'sec-fetch-user: ?1' - - 'sec-fetch-dest: document' - - 'accept-encoding: gzip, deflate, br' - - 'accept-language: en-US,en;q=0.9' ---- -name: edge_99.0.1150.30_win10 -browser: - name: edge - version: 99.0.1150.30 - os: win10 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 'GREASE', - 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, - 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, - 0x0035 - ] - comp_methods: [0x00] - extensions: - - type: GREASE - length: 0 - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 10 - supported_groups: [ - 'GREASE', - 0x001d, 0x0017, 0x0018 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: session_ticket - length: 0 - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: signature_algorithms - length: 18 - sig_hash_algs: [ - 0x0403, 0x0804, 0x0401, 0x0503, - 0x0805, 0x0501, 0x0806, 0x0601 - ] - - type: signed_certificate_timestamp - length: 0 - - type: keyshare - length: 43 - key_shares: - - group: GREASE - length: 1 - - group: 29 - length: 32 - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: supported_versions - length: 7 - supported_versions: [ - 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' - ] - - type: compress_certificate - length: 3 - algorithms: [0x02] - - type: application_settings - length: 5 - alps_alpn_list: ['h2'] - - type: GREASE - length: 1 - data: !!binary AA== - - type: padding - http2: - pseudo_headers: - - ':method' - - ':authority' - - ':scheme' - - ':path' - headers: - - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="99", "Microsoft Edge";v="99"' - - 'sec-ch-ua-mobile: ?0' - - 'sec-ch-ua-platform: "Windows"' - - 'upgrade-insecure-requests: 1' - - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36 Edg/99.0.1150.30' - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' - - 'sec-fetch-site: none' - - 'sec-fetch-mode: navigate' - - 'sec-fetch-user: ?1' - - 'sec-fetch-dest: document' - - 'accept-encoding: gzip, deflate, br' - - 'accept-language: en-US,en;q=0.9' ---- -name: edge_101.0.1210.47_win10 -browser: - name: edge - version: 101.0.1210.47 - os: win10 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 'GREASE', - 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, - 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, - 0x0035 - ] - comp_methods: [0x00] - extensions: - - type: GREASE - length: 0 - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 10 - supported_groups: [ - 'GREASE', - 0x001d, 0x0017, 0x0018 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: session_ticket - length: 0 - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: signature_algorithms - length: 18 - sig_hash_algs: [ - 0x0403, 0x0804, 0x0401, 0x0503, - 0x0805, 0x0501, 0x0806, 0x0601 - ] - - type: signed_certificate_timestamp - length: 0 - - type: keyshare - length: 43 - key_shares: - - group: GREASE - length: 1 - - group: 29 - length: 32 - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: supported_versions - length: 7 - supported_versions: [ - 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' - ] - - type: compress_certificate - length: 3 - algorithms: [0x02] - - type: application_settings - length: 5 - alps_alpn_list: ['h2'] - - type: GREASE - length: 1 - data: !!binary AA== - - type: padding - http2: - pseudo_headers: - - ':method' - - ':authority' - - ':scheme' - - ':path' - headers: - - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101"' - - 'sec-ch-ua-mobile: ?0' - - 'sec-ch-ua-platform: "Windows"' - - 'upgrade-insecure-requests: 1' - - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.47' - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' - - 'sec-fetch-site: none' - - 'sec-fetch-mode: navigate' - - 'sec-fetch-user: ?1' - - 'sec-fetch-dest: document' - - 'accept-encoding: gzip, deflate, br' - - 'accept-language: en-US,en;q=0.9' ---- -name: firefox_91.6.0esr_win10 -browser: - name: firefox - version: 91.6.0esr - os: win10 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 0x1301, 0x1303, 0x1302, 0xc02b, 0xc02f, 0xcca9, 0xcca8, 0xc02c, - 0xc030, 0xc00a, 0xc009, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, - 0x0035, 0x000a - ] - comp_methods: [0x00] - extensions: - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 14 - supported_groups: [ - 0x1d, 0x017, 0x18, 0x19, 0x0100, 0x0101 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: session_ticket - length: 0 - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: delegated_credentials - length: 10 - sig_hash_algs: [ - 0x0403, 0x0503, 0x0603, 0x0203 - ] - - type: keyshare - length: 107 - key_shares: - - group: 29 - length: 32 - - group: 23 - length: 65 - - type: supported_versions - length: 5 - supported_versions: [ - 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' - ] - - type: signature_algorithms - length: 24 - sig_hash_algs: [ - 0x0403, 0x0503, 0x0603, 0x0804, - 0x0805, 0x0806, 0x0401, 0x0501, - 0x0601, 0x0203, 0x0201 - ] - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: record_size_limit - length: 2 - record_size_limit: 16385 - - type: padding - http2: - pseudo_headers: - - ':method' - - ':path' - - ':authority' - - ':scheme' - headers: - - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0' - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' - - 'accept-language: en-US,en;q=0.5' - - 'accept-encoding: gzip, deflate, br' - - 'upgrade-insecure-requests: 1' - - 'sec-fetch-dest: document' - - 'sec-fetch-mode: navigate' - - 'sec-fetch-site: none' - - 'sec-fetch-user: ?1' - - 'te: trailers' ---- -name: firefox_95.0.2_win10 -browser: - name: firefox - version: 95.0.2 - os: win10 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 0x1301, 0x1303, 0x1302, 0xc02b, 0xc02f, 0xcca9, 0xcca8, 0xc02c, - 0xc030, 0xc00a, 0xc009, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, - 0x0035 - ] - comp_methods: [0x00] - extensions: - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 14 - supported_groups: [ - 0x1d, 0x017, 0x18, 0x19, 0x0100, 0x0101 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: session_ticket - length: 0 - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: delegated_credentials - length: 10 - sig_hash_algs: [ - 0x0403, 0x0503, 0x0603, 0x0203 - ] - - type: keyshare - length: 107 - key_shares: - - group: 29 - length: 32 - - group: 23 - length: 65 - - type: supported_versions - length: 5 - supported_versions: [ - 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' - ] - - type: signature_algorithms - length: 24 - sig_hash_algs: [ - 0x0403, 0x0503, 0x0603, 0x0804, - 0x0805, 0x0806, 0x0401, 0x0501, - 0x0601, 0x0203, 0x0201 - ] - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: record_size_limit - length: 2 - record_size_limit: 16385 - - type: padding - http2: - pseudo_headers: - - ':method' - - ':path' - - ':authority' - - ':scheme' - headers: - - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0' - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' - - 'accept-language: en-US,en;q=0.5' - - 'accept-encoding: gzip, deflate, br' - - 'upgrade-insecure-requests: 1' - - 'sec-fetch-dest: document' - - 'sec-fetch-mode: navigate' - - 'sec-fetch-site: none' - - 'sec-fetch-user: ?1' - - 'te: trailers' ---- -name: firefox_98.0_win10 -browser: - name: firefox - version: 98.0 - os: win10 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 0x1301, 0x1303, 0x1302, 0xc02b, 0xc02f, 0xcca9, 0xcca8, 0xc02c, - 0xc030, 0xc00a, 0xc009, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, - 0x0035 - ] - comp_methods: [0x00] - extensions: - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 14 - supported_groups: [ - 0x1d, 0x017, 0x18, 0x19, 0x0100, 0x0101 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: session_ticket - length: 0 - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: delegated_credentials - length: 10 - sig_hash_algs: [ - 0x0403, 0x0503, 0x0603, 0x0203 - ] - - type: keyshare - length: 107 - key_shares: - - group: 29 - length: 32 - - group: 23 - length: 65 - - type: supported_versions - length: 5 - supported_versions: [ - 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' - ] - - type: signature_algorithms - length: 24 - sig_hash_algs: [ - 0x0403, 0x0503, 0x0603, 0x0804, - 0x0805, 0x0806, 0x0401, 0x0501, - 0x0601, 0x0203, 0x0201 - ] - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: record_size_limit - length: 2 - record_size_limit: 16385 - - type: padding - http2: - pseudo_headers: - - ':method' - - ':path' - - ':authority' - - ':scheme' - headers: - - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0' - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' - - 'accept-language: en-US,en;q=0.5' - - 'accept-encoding: gzip, deflate, br' - - 'upgrade-insecure-requests: 1' - - 'sec-fetch-dest: document' - - 'sec-fetch-mode: navigate' - - 'sec-fetch-site: none' - - 'sec-fetch-user: ?1' - - 'te: trailers' ---- -name: firefox_100.0_win10 -browser: - name: firefox - version: 100.0 - os: win10 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 0x1301, 0x1303, 0x1302, 0xc02b, 0xc02f, 0xcca9, 0xcca8, 0xc02c, - 0xc030, 0xc00a, 0xc009, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, - 0x0035 - ] - comp_methods: [0x00] - extensions: - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 14 - supported_groups: [ - 0x1d, 0x017, 0x18, 0x19, 0x0100, 0x0101 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: session_ticket - length: 0 - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: delegated_credentials - length: 10 - sig_hash_algs: [ - 0x0403, 0x0503, 0x0603, 0x0203 - ] - - type: keyshare - length: 107 - key_shares: - - group: 29 - length: 32 - - group: 23 - length: 65 - - type: supported_versions - length: 5 - supported_versions: [ - 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' - ] - - type: signature_algorithms - length: 24 - sig_hash_algs: [ - 0x0403, 0x0503, 0x0603, 0x0804, - 0x0805, 0x0806, 0x0401, 0x0501, - 0x0601, 0x0203, 0x0201 - ] - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: record_size_limit - length: 2 - record_size_limit: 16385 - - type: padding - http2: - pseudo_headers: - - ':method' - - ':path' - - ':authority' - - ':scheme' - headers: - - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0' - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' - - 'accept-language: en-US,en;q=0.5' - - 'accept-encoding: gzip, deflate, br' - - 'upgrade-insecure-requests: 1' - - 'sec-fetch-dest: document' - - 'sec-fetch-mode: navigate' - - 'sec-fetch-site: none' - - 'sec-fetch-user: ?1' - - 'te: trailers' ---- -name: safari_15.3_macos11.6.4 -browser: - name: safari - version: 15.3 - os: macos11.6.4 - mode: regular -signature: - tls_client_hello: - record_version: 'TLS_VERSION_1_0' - handshake_version: 'TLS_VERSION_1_2' - session_id_length: 32 - ciphersuites: [ - 'GREASE', - 0x1301, 0x1302, 0x1303, 0xc02c, 0xc02b, 0xcca9, 0xc030, 0xc02f, - 0xcca8, 0xc024, 0xc023, 0xc00a, 0xc009, 0xc028, 0xc027, 0xc014, - 0xc013, 0x009d, 0x009c, 0x003d, 0x003c, 0x0035, 0x002f, 0xc008, - 0xc012, 0x000a - ] - comp_methods: [0x00] - extensions: - - type: GREASE - length: 0 - - type: server_name - - type: extended_master_secret - length: 0 - - type: renegotiation_info - length: 1 - - type: supported_groups - length: 12 - supported_groups: [ - 'GREASE', - 0x001d, 0x0017, 0x0018, 0x0019 - ] - - type: ec_point_formats - length: 2 - ec_point_formats: [0] - - type: application_layer_protocol_negotiation - length: 14 - alpn_list: ['h2', 'http/1.1'] - - type: status_request - length: 5 - status_request_type: 0x01 - - type: signature_algorithms - length: 24 - sig_hash_algs: [ - 0x0403, 0x0804, 0x0401, 0x0503, 0x0203, 0x0805, 0x0805, - 0x0501, 0x0806, 0x0601, 0x0201 - ] - - type: signed_certificate_timestamp - length: 0 - - type: keyshare - length: 43 - key_shares: - - group: 'GREASE' - length: 1 - - group: 29 - length: 32 - - type: psk_key_exchange_modes - length: 2 - psk_ke_mode: 1 - - type: supported_versions - length: 11 - supported_versions: [ - 'GREASE', - 'TLS_VERSION_1_3', 'TLS_VERSION_1_2', - 'TLS_VERSION_1_1', 'TLS_VERSION_1_0' - ] - - type: GREASE - length: 1 - data: !!binary AA== - - type: padding - http2: - pseudo_headers: - - ':method' - - ':scheme' - - ':path' - - ':authority' - headers: - - 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15' - - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' - - 'accept-language: en-us' - - 'accept-encoding: gzip, deflate, br' diff --git a/tests/signatures/README.md b/tests/signatures/README.md new file mode 100644 index 0000000..dd6d353 --- /dev/null +++ b/tests/signatures/README.md @@ -0,0 +1,10 @@ +## Browser signatures database + +Each .yaml contains the signatures of a different browser. + +Each signature refers to the browser's behavior upon browsing to a site +not cached or visited before. +Each signature contains: +* The parameters in the TLS client hello message. +* The HTTP/2 HEADERS frame sent by the browser. +* (planned) The HTTP/2 SETTINGS frame sent by the browser. diff --git a/tests/signatures/chrome.yaml b/tests/signatures/chrome.yaml new file mode 100644 index 0000000..e1496af --- /dev/null +++ b/tests/signatures/chrome.yaml @@ -0,0 +1,481 @@ +# Chrome browser signatures +--- +name: chrome_98.0.4758.102_win10 +browser: + name: chrome + version: 98.0.4758.102 + os: win10 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 'GREASE', + 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, + 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, + 0x0035 + ] + comp_methods: [0x00] + extensions: + - type: GREASE + length: 0 + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 10 + supported_groups: [ + 'GREASE', + 0x001d, 0x0017, 0x0018 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: session_ticket + length: 0 + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: signature_algorithms + length: 18 + sig_hash_algs: [ + 0x0403, 0x0804, 0x0401, 0x0503, + 0x0805, 0x0501, 0x0806, 0x0601 + ] + - type: signed_certificate_timestamp + length: 0 + - type: keyshare + length: 43 + key_shares: + - group: GREASE + length: 1 + - group: 29 + length: 32 + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: supported_versions + length: 7 + supported_versions: [ + 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' + ] + - type: compress_certificate + length: 3 + algorithms: [0x02] + - type: application_settings + length: 5 + alps_alpn_list: ['h2'] + - type: GREASE + length: 1 + data: !!binary AA== + - type: padding + http2: + pseudo_headers: + - ':method' + - ':authority' + - ':scheme' + - ':path' + headers: + - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="98", "Google Chrome";v="98"' + - 'sec-ch-ua-mobile: ?0' + - 'sec-ch-ua-platform: "Windows"' + - 'upgrade-insecure-requests: 1' + - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36' + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' + - 'sec-fetch-site: none' + - 'sec-fetch-mode: navigate' + - 'sec-fetch-user: ?1' + - 'sec-fetch-dest: document' + - 'accept-encoding: gzip, deflate, br' + - 'accept-language: en-US,en;q=0.9' +--- +name: chrome_99.0.4844.51_win10 +browser: + name: chrome + version: 99.0.4844.51 + os: win10 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 'GREASE', + 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, + 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, + 0x0035 + ] + comp_methods: [0x00] + extensions: + - type: GREASE + length: 0 + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 10 + supported_groups: [ + 'GREASE', + 0x001d, 0x0017, 0x0018 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: session_ticket + length: 0 + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: signature_algorithms + length: 18 + sig_hash_algs: [ + 0x0403, 0x0804, 0x0401, 0x0503, + 0x0805, 0x0501, 0x0806, 0x0601 + ] + - type: signed_certificate_timestamp + length: 0 + - type: keyshare + length: 43 + key_shares: + - group: GREASE + length: 1 + - group: 29 + length: 32 + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: supported_versions + length: 7 + supported_versions: [ + 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' + ] + - type: compress_certificate + length: 3 + algorithms: [0x02] + - type: application_settings + length: 5 + alps_alpn_list: ['h2'] + - type: GREASE + length: 1 + data: !!binary AA== + - type: padding + http2: + pseudo_headers: + - ':method' + - ':authority' + - ':scheme' + - ':path' + headers: + - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="99", "Google Chrome";v="99"' + - 'sec-ch-ua-mobile: ?0' + - 'sec-ch-ua-platform: "Windows"' + - 'upgrade-insecure-requests: 1' + - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36' + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' + - 'sec-fetch-site: none' + - 'sec-fetch-mode: navigate' + - 'sec-fetch-user: ?1' + - 'sec-fetch-dest: document' + - 'accept-encoding: gzip, deflate, br' + - 'accept-language: en-US,en;q=0.9' +--- +name: chrome_100.0.4896.127_win10 +browser: + name: chrome + version: 100.0.4896.127 + os: win10 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 'GREASE', + 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, + 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, + 0x0035 + ] + comp_methods: [0x00] + extensions: + - type: GREASE + length: 0 + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 10 + supported_groups: [ + 'GREASE', + 0x001d, 0x0017, 0x0018 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: session_ticket + length: 0 + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: signature_algorithms + length: 18 + sig_hash_algs: [ + 0x0403, 0x0804, 0x0401, 0x0503, + 0x0805, 0x0501, 0x0806, 0x0601 + ] + - type: signed_certificate_timestamp + length: 0 + - type: keyshare + length: 43 + key_shares: + - group: GREASE + length: 1 + - group: 29 + length: 32 + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: supported_versions + length: 7 + supported_versions: [ + 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' + ] + - type: compress_certificate + length: 3 + algorithms: [0x02] + - type: application_settings + length: 5 + alps_alpn_list: ['h2'] + - type: GREASE + length: 1 + data: !!binary AA== + - type: padding + http2: + pseudo_headers: + - ':method' + - ':authority' + - ':scheme' + - ':path' + headers: + - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100"' + - 'sec-ch-ua-mobile: ?0' + - 'sec-ch-ua-platform: "Windows"' + - 'upgrade-insecure-requests: 1' + - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36' + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' + - 'sec-fetch-site: none' + - 'sec-fetch-mode: navigate' + - 'sec-fetch-user: ?1' + - 'sec-fetch-dest: document' + - 'accept-encoding: gzip, deflate, br' + - 'accept-language: en-US,en;q=0.9' +--- +name: chrome_101.0.4951.67_win10 +browser: + name: chrome + version: 101.0.4951.67 + os: win10 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 'GREASE', + 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, + 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, + 0x0035 + ] + comp_methods: [0x00] + extensions: + - type: GREASE + length: 0 + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 10 + supported_groups: [ + 'GREASE', + 0x001d, 0x0017, 0x0018 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: session_ticket + length: 0 + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: signature_algorithms + length: 18 + sig_hash_algs: [ + 0x0403, 0x0804, 0x0401, 0x0503, + 0x0805, 0x0501, 0x0806, 0x0601 + ] + - type: signed_certificate_timestamp + length: 0 + - type: keyshare + length: 43 + key_shares: + - group: GREASE + length: 1 + - group: 29 + length: 32 + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: supported_versions + length: 7 + supported_versions: [ + 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' + ] + - type: compress_certificate + length: 3 + algorithms: [0x02] + - type: application_settings + length: 5 + alps_alpn_list: ['h2'] + - type: GREASE + length: 1 + data: !!binary AA== + - type: padding + http2: + pseudo_headers: + - ':method' + - ':authority' + - ':scheme' + - ':path' + headers: + - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="101", "Google Chrome";v="101"' + - 'sec-ch-ua-mobile: ?0' + - 'sec-ch-ua-platform: "Windows"' + - 'upgrade-insecure-requests: 1' + - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36' + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' + - 'sec-fetch-site: none' + - 'sec-fetch-mode: navigate' + - 'sec-fetch-user: ?1' + - 'sec-fetch-dest: document' + - 'accept-encoding: gzip, deflate, br' + - 'accept-language: en-US,en;q=0.9' +--- +name: chrome_99.0.4844.73_android12-pixel6 +browser: + name: chrome + version: 99.0.4844.73 + os: android12 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 'GREASE', + 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, + 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, + 0x0035 + ] + comp_methods: [0x00] + extensions: + - type: GREASE + length: 0 + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 10 + supported_groups: [ + 'GREASE', + 0x001d, 0x0017, 0x0018 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: session_ticket + length: 0 + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: signature_algorithms + length: 18 + sig_hash_algs: [ + 0x0403, 0x0804, 0x0401, 0x0503, + 0x0805, 0x0501, 0x0806, 0x0601 + ] + - type: signed_certificate_timestamp + length: 0 + - type: keyshare + length: 43 + key_shares: + - group: GREASE + length: 1 + - group: 29 + length: 32 + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: supported_versions + length: 7 + supported_versions: [ + 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' + ] + - type: compress_certificate + length: 3 + algorithms: [0x02] + - type: application_settings + length: 5 + alps_alpn_list: ['h2'] + - type: GREASE + length: 1 + data: !!binary AA== + - type: padding + http2: + pseudo_headers: + - ':method' + - ':authority' + - ':scheme' + - ':path' + headers: + - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="99", "Google Chrome";v="99"' + - 'sec-ch-ua-mobile: ?1' + - 'sec-ch-ua-platform: "Android"' + - 'upgrade-insecure-requests: 1' + - "user-agent: Mozilla/5.0 (Linux; Android 12; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.58 Mobile Safari/537.36" + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' + - 'sec-fetch-site: none' + - 'sec-fetch-mode: navigate' + - 'sec-fetch-user: ?1' + - 'sec-fetch-dest: document' + - 'accept-encoding: gzip, deflate, br' + - 'accept-language: en-US,en;q=0.9' diff --git a/tests/signatures/edge.yaml b/tests/signatures/edge.yaml new file mode 100644 index 0000000..0a84228 --- /dev/null +++ b/tests/signatures/edge.yaml @@ -0,0 +1,289 @@ +# Edge browser signatures +--- +name: edge_98.0.1108.62_win10 +browser: + name: edge + version: 98.0.1108.62 + os: win10 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 'GREASE', + 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, + 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, + 0x0035 + ] + comp_methods: [0x00] + extensions: + - type: GREASE + length: 0 + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 10 + supported_groups: [ + 'GREASE', + 0x001d, 0x0017, 0x0018 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: session_ticket + length: 0 + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: signature_algorithms + length: 18 + sig_hash_algs: [ + 0x0403, 0x0804, 0x0401, 0x0503, + 0x0805, 0x0501, 0x0806, 0x0601 + ] + - type: signed_certificate_timestamp + length: 0 + - type: keyshare + length: 43 + key_shares: + - group: GREASE + length: 1 + - group: 29 + length: 32 + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: supported_versions + length: 7 + supported_versions: [ + 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' + ] + - type: compress_certificate + length: 3 + algorithms: [0x02] + - type: application_settings + length: 5 + alps_alpn_list: ['h2'] + - type: GREASE + length: 1 + data: !!binary AA== + - type: padding + http2: + pseudo_headers: + - ':method' + - ':authority' + - ':scheme' + - ':path' + headers: + - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="98", "Microsoft Edge";v="98"' + - 'sec-ch-ua-mobile: ?0' + - 'sec-ch-ua-platform: "Windows"' + - 'upgrade-insecure-requests: 1' + - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 Edg/98.0.1108.62' + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' + - 'sec-fetch-site: none' + - 'sec-fetch-mode: navigate' + - 'sec-fetch-user: ?1' + - 'sec-fetch-dest: document' + - 'accept-encoding: gzip, deflate, br' + - 'accept-language: en-US,en;q=0.9' +--- +name: edge_99.0.1150.30_win10 +browser: + name: edge + version: 99.0.1150.30 + os: win10 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 'GREASE', + 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, + 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, + 0x0035 + ] + comp_methods: [0x00] + extensions: + - type: GREASE + length: 0 + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 10 + supported_groups: [ + 'GREASE', + 0x001d, 0x0017, 0x0018 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: session_ticket + length: 0 + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: signature_algorithms + length: 18 + sig_hash_algs: [ + 0x0403, 0x0804, 0x0401, 0x0503, + 0x0805, 0x0501, 0x0806, 0x0601 + ] + - type: signed_certificate_timestamp + length: 0 + - type: keyshare + length: 43 + key_shares: + - group: GREASE + length: 1 + - group: 29 + length: 32 + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: supported_versions + length: 7 + supported_versions: [ + 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' + ] + - type: compress_certificate + length: 3 + algorithms: [0x02] + - type: application_settings + length: 5 + alps_alpn_list: ['h2'] + - type: GREASE + length: 1 + data: !!binary AA== + - type: padding + http2: + pseudo_headers: + - ':method' + - ':authority' + - ':scheme' + - ':path' + headers: + - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="99", "Microsoft Edge";v="99"' + - 'sec-ch-ua-mobile: ?0' + - 'sec-ch-ua-platform: "Windows"' + - 'upgrade-insecure-requests: 1' + - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36 Edg/99.0.1150.30' + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' + - 'sec-fetch-site: none' + - 'sec-fetch-mode: navigate' + - 'sec-fetch-user: ?1' + - 'sec-fetch-dest: document' + - 'accept-encoding: gzip, deflate, br' + - 'accept-language: en-US,en;q=0.9' +--- +name: edge_101.0.1210.47_win10 +browser: + name: edge + version: 101.0.1210.47 + os: win10 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 'GREASE', + 0x1301, 0x1302, 0x1303, 0xc02b, 0xc02f, 0xc02c, 0xc030, + 0xcca9, 0xcca8, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, + 0x0035 + ] + comp_methods: [0x00] + extensions: + - type: GREASE + length: 0 + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 10 + supported_groups: [ + 'GREASE', + 0x001d, 0x0017, 0x0018 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: session_ticket + length: 0 + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: signature_algorithms + length: 18 + sig_hash_algs: [ + 0x0403, 0x0804, 0x0401, 0x0503, + 0x0805, 0x0501, 0x0806, 0x0601 + ] + - type: signed_certificate_timestamp + length: 0 + - type: keyshare + length: 43 + key_shares: + - group: GREASE + length: 1 + - group: 29 + length: 32 + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: supported_versions + length: 7 + supported_versions: [ + 'GREASE', 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' + ] + - type: compress_certificate + length: 3 + algorithms: [0x02] + - type: application_settings + length: 5 + alps_alpn_list: ['h2'] + - type: GREASE + length: 1 + data: !!binary AA== + - type: padding + http2: + pseudo_headers: + - ':method' + - ':authority' + - ':scheme' + - ':path' + headers: + - 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101"' + - 'sec-ch-ua-mobile: ?0' + - 'sec-ch-ua-platform: "Windows"' + - 'upgrade-insecure-requests: 1' + - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36 Edg/101.0.1210.47' + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9' + - 'sec-fetch-site: none' + - 'sec-fetch-mode: navigate' + - 'sec-fetch-user: ?1' + - 'sec-fetch-dest: document' + - 'accept-encoding: gzip, deflate, br' + - 'accept-language: en-US,en;q=0.9' diff --git a/tests/signatures/firefox.yaml b/tests/signatures/firefox.yaml new file mode 100644 index 0000000..f8655cf --- /dev/null +++ b/tests/signatures/firefox.yaml @@ -0,0 +1,353 @@ +# Firefox browser signatures +--- +name: firefox_91.6.0esr_win10 +browser: + name: firefox + version: 91.6.0esr + os: win10 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 0x1301, 0x1303, 0x1302, 0xc02b, 0xc02f, 0xcca9, 0xcca8, 0xc02c, + 0xc030, 0xc00a, 0xc009, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, + 0x0035, 0x000a + ] + comp_methods: [0x00] + extensions: + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 14 + supported_groups: [ + 0x1d, 0x017, 0x18, 0x19, 0x0100, 0x0101 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: session_ticket + length: 0 + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: delegated_credentials + length: 10 + sig_hash_algs: [ + 0x0403, 0x0503, 0x0603, 0x0203 + ] + - type: keyshare + length: 107 + key_shares: + - group: 29 + length: 32 + - group: 23 + length: 65 + - type: supported_versions + length: 5 + supported_versions: [ + 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' + ] + - type: signature_algorithms + length: 24 + sig_hash_algs: [ + 0x0403, 0x0503, 0x0603, 0x0804, + 0x0805, 0x0806, 0x0401, 0x0501, + 0x0601, 0x0203, 0x0201 + ] + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: record_size_limit + length: 2 + record_size_limit: 16385 + - type: padding + http2: + pseudo_headers: + - ':method' + - ':path' + - ':authority' + - ':scheme' + headers: + - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0' + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' + - 'accept-language: en-US,en;q=0.5' + - 'accept-encoding: gzip, deflate, br' + - 'upgrade-insecure-requests: 1' + - 'sec-fetch-dest: document' + - 'sec-fetch-mode: navigate' + - 'sec-fetch-site: none' + - 'sec-fetch-user: ?1' + - 'te: trailers' +--- +name: firefox_95.0.2_win10 +browser: + name: firefox + version: 95.0.2 + os: win10 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 0x1301, 0x1303, 0x1302, 0xc02b, 0xc02f, 0xcca9, 0xcca8, 0xc02c, + 0xc030, 0xc00a, 0xc009, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, + 0x0035 + ] + comp_methods: [0x00] + extensions: + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 14 + supported_groups: [ + 0x1d, 0x017, 0x18, 0x19, 0x0100, 0x0101 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: session_ticket + length: 0 + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: delegated_credentials + length: 10 + sig_hash_algs: [ + 0x0403, 0x0503, 0x0603, 0x0203 + ] + - type: keyshare + length: 107 + key_shares: + - group: 29 + length: 32 + - group: 23 + length: 65 + - type: supported_versions + length: 5 + supported_versions: [ + 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' + ] + - type: signature_algorithms + length: 24 + sig_hash_algs: [ + 0x0403, 0x0503, 0x0603, 0x0804, + 0x0805, 0x0806, 0x0401, 0x0501, + 0x0601, 0x0203, 0x0201 + ] + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: record_size_limit + length: 2 + record_size_limit: 16385 + - type: padding + http2: + pseudo_headers: + - ':method' + - ':path' + - ':authority' + - ':scheme' + headers: + - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0' + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' + - 'accept-language: en-US,en;q=0.5' + - 'accept-encoding: gzip, deflate, br' + - 'upgrade-insecure-requests: 1' + - 'sec-fetch-dest: document' + - 'sec-fetch-mode: navigate' + - 'sec-fetch-site: none' + - 'sec-fetch-user: ?1' + - 'te: trailers' +--- +name: firefox_98.0_win10 +browser: + name: firefox + version: 98.0 + os: win10 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 0x1301, 0x1303, 0x1302, 0xc02b, 0xc02f, 0xcca9, 0xcca8, 0xc02c, + 0xc030, 0xc00a, 0xc009, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, + 0x0035 + ] + comp_methods: [0x00] + extensions: + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 14 + supported_groups: [ + 0x1d, 0x017, 0x18, 0x19, 0x0100, 0x0101 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: session_ticket + length: 0 + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: delegated_credentials + length: 10 + sig_hash_algs: [ + 0x0403, 0x0503, 0x0603, 0x0203 + ] + - type: keyshare + length: 107 + key_shares: + - group: 29 + length: 32 + - group: 23 + length: 65 + - type: supported_versions + length: 5 + supported_versions: [ + 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' + ] + - type: signature_algorithms + length: 24 + sig_hash_algs: [ + 0x0403, 0x0503, 0x0603, 0x0804, + 0x0805, 0x0806, 0x0401, 0x0501, + 0x0601, 0x0203, 0x0201 + ] + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: record_size_limit + length: 2 + record_size_limit: 16385 + - type: padding + http2: + pseudo_headers: + - ':method' + - ':path' + - ':authority' + - ':scheme' + headers: + - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0' + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' + - 'accept-language: en-US,en;q=0.5' + - 'accept-encoding: gzip, deflate, br' + - 'upgrade-insecure-requests: 1' + - 'sec-fetch-dest: document' + - 'sec-fetch-mode: navigate' + - 'sec-fetch-site: none' + - 'sec-fetch-user: ?1' + - 'te: trailers' +--- +name: firefox_100.0_win10 +browser: + name: firefox + version: 100.0 + os: win10 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 0x1301, 0x1303, 0x1302, 0xc02b, 0xc02f, 0xcca9, 0xcca8, 0xc02c, + 0xc030, 0xc00a, 0xc009, 0xc013, 0xc014, 0x009c, 0x009d, 0x002f, + 0x0035 + ] + comp_methods: [0x00] + extensions: + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 14 + supported_groups: [ + 0x1d, 0x017, 0x18, 0x19, 0x0100, 0x0101 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: session_ticket + length: 0 + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: delegated_credentials + length: 10 + sig_hash_algs: [ + 0x0403, 0x0503, 0x0603, 0x0203 + ] + - type: keyshare + length: 107 + key_shares: + - group: 29 + length: 32 + - group: 23 + length: 65 + - type: supported_versions + length: 5 + supported_versions: [ + 'TLS_VERSION_1_3', 'TLS_VERSION_1_2' + ] + - type: signature_algorithms + length: 24 + sig_hash_algs: [ + 0x0403, 0x0503, 0x0603, 0x0804, + 0x0805, 0x0806, 0x0401, 0x0501, + 0x0601, 0x0203, 0x0201 + ] + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: record_size_limit + length: 2 + record_size_limit: 16385 + - type: padding + http2: + pseudo_headers: + - ':method' + - ':path' + - ':authority' + - ':scheme' + headers: + - 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0' + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8' + - 'accept-language: en-US,en;q=0.5' + - 'accept-encoding: gzip, deflate, br' + - 'upgrade-insecure-requests: 1' + - 'sec-fetch-dest: document' + - 'sec-fetch-mode: navigate' + - 'sec-fetch-site: none' + - 'sec-fetch-user: ?1' + - 'te: trailers' diff --git a/tests/signatures/safari.yaml b/tests/signatures/safari.yaml new file mode 100644 index 0000000..59a33e2 --- /dev/null +++ b/tests/signatures/safari.yaml @@ -0,0 +1,84 @@ +# Safari browser signatures +--- +name: safari_15.3_macos11.6.4 +browser: + name: safari + version: 15.3 + os: macos11.6.4 + mode: regular +signature: + tls_client_hello: + record_version: 'TLS_VERSION_1_0' + handshake_version: 'TLS_VERSION_1_2' + session_id_length: 32 + ciphersuites: [ + 'GREASE', + 0x1301, 0x1302, 0x1303, 0xc02c, 0xc02b, 0xcca9, 0xc030, 0xc02f, + 0xcca8, 0xc024, 0xc023, 0xc00a, 0xc009, 0xc028, 0xc027, 0xc014, + 0xc013, 0x009d, 0x009c, 0x003d, 0x003c, 0x0035, 0x002f, 0xc008, + 0xc012, 0x000a + ] + comp_methods: [0x00] + extensions: + - type: GREASE + length: 0 + - type: server_name + - type: extended_master_secret + length: 0 + - type: renegotiation_info + length: 1 + - type: supported_groups + length: 12 + supported_groups: [ + 'GREASE', + 0x001d, 0x0017, 0x0018, 0x0019 + ] + - type: ec_point_formats + length: 2 + ec_point_formats: [0] + - type: application_layer_protocol_negotiation + length: 14 + alpn_list: ['h2', 'http/1.1'] + - type: status_request + length: 5 + status_request_type: 0x01 + - type: signature_algorithms + length: 24 + sig_hash_algs: [ + 0x0403, 0x0804, 0x0401, 0x0503, 0x0203, 0x0805, 0x0805, + 0x0501, 0x0806, 0x0601, 0x0201 + ] + - type: signed_certificate_timestamp + length: 0 + - type: keyshare + length: 43 + key_shares: + - group: 'GREASE' + length: 1 + - group: 29 + length: 32 + - type: psk_key_exchange_modes + length: 2 + psk_ke_mode: 1 + - type: supported_versions + length: 11 + supported_versions: [ + 'GREASE', + 'TLS_VERSION_1_3', 'TLS_VERSION_1_2', + 'TLS_VERSION_1_1', 'TLS_VERSION_1_0' + ] + - type: GREASE + length: 1 + data: !!binary AA== + - type: padding + http2: + pseudo_headers: + - ':method' + - ':scheme' + - ':path' + - ':authority' + headers: + - 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15' + - 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' + - 'accept-language: en-us' + - 'accept-encoding: gzip, deflate, br' diff --git a/tests/test_impersonate.py b/tests/test_impersonate.py index a6b5bf9..a0af2b3 100644 --- a/tests/test_impersonate.py +++ b/tests/test_impersonate.py @@ -4,6 +4,7 @@ import re import sys import asyncio import logging +import pathlib import subprocess import tempfile from typing import List @@ -21,13 +22,16 @@ from signature import ( @pytest.fixture def browser_signatures(): - with open("signatures.yaml", "r") as f: - # Parse signatures.yaml database. - return { - doc["name"]: doc - for doc in yaml.safe_load_all(f.read()) - if doc - } + docs = {} + for path in pathlib.Path("signatures").glob("**/*.yaml"): + with open(path, "r") as f: + # Parse signatures.yaml database. + docs.update({ + doc["name"]: doc + for doc in yaml.safe_load_all(f.read()) + if doc + }) + return docs class TestSignatureModule: