Delivery-Date: Wed, 18 Jun 2014 08:11:45 -0400
Return-Path: <tor-talk-bounces@lists.torproject.org>
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on moria.seul.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED,
	RP_MATCHES_RCVD autolearn=ham version=3.3.1
X-Original-To: archiver@seul.org
Delivered-To: archiver@seul.org
Received: from eugeni.torproject.org (eugeni.torproject.org [38.229.72.13])
	(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by moria.seul.org (Postfix) with ESMTPS id C98841E04AD
	for <archiver@seul.org>; Wed, 18 Jun 2014 08:11:43 -0400 (EDT)
Received: from eugeni.torproject.org (localhost [127.0.0.1])
	by eugeni.torproject.org (Postfix) with ESMTP id 6A52A30179;
	Wed, 18 Jun 2014 12:11:40 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by eugeni.torproject.org (Postfix) with ESMTP id 86D383017A
 for <tor-talk@lists.torproject.org>; Wed, 18 Jun 2014 12:03:51 +0000 (UTC)
X-Virus-Scanned: Debian amavisd-new at eugeni.torproject.org
Received: from eugeni.torproject.org ([127.0.0.1])
 by localhost (eugeni.torproject.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id T0z-s_AYIVyh for <tor-talk@lists.torproject.org>;
 Wed, 18 Jun 2014 12:03:51 +0000 (UTC)
Received: from posteo.de (mx02.posteo.de [89.146.194.165])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by eugeni.torproject.org (Postfix) with ESMTPS id 2BAD32FFF6
 for <tor-talk@lists.torproject.org>; Wed, 18 Jun 2014 12:03:51 +0000 (UTC)
Received: from localhost (localhost.localdomain [127.0.0.1])
 by mail.posteo.de (Postfix) with ESMTP id 8394425ACC5C
 for <tor-talk@lists.torproject.org>; Wed, 18 Jun 2014 14:03:47 +0200 (CEST)
X-Virus-Scanned: amavisd-new at posteo.de
Received: from posteo.de ([10.125.125.178])
 by localhost (amavis1.posteo.de [10.125.125.165]) (amavisd-new, port 10026)
 with ESMTP id S5vlI2UWGb3o for <tor-talk@lists.torproject.org>;
 Wed, 18 Jun 2014 14:03:42 +0200 (CEST)
Received: from mail.posteo.de (localhost [127.0.0.1])
 by mail.posteo.de (Postfix) with ESMTPSA id 16F592C011D
 for <tor-talk@lists.torproject.org>; Wed, 18 Jun 2014 14:03:41 +0200 (CEST)
Message-ID: <53A1801C.5040900@posteo.de>
Date: Wed, 18 Jun 2014 14:03:40 +0200
From: Michael Strobel <m.strobel@posteo.de>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:30.0) Gecko/20100101 Icedove/30.0
MIME-Version: 1.0
To: tor-talk@lists.torproject.org
X-Enigmail-Version: 1.6+git0.20140323
X-Content-Filtered-By: Mailman/MimeDel 2.1.15
Subject: [tor-talk] Firefox on Android - phony modification
X-BeenThere: tor-talk@lists.torproject.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: tor-talk@lists.torproject.org
List-Id: "all discussion about theory, design,
 and development of Onion Routing" <tor-talk.lists.torproject.org>
List-Unsubscribe: <https://lists.torproject.org/cgi-bin/mailman/options/tor-talk>, 
 <mailto:tor-talk-request@lists.torproject.org?subject=unsubscribe>
List-Archive: <http://lists.torproject.org/pipermail/tor-talk/>
List-Post: <mailto:tor-talk@lists.torproject.org>
List-Help: <mailto:tor-talk-request@lists.torproject.org?subject=help>
List-Subscribe: <https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk>, 
 <mailto:tor-talk-request@lists.torproject.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============6376704363009909948=="
Errors-To: tor-talk-bounces@lists.torproject.org
Sender: "tor-talk" <tor-talk-bounces@lists.torproject.org>

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--===============6376704363009909948==
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="2dvAIDBgLNxWQCv3OLlEPdEEWMWHvBktc"

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--2dvAIDBgLNxWQCv3OLlEPdEEWMWHvBktc
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi!

i was playing around with tor and firefox on android. I was following
https://guardianproject.info/apps/firefoxprivacy/ and installed all
mentioned extensions. Unfortunately when i visited EFF's panopticlick i
realized that could be tracked by browser headers since the phony
extension is quite outdated and sends a FF 19 header (or something).

I modified phony in order to mimic current tor browser which worked nice
for the user agent but not for http accept header.

Any ideas how to resolve this?
I'll attach the code and the modified phony xpi.

Best,
Michael

bootstrap.js from phony
=3D=3D=3D=3D=3D=3D=3D=3D=3D
=2E..
const prefName =3D "general.useragent.override";
const prefName_accept_def =3D "network.http.accept.default";
const prefName_accept =3D "network.http.accept";
// http accept header for tor browser 28
const http_accept_header =3D
"text/html,application/xhtml+xml,application/xml;q=3D0.9,*/*;q=3D0.8 gzip=
,
deflate en-us,en;q=3D0.5";
let gWin;

function isNativeUI() {
  let appInfo =3D
Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
  return (appInfo.ID =3D=3D "{aa3c5121-dab2-40e2-81ca-7ea25febc110}");
}

let Phony =3D {
  set useragent(value) {
    if (value){
      Services.prefs.setCharPref(prefName, value);
      Services.prefs.setCharPref(prefName_accept, http_accept_header);
      Services.prefs.setCharPref(prefName_accept_def, http_accept_header)=
;
    }
    else if (Services.prefs.prefHasUserValue(prefName)){
      Services.prefs.clearUserPref(prefName);
      Services.prefs.clearUserPref(prefName_accept);
      Services.prefs.clearUserPref(prefName_accept_def);
    }
  },
=2E..
=3D=3D=3D=3D=3D=3D=3D=3D

and

=3D=3D=3D=3D=3D=3D=3D=3D
=2E..
let uas =3D [
  ["Default", ""],
  ["Tor Browser 24", "Mozilla/5.0 (Windows NT 6.1; rv:24.0)
Gecko/20100101 Firefox/24.0"]
];
=2E...
=3D=3D=3D=3D=3D

--2dvAIDBgLNxWQCv3OLlEPdEEWMWHvBktc
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

iQIcBAEBAgAGBQJToYAcAAoJEJykIvTGvo0B6sQQAJR1B1Y0/2KuIfZ/ej+RYQ9n
1nMTRBRdJpYwVNpe3L3VOSYatZ6X+ydBrtphBD8SUWGcOf6J5+gP+upOrd3hm7zF
EZxQfztwToFiT9AhDB9iWl+IQW6x0WxIvuUttspYQfn0X5dG8mFwxbNCXfValnb7
VzqiWMS6w7mZYjfFNGTXrOlN7CBjFIPOOycabgygba3NOA+6FHdD+EhYcskTBnjq
/1TBsNvGAfnd6RBOUFiLRKrv46hvvtjrSp/Ac94gSTy+Axpr/JxeFR14/SY65Dvw
Ze/6B7aW2y9Wl9Gf7Vr0QqSY492nsfIhs5b2Jxs0B1tDx1s72wIy6av36xtsLK5m
ITXByvTtry/Zs62+o0zbJpSV6wYR0KWZmogDLPgvYz4pivuRuYyg3+HTa1kfmonR
8RFXjkzYAgXocG6KcL2tMd0Ps7YICCtC5YdQHC0wNADZW9mkYau/wxdyyMfRedyh
YIE29om8NakdzlSUv3KL9dJ9uKuud0Np5fL56s8SvrHeOofMC8HGoTO1b4LJFtuS
YqECH4b989c944CDX9MYSeid1+fQio2vMmo9CBopReZ2i/oRyuMIRQVfZA4Lem/D
GQnRynC2PPnGO2uM2aGBE6mmb3FKnB/ZOSbPEb8vXjbWLjeqkX+6WBWiqzdgZVUC
/3/FtfwUEX54Z7vFsQSg
=BqLo
-----END PGP SIGNATURE-----

--2dvAIDBgLNxWQCv3OLlEPdEEWMWHvBktc--

--===============6376704363009909948==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-- 
tor-talk mailing list - tor-talk@lists.torproject.org
To unsubscribe or change other settings go to
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-talk

--===============6376704363009909948==--

