純 CSS 的追蹤技巧

Hacker News 上看到的 PoC,程式碼就放在 GitHubjbtronics/CrookedStyleSheets 上。能追蹤的細節當然比較少,不過透過 CSS 還是有不少資訊可以蒐集。

像是連結被觸發時:

#link2:active::after {
    content: url("track.php?action=link2_clicked");
}

瀏覽器的資訊:

@supports (-webkit-appearance:none) {
    #chrome_detect::after {
        content: url("track.php?action=browser_chrome");
    }
}

字型的 fingerprint:

/** Font detection **/
@font-face {
    font-family: Font1;
    src: url("track.php?action=font1");
}

#font_detection1 {
    font-family: Calibri, Font1;
}

捲頁行為:

@keyframes pulsate {
    0% {background-image: url("track.php?duration=00")}
    20% {background-image: url("track.php?duration=20")}
    40% {background-image: url("track.php?duration=40")}
    60% {background-image: url("track.php?duration=60")}
    80% {background-image: url("track.php?duration=80")}
    100% {background-image: url("track.php?duration=100")}
}

算是提供了不少除了 <noscript></noscript> 外的手段,不過一般網站要引入這些技巧需要改不少東西就是了... (或是需要透過 server side plugin 的修改進行追蹤)

Google 對於行為分析具有壓倒性的資料

The Verge 的「Google and Facebook still dominate tracking on the web」這篇文章題到了「Online tracking: A 1-million-site measurement and analysis」這個分析報告。

現在有很多會 track 使用者行為的 javascript,或是 free cdn 服務,而報告的作者想要知道「哪個公司收集到最多最完整的資料」。

不過 The Verge 給的標題很奇怪,因為 Google 能追蹤的量遠遠超越 Facebook

Google Analytics 第一名不怎麼意外,DoubleClick 是網路上最大的廣告服務也不意外... 前五名都是 Google 的服務,後面還有一堆也都還是 Google 的服務。

EFF 的 Privacy Badger

EFF 推出新的延伸套件 (有 Firefox 與 Google Chrome 版),透過演算法阻擋嘗試追蹤你的單位:「Privacy Badger」。

在官網上有比較技術面的說明:

At a more technical level, Privacy Badger keeps note of the "third party" domains that embed images, scripts and advertising in the pages you visit. If a third party server appears to be tracking you without permission, by using uniquely identifying cookies to collect a record of the pages you visit across multiple sites, Privacy Badger will automatically disallow content from that third party tracker. In some cases a third-party domain provides some important aspect of a page's functionality, such as embedded maps, images, or fonts. In those cases Privacy Badger will allow connections to the third party but will screen out its tracking cookies.

技術上的作法是分析 third party domain 的行為,用演算法阻擋可能的追蹤。與 Ghostery 這類工具使用人力建立清單的方法不太一樣。

裝起來跑看看,感覺還蠻有趣的...