Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,16 @@ will prepare ClientHello with empty uconn.Extensions so you can fill it with TLS
4. The rest will will parrot given browser. Such parrots include, for example:
* `utls.HelloChrome_Auto`- parrots recommended(usually latest) Google Chrome version
* `utls.HelloChrome_58` - parrots Google Chrome 58
* `utls.HelloChrome_155` - parrots a fresh Chrome 155.0.8059.40 connection on macOS
* `utls.HelloFirefox_Auto` - parrots recommended(usually latest) Firefox version
* `utls.HelloFirefox_55` - parrots Firefox 55

`HelloChrome_Auto` currently selects `HelloChrome_155`. This profile includes
GREASE and ML-DSA signature schemes and the 28 trust anchor IDs observed in a
[fresh Chrome capture](testdata/chrome155_clienthello.md). The IDs are a snapshot
of that build's Chrome Root Store; component updates and browser feature settings
can change the ClientHello. `TrustAnchorsExtension` preserves these IDs when
fingerprinting a capture and does not change `Config.RootCAs`.

# Usage
## Examples
Expand Down
6 changes: 6 additions & 0 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,12 @@ const (
// EdDSA algorithms.
Ed25519 SignatureScheme = 0x0807

// ML-DSA algorithms (draft-ietf-tls-mldsa). uTLS only advertises these
// codepoints for ClientHello parroting; it cannot verify ML-DSA signatures.
MLDSA44 SignatureScheme = 0x0904
MLDSA65 SignatureScheme = 0x0905
MLDSA87 SignatureScheme = 0x0906

// Legacy signature and hash algorithms for TLS 1.2.
PKCS1WithSHA1 SignatureScheme = 0x0201
ECDSAWithSHA1 SignatureScheme = 0x0203
Expand Down
8 changes: 8 additions & 0 deletions common_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 13 additions & 10 deletions dicttls/exttype_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,12 @@ const (

// Not IANA assigned
const (
ExtType_next_protocol_negotiation uint16 = 13172 // https://datatracker.ietf.org/doc/html/draft-agl-tls-nextprotoneg-04
ExtType_application_settings uint16 = 17513 // https://www.ietf.org/archive/id/draft-vvv-tls-alps-01.html
ExtType_application_settings_new uint16 = 17613 // https://www.ietf.org/archive/id/draft-vvv-tls-alps-01.html
ExtType_channel_id_old uint16 = 30031 // https://datatracker.ietf.org/doc/html/draft-balfanz-tls-channelid-01
ExtType_channel_id uint16 = 30032 // https://datatracker.ietf.org/doc/html/draft-balfanz-tls-channelid-01
ExtType_next_protocol_negotiation uint16 = 13172 // https://datatracker.ietf.org/doc/html/draft-agl-tls-nextprotoneg-04
ExtType_application_settings uint16 = 17513 // https://www.ietf.org/archive/id/draft-vvv-tls-alps-01.html
ExtType_application_settings_new uint16 = 17613 // https://www.ietf.org/archive/id/draft-vvv-tls-alps-01.html
ExtType_channel_id_old uint16 = 30031 // https://datatracker.ietf.org/doc/html/draft-balfanz-tls-channelid-01
ExtType_channel_id uint16 = 30032 // https://datatracker.ietf.org/doc/html/draft-balfanz-tls-channelid-01
ExtType_trust_anchors uint16 = 0xca34 // draft-ietf-tls-trust-anchor-ids
)

var DictExtTypeValueIndexed = map[uint16]string{
Expand Down Expand Up @@ -135,11 +136,12 @@ var DictExtTypeValueIndexed = map[uint16]string{
59: "dnssec_chain",
65281: "renegotiation_info",

13172: "next_protocol_negotiation",
17513: "application_settings",
17613: "application_settings_new",
30031: "channel_id_old",
30032: "channel_id",
13172: "next_protocol_negotiation",
17513: "application_settings",
17613: "application_settings_new",
30031: "channel_id_old",
30032: "channel_id",
0xca34: "trust_anchors",
}

var DictExtTypeNameIndexed = map[string]uint16{
Expand Down Expand Up @@ -209,4 +211,5 @@ var DictExtTypeNameIndexed = map[string]uint16{
"application_settings_new": 17613,
"channel_id_old": 30031,
"channel_id": 30032,
"trust_anchors": 0xca34,
}
9 changes: 9 additions & 0 deletions dicttls/signaturescheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ const (
SigScheme_ecdsa_brainpoolP256r1tls13_sha256 uint16 = 0x081A
SigScheme_ecdsa_brainpoolP384r1tls13_sha384 uint16 = 0x081B
SigScheme_ecdsa_brainpoolP512r1tls13_sha512 uint16 = 0x081C
SigScheme_mldsa44 uint16 = 0x0904
SigScheme_mldsa65 uint16 = 0x0905
SigScheme_mldsa87 uint16 = 0x0906
)

var DictSignatureSchemeValueIndexed = map[uint16]string{
Expand Down Expand Up @@ -75,6 +78,9 @@ var DictSignatureSchemeValueIndexed = map[uint16]string{
0x081A: "ecdsa_brainpoolP256r1tls13_sha256",
0x081B: "ecdsa_brainpoolP384r1tls13_sha384",
0x081C: "ecdsa_brainpoolP512r1tls13_sha512",
0x0904: "mldsa44",
0x0905: "mldsa65",
0x0906: "mldsa87",
}

var DictSignatureSchemeNameIndexed = map[string]uint16{
Expand Down Expand Up @@ -113,4 +119,7 @@ var DictSignatureSchemeNameIndexed = map[string]uint16{
"ecdsa_brainpoolP256r1tls13_sha256": 0x081A,
"ecdsa_brainpoolP384r1tls13_sha384": 0x081B,
"ecdsa_brainpoolP512r1tls13_sha512": 0x081C,
"mldsa44": 0x0904,
"mldsa65": 0x0905,
"mldsa87": 0x0906,
}
1 change: 1 addition & 0 deletions testdata/chrome155_clienthello.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
160301079e0100079a030397ba84e6911f26dc308204a2e65a2264ea769abc71617e9832e8a05327e2c03f20130452c827a0b862598e1f621324a0887d19f386284186f43e136844ed39fbb200201a1a130113021303c02bc02fc02cc030cca9cca8c013c014009c009d002f003501000731fafa000000120000ca3400ba00b80582df1302010582df1302060582df13020d0582df13020e0582df13020f0582df1302120582df1302130582df13021408839a648c9b2d010708839a648c9b2d010808839a648c9b2d010908839a648c9b2d010a08839a648c9b2d010b08839a648c9b2d010c08839a648c9b2d010d08839a648c9b2d011208839a648c9b2d011304d679090104d679090404d679090504d679090604d679090704d679090804d679090a04d679090b04d679090c04d679090d04d679090ffe0d00da00000100014200200b81d7a0c9bb3d4482028d5f90d7ed4f702aa257f7621d379be6d154251e745b00b0573e4731d509ac8e562a21f30236277f71fef7f0bd518c2c9916022a74afcb7d4d6145d72ee33f2f3720f85df5d6840bf3ce4dde5bc3efdacda6d4116add75ced6fa8c993692791f9437400ea835ff5f57776025cc7ff2828a93fff832dc24a1e394cf503813d67c4f45b0580f68d16fcaf5d774ac28a4bedac83733318c7cca132bebd041bba4077e53f51a2e30018559b2ed802ecf7398d369ab3090b8c4eb257b197631fad183682d83c8b40f82be001b0003020002000a000c000a7a7a11ec001d00170018ff0100010000230000002b0007065a5a030403030010000e000c02683208687474702f312e31000b00020100003304ef04ed7a7a00010011ec04c049c251fae6095e3992e4517d82ba97a8c7a789c66f450b0d9c3579870445f17856d8e0c53dfb643fe54032044236154d1fd722e7f6c3bf3606e84a68775638e765a7fdb85672dc3768941eaf232a55b229fe58cb41e35683b0532ff873249acd08ac19f79091c1acb54c53459d9ca31ac998ca6a67f172a1ef9b839151797e78589ca4aee75056be454adb070f6622577abc664b353fbc2272bf4c8cea7724dad8bfa0617d21555e3d0b69de388505b01d00ec263334c535c99699b20d8cd741f48646aea8c519334623ab33ea990701d7c400e48415da30a468953d5bbdc684aa78f1aca5c591a1805b69a786257099f5a02a833339bb9794dccc40b9188dd189596039623d76534ac1481e695b38974c5738a8107a16f5d4c19cd51d52c70bde8566b8500c73bba0e55ba09e067c6d3c76ddb99ae7da0fb7950d344bc86b1ac36827ae483a0ded32be2f897f66b96100440f6e148be9c19a3c1c7504e01eef443d4a674043e41f4f3c70029801a756227e5c95041053138472b19a103d95807ec57c02316499e72362642fe0c418c2306cdfb44dee570bc2783596a1464d5a16e4d59cb1bcb967e4459ce0430787141b547abeda15c418acd2f095addac18866cd99b2c70b3087c1b070f95320853a33b3d4bf9edca3cdf2b4a96c74154b57aab782d3e97d1801b95c2b586b7a0ca38bafc4d987ee600585ac8c359bc9c89997ed1231d87b28c0e32f90e16778a29cc2d3c4dbea79db389df497cf2210bd4dd46d7d21a6b3b683eb040bfca87019ec921b3a3ae7f20eb90a95449b70c2740fe4ea2c16e1c01ba5367676b48f58a6d7d657a52c61737b1671214b1210252107b441cc5c968a998616a77047a3d7516f28ac92438287b6bb178024566ce4a1b6f11efe9abb73894605b313567c60693c13f156a6fb55304134007c69128249a381281099a50cd18b0873a1697045bc8224bec2f87e4b09002703766e87b2c8845f56a7b77385562f41644710a36f9388fb4ab1311482b61c056b171919b3ac3b8cbf38e1971686ceead326e4654ded168b8ed8064b3032f23a7793c51700b9ba0cfbbc39390f3c82256898bb1933c1fec6cae242772e7b4076a6cf0d996c7cb6960930bea5a384083a18c00883ced91206c6401fb45b75fb44d073726d5bcaeffabd077705816c7ec7b03b0468a1f7238c660ac5f34b86b12968338c2817f45197cb04c5db396c4a13dc6a104663b57f43bad5063591c63d9cac2a199885a048809246bbd20191f211080d7286c7b61525382dada5ab9c175913cc0c9a011c4217575d1756d1e4b6b1da94b8cc1321a269d0310eb0374fe4bb39e41673d7742f335191290aaf3ec846a0d209546a97707938b3a307fe191599b59b26e1cfc92b6c69818a8de06c6e6215ce20c1057a8f7ed6912a5a89d64447aaa5b3b5a27cd41b8715fb44a502697e3185ca005077a194cfd2ce4b44cc3d5c7538e60718e90247ac1912329bf8e7c7e03078601b93a11163d5b0c1b34b1358608dfc282ebc18bd20f5a35c610e59c09f200875f05c10de1c7f27dc050296a49d4a03469c365f16a9b9a6c5def522832718e8022440019ad0d662237bb3535b912fab358c9a89fc944c201afe4a3c4d65837b31e2eb034759da63d960226e2669b646b549d3161427956172e60d876d0353ab787ac5cad550790a65ef062efbbf97f65f1cf62d001d0020d6b7a093831d73daf8e2aa6d7106321215cce52e6d14c408a0dafe217a207654000d001a0018aaaa0904090509060403080404010503080505010806060100170000002d0002010100050005010000000000000014001200000f7777772e6578616d706c652e636f6d44cd00050003026832caca000100
52 changes: 52 additions & 0 deletions testdata/chrome155_clienthello.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Chrome 155 ClientHello fixture

`chrome155_clienthello.hex` is the complete first TLS record from a fresh HTTPS
connection made by official, branded Google Chrome 155.0.8059.40 on macOS arm64
on October 6, 2026. The browser version was checked in `chrome://version`.
The browser ran with a new dedicated profile, no TLS feature overrides, and QUIC
disabled so that the HTTPS connection used TCP. The page was opened through
native computer use at `https://www.example.com/`.

Wireshark's `dumpcap` recorded the connection, and `tshark` extracted TCP stream
0's ClientHello. The original TLS keylog was used separately to verify that the
connection completed a full TLS 1.3 handshake. Neither the keylog nor the
certificate/application traffic is included in this fixture.

The retained record is 1,955 bytes; its ClientHello handshake is 1,950 bytes.
SHA-256 of the decoded ClientHello handshake (excluding the five-byte TLS record
header):

```
235618e3922e52a71a9f6593a71ec4ca182dab6b3ab4e90a2a1733133e97439a
```

The original capture showed a new TCP SYN in frame 1, SYN/ACK in frame 3, and
ClientHello in frame 6. The ClientHello contains an empty `session_ticket` and
no `pre_shared_key`. The ServerHello in frame 13 selected TLS 1.3 and
`TLS_AES_128_GCM_SHA256`, without selecting a PSK. The decrypted server flight
in frame 19 contains EncryptedExtensions, CompressedCertificate,
CertificateVerify, and Finished; the client Finished follows in frame 21.
NewSessionTickets appear later in frame 35 and do not indicate resumption of
this connection. Chrome also opened an independent, fresh parallel connection
in stream 1, which completed a full handshake.

The profile advertises 28 trust anchor IDs in the captured order, three ML-DSA
signature schemes preceded by GREASE, X25519MLKEM768 and X25519 key shares, and
the new ALPS codepoint. The TLS server-padding extension is absent from this
normal Chrome capture.

Extraction command, using the original capture filename:

```sh
tshark -r chrome155-example.pcapng \
-Y 'tcp.stream == 0 && tls.handshake.type == 1' \
-T fields -e tcp.reassembled.data > chrome155_clienthello.hex
```

`u_chrome155_test.go` compares this independent browser capture with the generated
profile. It ignores only randomized extension permutation, GREASE codepoints,
ephemeral key material, and GREASE ECH config/key/payload randomness. The ECH
payload length must belong to BoringSSL's 144/176/208/240-byte family. Cipher,
signature, group, version, ALPN, key-share group/length, and trust-anchor list
order remain significant; other extension bodies are compared exactly. The
same fixture also exercises default Fingerprinter parsing and regeneration.
38 changes: 38 additions & 0 deletions u_chrome155.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package tls

// chrome155TrustAnchorIDs returns the Chrome Root Store IDs advertised by a fresh
// Google Chrome 155.0.8059.40 (macOS) connection. Chrome encodes the IDs in
// lexicographic order. Return fresh slices because ClientHelloSpec is mutable.
// Source: https://chromium.googlesource.com/chromium/src/+/refs/tags/155.0.8059.40/net/data/ssl/chrome_root_store/root_store.textproto
func chrome155TrustAnchorIDs() [][]byte {
return [][]byte{
{0x82, 0xdf, 0x13, 0x02, 0x01},
{0x82, 0xdf, 0x13, 0x02, 0x06},
{0x82, 0xdf, 0x13, 0x02, 0x0d},
{0x82, 0xdf, 0x13, 0x02, 0x0e},
{0x82, 0xdf, 0x13, 0x02, 0x0f},
{0x82, 0xdf, 0x13, 0x02, 0x12},
{0x82, 0xdf, 0x13, 0x02, 0x13},
{0x82, 0xdf, 0x13, 0x02, 0x14},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x07},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x08},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x09},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x0a},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x0b},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x0c},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x0d},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x12},
{0x83, 0x9a, 0x64, 0x8c, 0x9b, 0x2d, 0x01, 0x13},
{0xd6, 0x79, 0x09, 0x01},
{0xd6, 0x79, 0x09, 0x04},
{0xd6, 0x79, 0x09, 0x05},
{0xd6, 0x79, 0x09, 0x06},
{0xd6, 0x79, 0x09, 0x07},
{0xd6, 0x79, 0x09, 0x08},
{0xd6, 0x79, 0x09, 0x0a},
{0xd6, 0x79, 0x09, 0x0b},
{0xd6, 0x79, 0x09, 0x0c},
{0xd6, 0x79, 0x09, 0x0d},
{0xd6, 0x79, 0x09, 0x0f},
}
}
Loading
Loading