Skip to content

Commit

Permalink
add echcheck experiment spec (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
d1vyank authored Jan 9, 2023
1 parent fab7dc8 commit 11f00c4
Showing 1 changed file with 170 additions and 0 deletions.
170 changes: 170 additions & 0 deletions nettests/ts-039-echcheck.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
# Specification version number

2022-10-01-001

* _status_: experimental

# Specification name

ECH Check (`echcheck`)

# Test preconditions

* An internet connection

# Expected impact

Understanding whether there is blocking triggered by the presence of the
Encrypted Client Hello (ECH) extension in the Client Hello during a TLS
handshake.

# Expected inputs

- `input` (`string`; optional): a target URL that is unlikely to be blocked
to connect to (e.g. `google.com`)

The default implementation will use the domain `example.org` as
the `input`.

# Test description

Before performing the test, this experiment will resolve the given target URL
and establish a TCP connection. It will then attempt two TLS handshakes - one
with an ECH extension, and another control handshake without an ECH extension
present.

This experiment does not actually encrypt the Client Hello, but instead
attempts a GREASE’d (Generate Random Extensions And Sustain Extensibility) ECH
connection as per [draft-ietf-tls-esni-14](https://datatracker.ietf.org/doc/draft-ietf-tls-esni/).
This entails placing mocked ECH extension with random values in the
Client Hello. As passive network observers cannot tell a GREASE’d ECH connection
apart from a regular one, this test helps detect if there is any interference
to TLS handshakes that possess this field.

# Expected output

## Parent data format

We will include data following these data formats:

* `df-006-tlshandshake`

## Semantics

```JSON
{
"test_keys": {
"control": {},
"target": {}
}
}
```

- `control` : follows the `df-006-tlshandshake` data format

- `target` : follows the `df-006-tlshandshake` data format

## Possible conclusions

* Failure of the target TLS handshake with the corresponding control handshake
succeeding will indicate interference to TLS handshakes with the ECH extension
present

## Example output sample

```JSON
{
"annotations": {
"architecture": "amd64",
"engine_name": "ooniprobe-engine",
"engine_version": "3.17.0-alpha",
"platform": "macos"
},
"data_format_version": "0.2.0",
"input": "https://example.org",
"measurement_start_time": "2022-10-02 14:51:22",
"probe_asn": "AS45609",
"probe_cc": "IN",
"probe_ip": "127.0.0.1",
"probe_network_name": "Bharti Airtel Limited",
"report_id": "20221002T145122Z_echcheck_IN_45609_n1_joXsfBSYhFLCSNW9",
"resolver_asn": "AS9498",
"resolver_ip": "59.144.144.6",
"resolver_network_name": "Bharti Airtel Limited",
"software_name": "miniooni",
"software_version": "3.17.0-alpha",
"test_keys": {
"control": {
"address": "93.184.216.34:443",
"cipher_suite": "TLS_AES_256_GCM_SHA384",
"failure": null,
"negotiated_protocol": "h2",
"network": "tcp",
"no_tls_verify": true,
"peer_certificates": [
{
"data": "MIIHRzCCBi+gAwIBAgIQD6pjEJMHvD1BSJJkDM1NmjANBgkqhkiG9w0BAQsFADBPMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMSkwJwYDVQQDEyBEaWdpQ2VydCBUTFMgUlNBIFNIQTI1NiAyMDIwIENBMTAeFw0yMjAzMTQwMDAwMDBaFw0yMzAzMTQyMzU5NTlaMIGWMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLTG9zIEFuZ2VsZXMxQjBABgNVBAoMOUludGVybmV0wqBDb3Jwb3JhdGlvbsKgZm9ywqBBc3NpZ25lZMKgTmFtZXPCoGFuZMKgTnVtYmVyczEYMBYGA1UEAxMPd3d3LmV4YW1wbGUub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlV2WY5rlGn1fpwvuBhj0nVBcNxCxkHUG/pJG4HvaJen7YIZ1mLc7/P4snOJZiEfwWFTikHNbcUCcYiKG8JkFebZOYMc1U9PiEtVWGU4kuYuxiXpD8oMPin1B0SgrF7gKfO1//I2weJdAUjgZuXBCPAlhz2EnHddzXUtwm9XuOLO/Y6LATVMsbp8/lXnfo/bX0UgJ7C0aVqOu07A0Vr6OkPxwWmOvF3cRKhVCM7U4B51KK+IsWRLm8cVW1IaXjwhGzW7BR6EI3sxCQ4Wnc6HVPSgmomLWWWkIGFPAwcWUB4NC12yhCO5iW/dxNMWNLMRVtnZAyq6FpZ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/NhVfSbCEXffPgK2fPOre3qGNm+499iTcc+G33Mw+nur7SpZyEKEOxEXGlLzyQ4UfaJbcme6ce1XR2bFuAJKZTRei9AqPCCcUZlM51Ke92sRKw2Sfh3oius2FkOH6ipjv3U/697EA7sKPPcw7+uvTPyLNhBzPvOk",
"format": "base64"
}
],
"server_name": "example.org",
"t": 1.155229,
"t0": 0.746678,
"tags": [],
"tls_version": "TLSv1.3"
},
"target": {
"address": "93.184.216.34:443",
"cipher_suite": "TLS_AES_256_GCM_SHA384",
"failure": null,
"negotiated_protocol": "h2",
"network": "tcp",
"no_tls_verify": true,
"peer_certificates": [
{
"data": "MIIHRzCCBi+gAwIBAgIQD6pjEJMHvD1BSJJkDM1NmjANBgkqhkiG9w0BAQsFADBPMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMSkwJwYDVQQDEyBEaWdpQ2VydCBUTFMgUlNBIFNIQTI1NiAyMDIwIENBMTAeFw0yMjAzMTQwMDAwMDBaFw0yMzAzMTQyMzU5NTlaMIGWMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEUMBIGA1UEBxMLTG9zIEFuZ2VsZXMxQjBABgNVBAoMOUludGVybmV0wqBDb3Jwb3JhdGlvbsKgZm9ywqBBc3NpZ25lZMKgTmFtZXPCoGFuZMKgTnVtYmVyczEYMBYGA1UEAxMPd3d3LmV4YW1wbGUub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlV2WY5rlGn1fpwvuBhj0nVBcNxCxkHUG/pJG4HvaJen7YIZ1mLc7/P4snOJZiEfwWFTikHNbcUCcYiKG8JkFebZOYMc1U9PiEtVWGU4kuYuxiXpD8oMPin1B0SgrF7gKfO1//I2weJdAUjgZuXBCPAlhz2EnHddzXUtwm9XuOLO/Y6LATVMsbp8/lXnfo/bX0UgJ7C0aVqOu07A0Vr6OkPxwWmOvF3cRKhVCM7U4B51KK+IsWRLm8cVW1IaXjw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sRD2Cqk3p5BJl+7j5nL3a7hqG+fh/50tx8bIKuxT8b1Z11dmzzp/2n3YWzW2fP9NsarA4h20ksudYbj/NhVfSbCEXffPgK2fPOre3qGNm+499iTcc+G33Mw+nur7SpZyEKEOxEXGlLzyQ4UfaJbcme6ce1XR2bFuAJKZTRei9AqPCCcUZlM51Ke92sRKw2Sfh3oius2FkOH6ipjv3U/697EA7sKPPcw7+uvTPyLNhBzPvOk",
"format": "base64"
}
],
"server_name": "example.org",
"t": 1.462465,
"t0": 1.159156,
"tags": [],
"tls_version": "TLSv1.3"
}
},
"test_name": "echcheck",
"test_runtime": 1.4624715,
"test_start_time": "2022-10-02 14:51:21",
"test_version": "0.1.0"
}
```

# Privacy considerations

This nettest may be less intrusive than other nettests as it encourages
connections to URLs that are unlikely to be censored. We are not issuing DNS
queries for the sensitive domain and we are not connecting to the sensitive
IP address.

# Packet capture considerations

This test does not capture packets by default.

# Acknowledgments

Cloudflare's ECH [implementation](https://github.com/cloudflare/go) was used as
a reference for this experiment.

# Future work

This nettest is still experimental. It will establish a full ECH connection
once the protocol is stable and a Go implementation is available.

0 comments on commit 11f00c4

Please sign in to comment.