A rounded TTL still has a boundary

Nine synthetic SYN variants expose the route boundary inside a normalized TCP identifier. A short derivation shows why changing the buckets cannot remove it.

4 min read
RSS

Rounding a packet's TTL to a common starting value reduces route variation in a TCP fingerprint. It does not remove it. In Heretic's parser, changing an observed TTL from 33 to 32 changes the normalized stack identifier even when every TCP byte stays the same.

We checked this with nine synthetic variants of one captured SYN. The parser produced four stack identifiers, while its TCP OS hint stayed Linux for all nine. The distinction matters when comparing connection records: a changed fingerprint is not, by itself, a changed operating system.

The estimate inside the identifier

IPv4 carries the remaining TTL, not a record of its starting value. Forwarding reduces it. TCP also permits a configurable outgoing TTL, so the starting value cannot be assumed to come from a fixed list. See the IPv4 header definition and TCP's lower-level interface.

Heretic estimates the starting value by choosing the smallest entry in [32, 64, 128, 255] that is at least the observed TTL. This small Python function expresses that calculation:

python
def estimated_initial_ttl(observed):
    assert 1 <= observed <= 255
    return next(t for t in [32, 64, 128, 255] if observed <= t)

The stack identifier omits the observed TTL and estimated hop count, but includes this estimated starting value. That makes comparisons stable within a bucket. Observations of 61 and 53 both produce 64. It also creates boundaries where one decrement changes the identifier.

Change one field, retain the rest

The source packet was a Linux loopback SYN from a Python socket. For this experiment we edited its IPv4 TTL to each selected value and repaired the IPv4 header checksum. We did not change TCP options, window, ports, sequence number or timestamp. These are synthetic parser inputs, not captures from nine routes.

Each variant went through Heretic's actual link, IPv4 and TCP parsers, then its TCP fingerprint constructor and OS-hint matcher. The resulting starting-value estimates were:

Observed TTL Estimated starting TTL
31, 32 32
33, 63, 64 64
65, 127, 128 128
129 255

Two complete identifiers show the boundary. Only their second component changes:

text
TTL 33: 4:64:64800:1200,10:mss,sok,ts,nop,ws:id+
TTL 32: 4:32:64800:1200,10:mss,sok,ts,nop,ws:id+

The same discontinuity occurs at 65→64 and 129→128. Within each bucket, the identifiers remain equal. Those equal pairs are the control: the test distinguishes the rounding boundary from a general dependence on every observed TTL change.

The OS matcher retained Linux because the TCP option layout and window scale still matched the same catalogue entry. This experiment ran the parser and matcher, not the full session assessment. It does not demonstrate a false bot finding or measure how often these boundaries occur in traffic.

Why another rounding scheme cannot guarantee invariance

Suppose a function of observed TTL must remain identical after any one-unit decrement, for every positive TTL where both observations are possible. Then it must satisfy:

text
f(255) = f(254) = ... = f(2) = f(1)

That function is constant. Any nonconstant TTL-only classification has at least one adjacent boundary. Different buckets move the boundary; they cannot eliminate it while retaining distinctions derived from TTL alone.

This argument assumes the guarantee covers every adjacent positive TTL pair without another source of information about the initial value. A known starting TTL and a bounded route range permit a narrower guarantee. The packet's observed TTL alone supplies neither.

What a comparison can promise

We corrected the internal description of Heretic's stack identifier and added tests for all three boundaries. Its serialized format stays the same. Eighteen focused fingerprint-module tests pass, including the within-bucket control and the new boundary cases.

For a consumer that needs invariance specifically to TTL changes, the comparison result must not depend on observed TTL or on nonconstant values derived from it. That still does not make the remaining TCP fields a device identity: unrelated endpoints can share them, and other fields can change with connection settings. Keep the comparison's promised invariance explicit instead of promoting a normalized transport record into an identity claim.

Reproduce the boundary checks

Download the TTL normalization fixture, extract it and run python3 -P check.py. It uses only the Python standard library and makes no network requests. The output reports nine synthetic inputs and four distinct identifiers.

The checker verifies the frame edits, repaired IPv4 checksums, unchanged TCP fields and normalization arithmetic against the saved Rust parser output. It does not execute Heretic’s OS matcher or full sensor. The Linux hints are recorded observations. The archive includes hashes for its inputs, output and checker.

Next article Chromium's Windows claim kept its Linux TCP layout A Chromium OS-claim override changed browser values and HTTP headers. Captured SYNs and socket controls show what changed in the TCP comparison.

The probe runs on your own browser.

The public demo returns the verdict and its named findings.