Device Tracking via Linux's New TCP Source Port Selection Algorithm (Extended Version)

Moshe Kol, Amit Klein, Yossi Gilad
9/26/2022
cs.CR

Official code: 0xkol/rfc6056-device-tracker (16 stars, JavaScript, MIT, last commit 2022-09-28).

Abstract

We describe a tracking technique for Linux devices, exploiting a new TCP source port generation mechanism recently introduced to the Linux kernel. This mechanism is based on an algorithm, standardized in RFC 6056, for boosting security by better randomizing port selection.

Show full abstract

Our technique detects collisions in a hash function used in the said algorithm, based on sampling TCP source ports generated in an attacker-prescribed manner. These hash collisions depend solely on a per-device key, and thus the set of collisions forms a device ID that allows tracking devices across browsers, browser privacy modes, containers, and IPv4/IPv6 networks (including some VPNs). It can distinguish among devices with identical hardware and software, and lasts until the device restarts. We implemented this technique and then tested it using tracking servers in two different locations and with Linux devices on various networks. We also tested it on an Android device that we patched to introduce the new port selection algorithm. The tracking technique works in real-life conditions, and we report detailed findings about it, including its dwell time, scalability, and success rate in different network types. We worked with the Linux kernel team to mitigate the exploit, resulting in a security patch introduced in May 2022 to the Linux kernel, and we provide recommendations for better securing the port selection algorithm in the paper.

View on arXivView PDF

Code Implementations(1)

MIT

An implementation of a device tracking technique based on Algorithm 4 (Double-Hash Port Selection) of RFC 6056.

161JavaScript, GoSep 11, 20224 years agoMIT

Similar Papers

Cite this paper

@article{kol2022device,
  title  = {Device Tracking via Linux's New TCP Source Port Selection Algorithm (Extended Version)},
  author = {Moshe Kol and Amit Klein and Yossi Gilad},
  year   = {2022},
  eprint = {2209.12993},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2209.12993}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2209.12993.svg)](https://codeofpaper.com/paper/2209.12993)

Discussion