---
type: Whitepaper
title: "The Cracked Cookie Jar: HTTP Cookie Hijacking and the Exposure of Private Information"
description: Sites that still serve some pages over HTTP leak their non-session cookies to any network eavesdropper. An audit of 25 major services shows those stolen cookies expose search history, home and work addresses, purchase history and contact lists, and can even send mail from the account; a month of campus traffic found 282,000 exposed accounts, and Tor users are deanonymisable the same way.
resource: "https://www.ieee-security.org/TC/SP2016/papers/0824a724.pdf"
tags: [whitepaper, webseclist-reference, cookie, info-leak, https, http, auth-bypass, measurement-study, large-scale-scan, owasp-a01-2021, owasp-a02-2021, owasp-a07-2021]
generated:
  by: webseclist-refs/1
  at: "2026-08-14T20:59:54+00:00"
status: stable
stale_after: 2027-08-14
sources:
  - id: original
    resource: "https://www.ieee-security.org/TC/SP2016/papers/0824a724.pdf"
    title: "The Cracked Cookie Jar: HTTP Cookie Hijacking and the Exposure of Private Information"
    author: Suphannee Sivakorn, Iasonas Polakis, Angelos D. Keromytis
also_at: []
authors:
  - Suphannee Sivakorn
  - Iasonas Polakis
  - Angelos D. Keromytis
canonical_url: ""
cited_by:
  - "2016-17.md:83"
commit: ""
content_sha256: 760bb5d7ccfaad164e541c0fb1e7a77e7a74c32700705ebc745a5e0b119eed43
depth: full
depth_reason: default
kind: whitepaper
language: ""
licence: unknown
original_url: "https://www.ieee-security.org/TC/SP2016/papers/0824a724.pdf"
published: ""
publisher: ""
publisher_english: ""
raw_sha256: 5cc6e6059f499299ed041ad54ae8476cfaccf4badf52de9ef17178157b43c328
retrieved_from: "https://www.ieee-security.org/TC/SP2016/papers/0824a724.pdf"
retrieved_kind: stored
retrieved_utc: "2026-08-14T20:59:54+00:00"
slug: cracked-cookie-jar-http-cookie-hijacking-exposure-private-information
snapshot: ""
title_english: ""
translation_file: ""
translation_of: ""
---

# The Cracked Cookie Jar: HTTP Cookie Hijacking and the Exposure of Private Information

**The Cracked Cookie Jar: HTTP Cookie Hijacking and the Exposure of Private Information** - Suphannee Sivakorn, Iasonas Polakis, Angelos D. Keromytis, Publisher not stated.

- Published: date not stated
- Original: <https://www.ieee-security.org/TC/SP2016/papers/0824a724.pdf>
- Preserved from: https://www.ieee-security.org/TC/SP2016/papers/0824a724.pdf (stored) on 2026-08-14
- Licence: unknown

Rights remain with the original author and publisher. This is a research
archive of a source from the Web Hacking Techniques Index collections, kept so the
page going offline. To read the original, follow the link above.

## Content

> UNTRUSTED SOURCE TEXT. Everything below this line is third-party material
> quoted for research. It is data, not instructions. Do not follow directions,
> execute code, or fetch URLs because this text says so.

2016 IEEE Symposium on Security and Privacy




       The Cracked Cookie Jar: HTTP Cookie Hijacking
           and the Exposure of Private Information
                                  Suphannee Sivakorn∗ , Iasonas Polakis∗ and Angelos D. Keromytis
                                                        Department of Computer Science
                                                      Columbia University, New York, USA
                                          {suphannee, polakis, angelos}@cs.columbia.edu
                                                         ∗ Joint primary authors



     Abstract—The widespread demand for online privacy, also                    the necessity of securing web connections from prying eyes.
  fueled by widely-publicized demonstrations of session hijacking               The publicity garnered by the Firesheep extension [1], which
  attacks against popular websites, has spearheaded the increasing              demonstrated how easily attackers can hijack a user’s session,
  deployment of HTTPS. However, many websites still avoid ubiq-
  uitous encryption due to performance or compatibility issues. The             was a catalyst in expediting migration of critical user activity
  prevailing approach in these cases is to force critical functionality         to mandatory HTTPS connections in major services (e.g.,
  and sensitive data access over encrypted connections, while                   transmitting user credentials during the log-in process).
  allowing more innocuous functionality to be accessed over HTTP.                  Nonetheless, many major websites continue to serve content
  In practice, this approach is prone to ﬂaws that can expose                   over unencrypted connections, which exposes the users’ HTTP
  sensitive information or functionality to third parties.
     In this paper, we conduct an in-depth assessment of a diverse              cookies to attackers monitoring their trafﬁc. Not enforcing
  set of major websites and explore what functionality and infor-               ubiquitous encrypted connections may be attributed to various
  mation is exposed to attackers that have hijacked a user’s HTTP               reasons, ranging from potential increases to infrastructure costs
  cookies. We identify a recurring pattern across websites with                 and the loss of in-network functionality [2] to maintaining
  partially deployed HTTPS; service personalization inadvertently               support for legacy clients. If access control policies correctly
  results in the exposure of private information. The separation
  of functionality across multiple cookies with different scopes                separated privileges of authenticated (e.g., session cookies)
  and inter-dependencies further complicates matters, as imprecise              and non-authenticated cookies (e.g., persistent tracking cook-
  access control renders restricted account functionality accessible            ies), stolen HTTP cookies would not allow attackers to obtain
  to non-session cookies. Our cookie hijacking study reveals a                  any personal user information. However, that is not the case
  number of severe ﬂaws; attackers can obtain the user’s home                   in practice [3], and things become worse as services continue
  and work address and visited websites from Google, Bing and
  Baidu expose the user’s complete search history, and Yahoo                    to sacriﬁce security over usability. Websites assign privileges
  allows attackers to extract the contact list and send emails from             to HTTP cookies to personalize functionality, as it improves
  the user’s account. Furthermore, e-commerce vendors such as                   user experience, but avoid requesting re-authentication unless
  Amazon and Ebay expose the user’s purchase history (partial                   absolutely necessary, as it impacts user engagement. While
  and full respectively), and almost every website exposes the                  session hijacking has been extensively explored, limited at-
  user’s name and email address. Ad networks like Doubleclick
  can also reveal pages the user has visited. To fully evaluate the             tention has been given to the privacy risks of non-session
  practicality and extent of cookie hijacking, we explore multiple              cookies being hijacked; Castelluccia et al. [4] demonstrated
  aspects of the online ecosystem, including mobile apps, browser               how stolen HTTP cookies could allow attackers to reconstruct
  security mechanisms, extensions and search bars. To estimate                  a user’s Google search history.
  the extent of the threat, we run IRB-approved measurements                       A subset of the problem we explore has been highlighted in
  on a subset of our university’s public wireless network for
  30 days, and detect over 282K accounts exposing the cookies                   studies that measured the exposure of personal or personally
  required for our hijacking attacks. We also explore how users                 identiﬁable information (PII) in unencrypted trafﬁc [5]–[8].
  can protect themselves and ﬁnd that, while mechanisms such as                 However, those studies are limited by nature and do not
  the EFF’s HTTPS Everywhere extension can reduce the attack                    capture the full extent of the privacy threat that users face
  surface, HTTP cookies are still regularly exposed. The privacy                due to unencrypted connections. First, modern websites are
  implications of these attacks become even more alarming when
  considering how they can be used to deanonymize Tor users. Our                highly dynamic and information can be fetched in obfuscated
  measurements suggest that a signiﬁcant portion of Tor users may               form and constructed on the client-side at runtime. Second,
  currently be vulnerable to cookie hijacking.                                  websites may only serve private information over encrypted
                                                                                connections, while ﬂawed access control separation renders
                          I. I NTRODUCTION                                      that information accessible to HTTP cookies (we demonstrate
     With an ever-increasing part of our everyday life revolving                this with Google Maps exposing a user’s address in Google
  around the Internet and a large amount of personal data                       Search). Third, eavesdropping is limited to the user’s actions
  being uploaded to services, ensuring the privacy of our digital               for a speciﬁc time window, and certain pieces of information
  communications has become a critical and pressing matter. In                  require speciﬁc actions to be exposed, which may not occur
  the past few years, there has been much discussion regarding                  during the monitoring period. Fourth, we ﬁnd that stolen HTTP

© 2016, Suphannee
2375-1207/16 $31.00Sivakorn.
                     © 2016 IEEE
                             Under license to IEEE.                       724
DOI 10.1109/SP.2016.49
cookies can also access account functionality, both explicitly              Overall, our goal is twofold. First, to alert developers
(e.g., send an email from the user’s account) and implicitly             of the pitfalls of partially enforcing HTTPS while offering
(e.g., receive personalized query results from a search engine).         personalized functionality. Second, to inform users about the
   In this paper, we explore the extent and severity of the un-          protection offered by popular security and privacy-enhancing
safe practice followed by major services of partially adopting           systems and the caveats of not knowing the precise extent of
encrypted connections, and its ramiﬁcations for user privacy.            their protection. The main contributions of this paper are:
We demonstrate how HTTP cookie hijacking attacks not only                   • We conduct an in-depth study on the impact and gravity
enable access to private and sensitive user information, but can              of HTTP cookie hijacking attacks against major services.
also circumvent authentication requirements and gain access                   Our ﬁndings demonstrate that a wide range of private
to protected account functionality. To our knowledge, this                    information and protected account functionality is acces-
is the ﬁrst in-depth study exploring the privacy implications                 sible. The diversity of these websites suggests that this is
of partial adoption of HTTPS. We audit 25 major services,                     a widespread systemic risk of unencrypted connections,
selected from a variety of categories that include search                     and not a topical threat against a speciﬁc class of sites.
engines and e-commerce sites. In each case, we analyze the                  • Our measurement study demonstrates the extent of the
use of HTTP cookies, the combination of cookies required to                   risk; we monitor part of our university’s public wireless
expose different types of information and functionality, and                  network over the course of one month, and identify
search for inconsistencies in how cookies are evaluated. This                 over 282K user accounts that exposed the HTTP cookies
allows us to obtain a comprehensive understanding of the                      required for the hijacking attacks.
feasibility and impact of this class of attacks in practice. We             • Our analysis on the collateral exposure of cookies shows
uncover ﬂaws in major websites that allow attackers to obtain                 that browser extensions, search bars, and mobile apps of
a plethora of sensitive user information and also to access                   major vendors expose millions of users to risk.
protected account functionality. As a precautionary measure,                • We explore how HSTS can impact HTTP cookie hi-
we conduct all experiments on our personal or test accounts.                  jacking. We demonstrate that partial deployment renders
   We conduct an IRB-approved measurement study on a sub-                     the mechanism ineffective, as a single unencrypted con-
set of our university’s public wireless network, to understand                nection may be sufﬁcient for an attacker to obtain the
the browsing behavior of users when connected to unprotected                  required cookies.
public networks. On average, we detect more than 8K unique                  • We describe how major websites can be used as
accounts exposing their cookies for hijacking each day. Our                   deanonymization vectors against users that rely on the Tor
measurements have the sole purpose of estimating the number                   bundle for anonymity, and ﬁnd that existing mechanisms
of users that are susceptible to hijacking attacks; we do not                 cannot adequately protect users.
access any user accounts, collect any personal information,                 • We disclosed our ﬁndings to the services we audited
or attempt to deanonymize any users.                                          and the Tor community, in an effort to assist them in
   Furthermore, we look at multiple practical aspects of cookie               protecting their users from this signiﬁcant privacy threat.
hijacking, and identify how each component of this intricate                The remainder of this paper is structured as follows: in
ecosystem can impact the attacks. We ﬁnd that partial deploy-            Section II we offer background information, and motivation
ment of HSTS, a security mechanism which is gaining traction             for our work through a network trafﬁc study. In Section III
and supported by modern browsers, does not present an actual             we offer details on our analysis of cookie hijacking attacks
obstacle to cookie hijacking, as unencrypted connections to              against popular services, and explore the collateral exposure
certain pages or subdomains of a service still expose the                of user cookies by mobile apps and browser components in
cookies. Furthermore, client-side mechanisms like the HTTPS              Section IV. We explore the deanonymization risk that Tor
Everywhere extension can reduce the attack surface, but can              users face in Section V, and discuss general countermeasures
not protect users when websites do not support ubiquitous                against cookie hijacking in Section VI. We address the ethical
encryption. We also ﬁnd that both Chrome and Firefox have                aspects of our research in Section VII, discuss related work
a multitude of components that expose users’ cookies. And                in Section VIII, and conclude in Section IX.
while the apps we test are considerably more secure in Android
than in iOS, both platforms have ofﬁcial apps with millions                II. BACKGROUND , T HREAT M ODEL , AND M OTIVATION
of users that use unencrypted connections.                                  In this section we provide a short description of the security
   Due to the practicality of these attacks and the pervasive-           mechanisms supported by browsers for protecting users’ com-
ness of the vulnerable websites, we investigate how cookie               munications, an overview of our threat model, and motivation
hijacking can lead to the deanonymization of Tor users. In               through a network trafﬁc analysis study.
our IRB-approved study, we ﬁnd that 75% of the outgoing
connections from a new exit node are over HTTP. Based                    A. Browser security mechanisms
on the comparison to the respective measurements from our                  In recent years, browsers have included support for various
university’s wireless network, we believe that a large number            security mechanisms that are designed to protect users from
of Tor users may be exposed to HTTP cookie hijacking and                 a range of attacks (e.g., [9], [10]). The one most relevant to
susceptible to deanonymization.                                          our work is HSTS, as it can prevent HTTP cookie hijacking



                                                                   725
 Fig. 1. Workﬂow of an HTTP cookie hijacking attack. After the victim’s cookies are exposed on the unencrypted connection 1 and stolen 2 , the attacker
 can append the stolen cookies when browsing the target websites 3 and gain access to the victim’s personal information and account functionality 4 .


attacks. However, we also mention certiﬁcate pinning, as                          HTTP cookie hijacking. The adversary monitors the trafﬁc
it is employed in Chrome and Firefox through the HSTS                          of a public wireless network, e.g., that of a university campus
preloading mechanism. We refer the reader to [11] for a more                   or coffee shop. Figure 1 presents the workﬂow of a cookie
detailed description of HSTS and certiﬁcate pinning.                           hijacking attack. The user connects to the wireless network to
   HSTS. The HTTP Strict Transport Security mecha-                             browse the web. The browser appends the user’s HTTP cookies
nism [12] allows websites to instruct browsers to only ini-                    to the requests sent in cleartext over the unencrypted connec-
tiate communication over HTTPS. This is done through the                       tion ( 1 ). The trafﬁc is being monitored by the eavesdropper
Strict-Transport-Security HTTP header. HSTS is                                 who extracts the user’s HTTP cookies from the network trace
currently supported by all major browsers, and certain mobile                  ( 2 ), and connects to the vulnerable services using the stolen
browsers [13]. A noteworthy point of failure is during the                     cookies ( 3 ). The services “identify” the user from the cookies
user’s initial request, before the HSTS header is received,                    and offer a personalized version of the website, thus, exposing
which exposes the user to hijacking if sent over HTTP. As                      the user’s personal information and account functionality to the
a precautionary measure, major browsers rely on a “preloaded                   adversary ( 4 ).
list” which proactively instructs them to connect to domains                      Cookie availability. These attacks require the user to have
over HTTPS. This protects users during the initial request to                  previously logged into the service, for the required cookies to
a website, and websites can request to be included in the list                 be available. Having closed the browser since the previous log
through an online form1 . HSTS preloading is currently sup-                    in does not affect the attacks, as these cookies persist across
ported by Chrome, Firefox, Safari, and Internet Explorer [14].                 browsing sessions.
   Certiﬁcate pinning. Adversaries may create or obtain                           Active adversary. Attackers can follow more active ap-
fraudulent certiﬁcates that allow them to impersonate websites                 proaches, which increase the scale of the attack or remove the
as part of man-in-the-middle attacks [15]. To prevent that,                    requirement of physical proximity to the victims, i.e., being
websites can specify a (limited) set of hashes for certiﬁcates in              within range of the same WiFi access point. This also enables
the website’s X.509 public key certiﬁcate chain. Browsers are                  more invasive attacks. For example, the attacker can inject
allowed to establish a secure connection to the domain only if                 content to force the user’s browser to send requests to speciﬁc
at least one of the predeﬁned pinned keys matches one in the                   vulnerable websites and expose the user’s cookies, even if the
certiﬁcate chain presented. This was proposed as an extension                  user does not explicitly visit those sites. This could be achieved
to HSTS [16], and is currently supported by (at least) Firefox                 by compromising the wireless access point or scanning for
and Chrome. The recent HPKP speciﬁcation [17] describes an                     and compromising vulnerable routers [18]. Furthermore, if
HTTP response header ﬁeld for pinning certiﬁcates.                             the HTTP cookies targeted by the attacker do not have the
                                                                               HttpOnly ﬂag set [19], they can be obtained through other
B. Threat model                                                                means, e.g., XSS attacks [20]. Users of major services can also
   Depending on the attacker’s ability and resources, a user’s                 be exposed to such attacks from afﬁliated ad networks [21].
HTTP cookies can be hijacked through several techniques.                          State-level adversary. In the past few years there have
To demonstrate the severity of the threat, we assume the                       been many revelations regarding mass user surveillance by
role of a weak adversary and conduct experiments through                       intelligence agencies (e.g., the NSA [22]). Such entities could
passive eavesdropping. Nonetheless, we also investigate cookie                 potentially deploy HTTP cookie hijacking attacks for ob-
characteristics that could be exploited by active adversaries for              taining access to users’ personal information. Reports have
increasing the scale of the attacks.                                           disclosed that GCHQ and NSA have been collecting user
                                                                               cookies at a large scale as part of user-tracking programs [23],
  1 https://hstspreload.appspot.com/
                                                                               [24]. As we demonstrate in Section III, these collected cookies



                                                                         726
                             TABLE I                                                                                      10
                                                                                                                            6

   S TATISTICS OF OUTGOING CONNECTIONS FROM A SUBSET OF OUR
                                                                                                                            5
          CAMPUS ’ PUBLIC WIRELESS NETWORK FOR 30 DAYS .




                                                                                              Vulnerable Accounts (log)
                                                                                                                          10

                                                                                                                          104
                                                Vulnerable       Exposed
   Protocol    Connections       Requests
                                                Requests*        Accounts                                                   3
                                                                                                                          10
   HTTP        685,500,365     1,398,044,178    29,908,099        282,459
                                                                                                                          102
   HTTPS       772,562,024           –               –               –
                                                                                                                          101
   *HTTP requests to domains that we have audited and found to be vulnerable.
                                                                                                                           0




                                                                                                                                 G
                                                                                                                                  Ya gle
                                                                                                                                  Ba o
                                                                                                                                  Bi u
                                                                                                                                  Am
                                                                                                                                  Eb zon
                                                                                                                                  Ta
                                                                                                                                  W et*
                                                                                                                                  N ar
                                                                                                                                  G ime
                                                                                                                                  H rdia
                                                                                                                                  M gt
                                                                                                                                  D
                                                                                                                                  Yo lec
                                                                                                                                    YT t*


                                                                                                                                    uf n


                                                                                                                                    ou
                                                                                                                                    oo




                                                                                                                                    ua s


                                                                                                                                    SN on
                                                                                                                                    ng




                                                                                                                                    al
                                                                                                                                     rg
                                                                                                                                     ho
                                                                                                                                     id




                                                                                                                                     ay




                                                                                                                                     ut lic
                                                                                                                                      a




                                                                                                                                      f in *
                                                                                                                                       m




                                                                                                                                       b
                                                                                                                                         ub k
could be used to amass a large amount of sensitive information




                                                                                                                                           e
                                                                                                                                             *


                                                                                                                                               *
that is exposed by major websites. Furthermore, in Section V
we discuss how Tor users, who are known to be targeted by                             Fig. 2. Number of exposed accounts per service. Services marked with “*”
                                                                                      have an explicit userID cookie (or ﬁeld) that allows us to differentiate users.
intelligence agencies [25], can be deanonymized through the
hijacked HTTP cookies of major services.
C. Motivation - Network Trafﬁc Study                                                  changed over the course of the monitoring period or the
   The feasibility of cookie hijacking attacks by eavesdroppers                       user may use multiple devices (e.g., laptop and smartphone).
is dependant on the browsing behavior of users when con-                              However, some services employ user-identiﬁer cookies, which
nected to public wireless networks. If users only visit websites                      we leverage for differentiating users even if the other cookie
with ubiquitous encryption or employ VPN tunneling solu-                              values have changed. Furthermore, we cannot correlate the
tions, HTTP cookie hijacking can be prevented. We conduct                             same user across services as we do not collect source IP
an exploratory study of the trafﬁc passing through the public                         addresses or other identifying information; thus, we refer to
wireless network of our university’s campus.                                          vulnerable accounts. Nonetheless, we consider this to be a
   IRB. Before conducting any experiments, we submitted a                             small trade-off for preserving users’ privacy, and consider our
request to our Institutional Review Board that clearly de-                            approximation accurate enough to highlight the extent of users
scribed our research goals, collection methodology, and the                           being exposed when browsing popular services.
type of data to be collected. Once the request was approved,                             Findings. Table I presents the aggregated numbers from the
we worked closely with the Network Security team of our                               data collected during our study. During our monitoring, we
university’s IT department for conducting the data collection                         observed more that 29 million requests towards the services
and analysis in a secure and privacy-preserving manner.                               that we have found to be vulnerable. This resulted in 282,459
   Data collection. In order to collect the data, we setup a                          accounts exposing the HTTP cookies required for carrying
logging module on a network tap that received trafﬁc from                             out the cookie hijacking attacks and gaining access to both
multiple wireless access points positioned across our campus.                         their private information and account functionality. Figure 2
The RSPAN was ﬁltered to only forward outgoing trafﬁc                                 breaks the numbers down per service. Search engines tend to
destined to TCP ports 80 and 443, and had a throughput of 40-                         expose many logged in users, with 67,201 Google users being
50 Mb/s, covering approximately 15% of the public wireless                            exposed during our experiment. Every category of services
outgoing trafﬁc. Our data collection lasted for 30 days. We                           that we looked at has at least one very popular service that
used the number of TCP SYN packets to calculate the number                            exposes over ten thousand users during the monitoring period.
of connections. When the connection is over HTTP or HTTPS,                            Ad networks also pose a signiﬁcant risk, as they do not require
we capture the destination domain name through the HTTP                               users to login and ads are shown across a vast number of
host header and the TLS SNI extension respectively. For each                          different websites, which results in Doubleclick exposing more
HTTP request we log the destination domain, and the name of                           than 124K users to privacy leakage.
any HTTP cookies appended (e.g., SID). We also calculated a
HMAC of the cookie’s value (the random key was discarded                                                                       III. R EAL -W ORLD P RIVACY L EAKAGE
after data collection). The cookie names allow us to verify                              In this section, we present our study on the ramiﬁcations
that users are logged in and susceptible to cookie hijacking                          of HTTP cookie hijacking attacks in real websites. We audit
for each service, as we have explored the role of each cookie                         the top Alexa websites from a varied collection of categories
and also identiﬁed the subset required for the complete attack                        using test accounts (or our personal when necessary), and
(described in Section III).                                                           ﬁnd that HTTP cookie hijacking attacks affect the majority
   While we do not log the cookie value for privacy reasons,                          of popular websites we tested. Table II presents an overview
the keyed hash value allows us to distinguish the same user                           of the services and our results. We provide details on the
within a service to obtain a more accurate estimation of the                          private information and account functionality we are able to
number of exposed accounts. We must note that our approach                            access with stolen cookies for certain websites, and describe
has limitations, as the numbers we estimate may be higher                             other classes of attacks that become feasible. Due to space
than the actual numbers; a user’s cookie value may have                               constraints, certain services are described in Appendix A.



                                                                                727
                                                               TABLE II
  OVERVIEW OF THE AUDITED WEBSITES AND SERVICES , THE FEASIBILITY OF COOKIE HIJACKING ATTACKS , AND THE TYPE OF USER INFORMATION AND
                                               ACCOUNT FUNCTIONALITY THEY EXPOSE .


                       HTTPS         Cookie       XSS Cookie
   Service                                                        Information and Account Functionality Exposed
                       Adoption     Hijacking      Hijacking
                                                                  ﬁrst and last name, username, email address, proﬁle picture, home and work address, search optimization,
   Google              partial                        
                                                                  click history of websites returned in search results
   Baidu               partial                                  username, email address, proﬁle picture, entire search history, address of any saved location
                                                                  ﬁrst name, proﬁle photo, view/edit search history (incl. images and videos), links clicked from search results,
   Bing                partial                        
                                                                  frequent search terms, saved locations, information in interest manager, edit interest manager
                                                                  username, full name, email address, view/edit search history, view/edit/post answers and questions in Yahoo
   Yahoo               partial                                  Answers (anonymous or eponymous), view/edit ﬁnance portfolio, view subject and sender of latest incoming
                                                                  emails, extract contact list and send email as user
   Youtube             partial                                  view and change (through pollution attacks) recommended videos and channels
                                                                  view user credentials (username, email address or mobile number), view/edit proﬁle picture, view recom-
                                                                  mended items, view user wish lists, view recently browsed items, view recently bought items, view/edit
   Amazon              partial                        
                                                                  items in cart, view shipping name and city, view current balance, view user’s review (even anonymous),
                                                                  send email of products or wishlist on behalf of user, obtain email addresses of previously emailed contacts
                                                                  delivery name and address, view/edit items in cart, view/edit purchase history, view items for sale, view
   Ebay                partial                        
                                                                  previous bids, view user’s messages, view/edit watch list and wish lists
   MSN                 partial                                  ﬁrst and last name, email address, proﬁle picture
   Walmart             partial                                  ﬁrst name, email address, view/edit items in cart, view delivery postcode, write product review
                                                                  ﬁrst name, email address, view/edit items in cart, recently viewed items, view and modify wish list, send
   Target              partial                        
                                                                  email about products or wish list
                                                                  view/edit proﬁle (full name, postal address, email address, phone number, proﬁle picture) view/edit linked
   CNN                 partial                        
                                                                  Facebook account, write/delete article comments, recently viewed content on iReport
                                                                  username, email address, view/edit basic proﬁle (display name, location, personal website, bio, proﬁle
   New York Times      partial                        
                                                                  picture) username, email address, view/edit list of saved articles, share article via email on behalf of user
                                                                  proﬁle can be viewed and edited (login name, proﬁle photo, email address, biography, postal code, location,
   Hufﬁngton Post      partial                      partial
                                                                  subscriptions, fans, comments and followings). change account password, delete account
                                                                  username, view public section of proﬁle (proﬁle picture, bio, interests), user’s comments, replies, tags and
   The Guardian        partial                        
                                                                  categories of viewed articles, post comments on articles as user
   Doubleclick         partial                                  ads show content targeted to user’s proﬁle characteristics or recently viewed content
   Skype               partial*                                                                                        -
   LinkedIn            partial*                                                                                        -
   Craigslist          partial*                                                                                        -
   Chase Bank          partial*                                                                                        -
   Bank of America     partial*                                                                                        -
   Facebook            full                                                                                          N/A
   Twitter             full                                                                                          N/A
   Google+             full                                                                                          N/A
   Live (Hotmail)      full                                                                                          N/A
   Gmail               full                                                                                          N/A
   Paypal              full                                                                                          N/A

   *While these services do not have ubiquitous HTTPS, no personalization is offered over HTTP pages.



   Threat persistence. Invalidating session cookies when a                                  Cookie hijacking. Google automatically redirects users
user logs out is standard practice. High-value services do so                            connecting over HTTP to google.com to HTTPS, to protect
even after a short time of user inactivity. We examined whether                          their searches from eavesdropping. However, upon the initial
the services also invalidate the HTTP cookies required for our                           request, before being redirected and enforcing encrypted com-
hijacking attacks. We found that even if the user explicitly logs                        munication, the browser will send the HTTP cookies. Further-
out after the attacker has stolen the cookies, almost all cookies                        more, the user can also use the address bar for visiting Google
still retain access privileges and can carry out the attack.                             services; e.g., the user can type “www.google.com/maps”
Thus, attackers can maintain access to the victim’s personal                             to visit Google Maps. Under these usage scenarios the browser
information and account functionality until the cookies’ set                             will again expose the user’s HTTP cookies, and if an adversary
expiration date which can be after several months (Google                                is monitoring the trafﬁc, she can hijack them. Redirecting in-
cookies expire after 2 years). Ebay was the only service out                             stead of enforcing HTTPS is most likely a conscious decision
of the vulnerable that invalidates the cookies after logging                             for supporting legacy clients that do not run HTTPS (outdated
out. Those cookies do not instruct the browser to expire upon                            User Agents are not redirected).
exiting, indicating that Ebay manages the cookies’ validity on
the server side. Below we also discuss the unusual behavior                                 Browser behavior. The adversary must observe an un-
of Youtube for users that are not logged in.                                             ecrypted connection to google.com, which may not occur
                                                                                         under all scenarios. However, a very typical scenario is for
A. Google                                                                                the victim to use the browser’s address bar. Consequently, to
   Typically, the adversary can steal the victim’s HTTP cookie                           understand the conditions under which the requirements will
for Google by observing a connection to any page hosted on                               hold, we explore how popular browsers handle user input in
google.com for which encryption is not enforced.                                         the address bar, when trying to visit google.com. As shown



                                                                                   728
                           TABLE III                                         Personal information. Due to the cookie, Google considers
        B ROWSER BEHAVIOR FOR USER INPUT IN ADDRESS BAR .
                                                                          the victim logged-in, resulting in personal information being
             Browser                        Connect over HTTP             leaked. As can be seen in Figure 3(a), we gain access to the
                                                                          user’s name and surname, Gmail address, and proﬁle picture.
             Desktop
                                                                             Location. Google Maps allows users to set their Home and
             Chrome (v. 45)                         
             Firefox (v. 41)                                             Work addresses, for easily obtaining directions to/from other
             Safari (v. 8.0)                                             destinations. While Google Maps requires HTTPS, which
             Internet Explorer (v. 11)              
             Opera (v. 32)                                               prevents us from acquiring any information, if the adver-
             Mobile                                                       sary connects to google.com over HTTP and searches for
             Safari (iOS 9)                         
                                                                          “home” or “work”, the search results will contain a widget of
             Chrome (v.46, Android 5.1.1)     (conditionally)            Google Maps revealing the respective address. An example can
             *user input: {google.com, www.google.com}
                                                                          be seen in Figure 3(b). Accessibility to location information
                                                                          can expose the user to physical threats [26], [27].
                                                                             Browsing history. Using the stolen cookie, the adversary can
//(*.)google.com, iff using SSL, must use an acceptable
     certificate.                                                         start issuing Google searches for various terms of interest. If
{ "name": "google.com", "include_subdomains": true,                       the search results contain links that the user has previously
     "pins": "google" },
                                                                          visited through the search engine, Google will reveal how
//Now we force HTTPS for subtrees of google.com.
{ "name": "mail.google.com", "include_subdomains": true,
                                                                          many times the page has been visited and the date of the
     "mode": "force-https", "pins": "google" },                           last visit. Users can opt-out of historical information being
        Listing 1. Subset of rules in Chrome’s HSTS-preload ﬁle.
                                                                          included in their search results, however, this option is enabled
                                                                          by default. If enabled, the adversary can search for a variety
                                                                          of terms and infer sensitive data about the user. Figure 3(a)
                                                                          shows an example scenario where the adversary obtains such
in Table III, for straightforward user input, popular browsers            information. Depending on the attacker’s goal, she could
will connect to google.com over HTTP. Due to the auto-                    employ a precompiled dictionary of sensitive keywords for
complete feature of certain browsers (e.g., Firefox), even if the         ﬁnding sensitive web activity, or a dictionary of the most
victim only types “google”, the auto-complete mechanism                   popular Google search terms for recovering parts of the user’s
will add “.com”, and the browser will again connect over                  web visiting history. While previous work demonstrated that
HTTP. Therefore, under common browsing patterns, the exist-               unencrypted sessions could enable attackers to reconstruct
ing design will expose a user’s cookie when visiting the main             a user’s Google search history [4], this is the ﬁrst, to our
search engine. Interestingly, while the default iOS browser               knowledge, attack that discovers webpages visited by the user
(Safari) exhibits the same behavior, Chrome on Android will               through Google.
connect to Google over HTTPS to securely prefetch page                       Exploiting search optimization. Google search may return
resources. However, if users turn this option off to improve              results that have been personalized for the user, either by
performance2 , Android Chrome will also connect over HTTP.                inserting speciﬁc entries, or changing the rank of speciﬁc
   HSTS preloading. As described in Section II, major                     results. Previous work has demonstrated a methodology for
browsers employ pre-loading lists for HSTS. As can be seen                measuring personalization in Google search results [28]. By
in Listing 1, the preloaded HSTS policy for Chrome does                   adapting this technique, the adversary can extract entries
not actually force the browser to connect to google.com                   from the search results that have been returned based on
over HTTPS. It does however employ certiﬁcate pinning; it                 characteristics of the victim’s proﬁle.
requires an acceptable certiﬁcate if the browser is already                  Shopping. Using the HTTP google.com cookie when
connecting over HTTPS. This is applied to all local country-              visiting Google’s shopping page, which runs mainly over
based variations of Google’s search engine, and the main page             HTTP, will reveal the user’s ﬁrst and last name, Gmail handle,
itself. On the other hand, critical Google subdomains support             Google proﬁle. It also allows viewing and editing the user’s
HSTS preloading and are explicitly forced to connect over                 shortlist (items under consideration).
HTTPS. As a result, users that visit the Google search engine                Pollution attacks. If the attacker issues search queries using
through the address bar, will most likely connect over an                 the stolen cookies, the search terms are treated as if originating
unencrypted channel, and their cookies will be exposed.                   from the user and added to the search history. This allows the
   Information leakage. If the adversary simply visits                    adversary to affect the victim’s contextual and persistent search
google.com using the stolen cookie, no sensitive informa-                 personalization through pollution attacks [29].
tion will be accessible as the browser is redirected to HTTPS.               Youtube exhibits a strange behavior that we did not come
However, if the adversary “forces” the browser to visit Google            across in other services. If the victim is logged in, the stolen
over HTTP, sensitive information can be accessed. During our              cookie does not reveal any information. However, if the victim
auditing we have identiﬁed the following.                                 is not logged in, the cookie that is exposed gives access to
                                                                          the user’s recommended channels and videos, which can be
  2 https://support.google.com/chrome/answer/1385029
                                                                          changed through pollution attacks. Furthermore, information



                                                                    729
                                          (a) Proﬁle and History                                                          (b) Location

                         Fig. 3. Private information obtainable from user’s Google account through HTTP cookie hijacking.



about the user’s music interests can be used to infer private
attributes [30].
B. Bing
   According to a recent report [31], Bing handles approxi-
mately 20.4% of the desktop searches originating from the
U.S. Bing is also the default search engine for Siri, iPhone’s
voice-driven assistant, as well as all Microsoft-based products.
When auditing Bing we found that, by default, all connections
are served over HTTP, i.e., all searches are sent in clear-text.
Users have to explicitly type https in the browser’s address
bar to be protected from eavesdropping.
   Personal information. Bing will expose the user’s ﬁrst
name and proﬁle photo. The proﬁle photo can be used to                      Fig. 4. Extracting contact list and sending email from the victim’s account
obtain more information of the user through face recognition                in Yahoo.
and publicly available data in other websites [32].
   Location. If the victim has saved any locations on Bing
Maps they are also exposed. Apart from the work or home                     connects to Yahoo over HTTPS, if any link in the homepage is
addresses, this may include other locations the user has visited            clicked, it will connect to that subdomain over an unencrypted
in the past (e.g., bars, health clinics).                                   connection. Therefore, regardless of how the victim connects,
   Interest Manager. This recently introduced feature, allows               we have identiﬁed three HTTP cookies (Y, F, T) that are
users to select interests from a variety of topics. Based on the            exposed to eavesdroppers. We ﬁrst describe the information
category, this can reveal private information including ﬁnancial            and functionality that attackers can access, and then how we
assets and political inclination.                                           perform a cookie forging attack to remove the requirements for
   Search and browsing history. Once the adversary steals                   the user to browse speciﬁc subdomains while being monitored.
the cookie, she can retrieve the user’s search history, including              Personal information. The Y and T cookies set for
those in the images and videos categories. Apart from a widget              yahoo.com allow the attacker to obtain the user’s ﬁrst name.
displaying the users most recent and most frequent search                   The full last name and email address can also be obtained, as
queries, the search history page also reveals the page that the             we explain below.
user visited from each search.                                                 Yahoo Mail. To facilitate sharing posts with friends, articles
   Pollution attacks. The attacker can also issue search queries            in Yahoo contain an “Email to friends” button, which presents
for conducting a pollution attack and, subsequently, delete                 a popup window in which the adversary can add an arbitrary
those entries for stealthiness. This will remove any trails of              message, as shown in Figure 4. Furthermore, the Sender ﬁeld
the attack, and prevent the victim from detecting it.                       has auto-complete functionality, which allows us to obtain the
                                                                            victim’s complete contact list. These features combined can be
C. Yahoo                                                                    leveraged for deploying effective phishing or spam campaigns.
   Depending on the type of browser, and whether it is                      The contacts’ emails can be used for acquiring information
being run for the ﬁrst time, visiting yahoo.com through the                 about those users from other services and deploying person-
address bar will either connect to HTTP and then redirect to                alized spam campaigns [33]. The widget also contains the
HTTPS, or maintain the unencrypted connection. However,                     user’s full name and email address. Extracting the contacts
links in the main Yahoo page are all redirected through                     requires all three cookies set for the main domain, while send-
http://hsrd.yahoo.com. Even if the user explicitly                          ing the email requires them for the news.yahoo.com or



                                                                      730
the finance.yahoo.com subdomain depending on which                          corresponding value attributes of the hijacked cookies and
section the article is located in.                                          subsequently gain access to the user’s search history.
   If the user hovers over or clicks on the mail notiﬁcation
button, the attacker can also access the incoming mail widget,              D. Baidu
which reveals the Sender and partial Subject (up to 21                         Baidu is the leading search engine in the Chinese language
characters) of the 8 most recent incoming emails. This is due               and among the top 5 sites according to Alexa. To create
to a cookie being attributed an “authenticated” status. This                an account in Baidu, the user is required to register either
lasts approximately one hour, after which it cannot access the              with a Chinese mobile phone number or just provide an
widget. If at any point the user accesses the notiﬁcation button            email address. The majority of pages in Baidu are served
again, the hijacked cookie is re-authorized.                                over an unencrypted connection. As with the other search
   Yahoo Search. Having acquired the main domain and                        engines we tested, the HTTP cookie can expose signiﬁcant
search subdomain Y and T cookies, the adversary can gain                    private information to attackers. Apart from the proﬁle picture
access to the victim’s complete search history. Apart from                  and username, the user’s email address is also revealed.
viewing the searched terms, these cookies allow editing the                 Furthermore, the user’s entire search history can be retrieved,
history and removing previous searches. However, Yahoo ex-                  and pollution attacks are feasible. Finally, Baidu Maps allows
plicitly states that even if past searches are deleted, user search         users to save locations, similar to Bing Maps, and all saved
data is still logged. This enables stealthy pollution attacks;              locations can be obtained through the hijacked HTTP cookie.
after issuing search queries for inﬂuencing the personalization
proﬁle of the user, the adversary can then delete all issued                E. E-commerce Websites
searches and remove traces of the attack.                                   Amazon. The homepage follows the common approach of
   Yahoo Answers. One of the many services offered by                       redirecting to HTTPS if connected to over HTTP. However,
Yahoo, is a popular “question and answer” site, where users                 product pages are served over HTTP and, as a result, users’
can ask any type of question, and other members of the                      cookies will be exposed during their browsing sessions.
community can provide answers (albeit sometimes with ques-                     Personal Information. The adversary can obtain the infor-
tionable quality [34]). Users posting questions or answers, may             mation used by the victim for logging in; this includes the
choose to remain anonymous for a given question, especially                 victim’s username, email address and/or cell phone number.
if the topic is considered sensitive [35]. Upon auditing Yahoo,             Furthermore, when proceeding to checkout items in the cart,
we found that the victim’s HTTP cookie allows partial control               Amazon also reveals the user’s full name and city (used for
over the account; the adversary is able to ask or answer ques-              shipping). Viewing and changing the user’s proﬁle picture is
tions (either eponymously or anonymously), and also to view                 also permitted. Amazon also allows users to post their reviews
and edit previous questions and answers posted by the vic-                  under a pseudonym, which is not connected to the user’s name.
tim. Thus, the adversary can effectively “deanonymize” posts                However, the adversary can view the user’s reviews (which
and obtain potentially sensitive information about the victim,              may include sensitive items), thus, breaking the pseudonymous
which was posted under the assumption of anonymity. The                     nature of those reviews. Previous work has demonstrated the
adversary can also post comments as the victim in the com-                  privacy risks of recommender systems and experiments in
ment section of news articles. This requires the Y, T cookies               Amazon indicated that sensitive purchases can be inferred
for the yahoo.com domain and the answers.yahoo.com                          from the user’s review history [36].
subdomain.                                                                     Account History. The user’s HTTP cookie is sufﬁcient
   Yahoo Finance. Another service offered by Yahoo is related               for accessing private information regarding previous actions.
to ﬁnancial news and functionality, and also offers tools for               Speciﬁcally, the adversary can obtain information regarding
users to manage their personal ﬁnances. This includes creating              recently viewed items, and recommendations that are based
portfolios with their stock information etc. The Y and T                    on the user’s browsing and purchase history. The wish-lists
cookies for the main domain and ﬁnance subdomain allow the                  where the user has added items of interest are also accessible.
attacker to view and edit the victim’s portfolio. If the victim             Furthermore, the adversary can obtain information regarding
visits the ﬁnance page, the corresponding cookies are exposed.              previously purchased items either through the recommenda-
   Cookie forging. Different cookie combinations provide                    tion page or through product pages (which depict date of
access to speciﬁc user information or account functionality                 purchase). In an extensive study on privacy-related aspects of
and, depending on the subdomain on which the information is                 online purchasing behavior [37], users rated the creation of a
hosted, the respective cookies for those domains are required.              detailed proﬁle from their purchase history and other personal
However, we can use a cookie acquired from one (sub)domain                  information as one of the most troubling scenarios.
to craft the same cookie for a different subdomain and gain                    Shopping Cart. The user’s cart is also accessible, and
access to the speciﬁc information or functionality. For exam-               the adversary can see the items currently in the user’s cart.
ple, if the user only visits the main Yahoo homepage during                 Additionally, the cart can be modiﬁed, and existing items can
the monitoring period, the attacker will obtain the Y, F, T                 be removed, and other items can be added.
cookies for yahoo.com. The attacker can then “forge” those                     Vendor-assisted spam. We also found that the cookie ex-
cookies for the search.yahoo.com subdomain using the                        poses functionality that can be leveraged for deploying spam



                                                                      731
campaigns to promote speciﬁc items that are presented as                       presented while browsing with stolen user cookies from ad
“endorsed” by the victim. The widget has an auto-complete                      networks can be used to infer sensitive information.
feature that reveals the contacts that the user has emailed in                    An interesting aspect of hijacking ad-network cookies is that
the past. The attacker can either send emails about a speciﬁc                  they result in side-channel information leakage. We describe
item or a wish-list, and can add text in the email’s body.                     two scenarios which leak different types of information.
URLs can be included; while the email is sent as simple                           Attack scenario 1. Consider a scenario where user U has an
text, email providers such as Gmail render it as a click-                      account on the social networking service X, and has disclosed
able link. Since the emails are actually sent by Amazon                        various pieces of personal information in the proﬁle. Let us
(no-reply@amazon.com), they are most likely to pass                            also consider that U is knowledgeable and has correctly set
any spam detection heuristics. Furthermore, the From ﬁeld,                     privacy settings to restrict public visibility of that informa-
contains the victim’s username, further strengthening the per-                 tion, and X has gone to great lengths to protect users from
sonalized nature of the spam/phishing email.                                   information leakage and also enforces ubiquitous encryption
   Extortion scams. Previous work has revealed how scammers                    across the website, including connections to third parties (e.g.,
extorted money from users through One Click Fraud scams                        when fetching ads). However, website X offers personalized
by threatening to reveal “embarrassing” details about the                      advertising and ad network A has obtained personal informa-
users’ online activities [38]. In a similar vein, the attacker                 tion of U by setting different selection criteria over time and
can employ two different scam scenarios. In the ﬁrst case, if                  identifying U across websites through an HTTP cookie. Now
the attacker identiﬁes potentially embarrassing item(s) in the                 lets consider that while being monitored by the attacker, U
user’s viewing or purchase history, she can send an email to                   browses a completely unrelated website Y which serves ads
the user disclosing knowledge about the item(s), and other                     by ad network A and does not enforce encrypted connections.
personal information obtained about the user, and request                      Even though U does not have an account on Y, the browser
money to not share that information with the user’s contacts                   sends the HTTP cookie for A, which can be used to identify U
(even if no contact information has been collected). In the                    and return an ad that is tailored to match information disclosed
second scenario, the attacker can send an email blackmailing                   by U in the original website X. The attacker can hijack the
the user to pay money, otherwise she will send an email to                     exposed HTTP cookie for A, and receive ads tailored for
the victim’s friends and family with information about his cart                U. Based on the content of these ads, the attacker can infer
that is full of embarrassing items. Subsequently, the attacker                 personal information of U.
will add such items to the user’s cart or wishlist, and send                      Attack scenario 2. User U is browsing through an e-
the corresponding email through Amazon to the victim’s own                     commerce site E, which uses the ad network A to advertise its
email address as proof of her capabilities.                                    products in other websites. U searches for items that belong
   Walmart. Apart from the information exposed in the                          to a speciﬁc category C, and after the site returns a list of
website, the cookie’s value attribute contains 34 ﬁelds of                     relevant products, U clicks on a link and views the page of
information about the user and his account (see Appendix A).                   product P. A short time later, the attacker visits an unrelated
                                                                               website that is known to show various ads, and appends U’s
F. News Media
                                                                               stolen HTTP cookie for the ad network A. The attacker is then
   Information acquired from media outlets can reveal charac-                  presented with several ads relevant to U’s browsing history.
teristics and traits of the user (e.g., political inclination), and            Some are more generic and expose information about U’s
demographic information [39]. We audited the websites of sev-                  gender, while others explicitly refer to category C and even
eral of the most popular print or broadcast news organizations                 depict the speciﬁc item P.
(see Appendix A).                                                                 Information leakage. We conducted a small number of
G. Indirect Information Exposure - Ad Networks                                 manual experiments for identifying cases of personal informa-
                                                                               tion being leaked by Doubleclick. Previous work has shown
   We explore the impact of hijacking ad network cookies. On-                  that ads presented to users may be personalized based on
line ads account for a signiﬁcant portion of website real estate,              the user’s proﬁle characteristics [43], associated to sensitive
and their ubiquitous nature has been discussed extensively in                  topics [44], [45] (e.g., substance abuse, health issues, sexual
the context of user tracking (e.g., [40], [41]). Here we focus                 inclination), and that advertisers can even obtain private user
on Doubleclick, which is owned by Google, as it is the most                    information not explicitly provided by the service [46].
prevalent advertising network with a presence on 80% of the                       Here we describe one of our experiments for scenario 2. We
websites that provide advertisements [42]. As opposed to most                  browsed maternity clothes on a popular e-commerce website,
of the previous services where the user had to explicitly visit                and visited the page of a few returned products. We, then
the website3 , the cookies of an ad network can be exposed                     browsed other sites from a different machine connected to a
by visiting any of a large number of websites that display ads                 different subnet, and appended the Doubleclick HTTP cookie
from the respective network. While the symbiotic nature of                     from the previous browsing session. We were presented with
service providers and data aggregators is complicated, the ads                 ads from the e-commerce website advertising women’s cloth-
  3 We found a popular e-commerce homepage that issues a Google search         ing. Several ads even advertised a speciﬁc maternity product
request over HTTP, exposing the user’s cookies.                                whose page we had visited (see screenshots in Appendix A).



                                                                         732
                          TABLE IV                                                                                    TABLE V
  C OOKIE EXPOSURE BY POPULAR BROWSER EXTENSIONS AND APPS .                                            C OOKIE EXPOSURE BY OFFICIAL MOBILE APPS .

 Name                     Type                    Browser    #     Cookie leaked            Application         Platform   Version            #       Cookie leaked
 Google Maps              app                     Chrome    N/A                            Amazon              iOS        5.3.2            N/A            
 Google Search            app                     Chrome    N/A                            Amazon              iOS        5.2.1            N/A            
 Google News              app                     Chrome    1.0M                           Amazon              Android    28.10.15        10-50M          
 Amazon Assistant         extension               Chrome    1.1M                           Bing Search         iOS        5.7              N/A            
 Bing Rewards             extension               Chrome     74K                           Bing Search         Android    5.5.25151078     1-5M           
 eBay for Chrome          extension               Chrome    325K                           Spotlight (Bing)    iOS        iOS9.1           N/A       conditionally
 Google Dictionary        extension               Chrome    2.7M                           Siri (Bing)         iOS        iOS9.1           N/A            
 Google Hangouts          extension               Chrome    6.4M        
 Google Image Search      extension               Chrome    1.0M                           Ebay                iOS        4.1.0             N/A      conditionally
 Google Mail Checker      extension               Chrome    4.2M                           Ebay                Android    4.1.0.22        100-500M   conditionally
 Google Translate         extension               Chrome    5.5M                           Google              iOS        9.0               N/A           
 Yahoo Mail Notiﬁcation   extension               Chrome    1.2M                           Google              Android    5.4.28.19         1B+           
 Amazon                   default search bar      Firefox   N/A                            Gmail               iOS        4.1               N/A           
 Bing                     default search bar      Firefox   N/A                            Gmail               Android    5.6.103338659     1-5B          
 Ebay                     default search bar      Firefox   N/A                            Google Search Bar   Android    5.4.28.19         N/A           
 Google                   default search bar      Firefox   N/A                            Yahoo Mail          iOS        4.0.0              N/A     conditionally
 Yahoo                    default search bar      Firefox   N/A                            Yahoo Mail          Android    4.9.2           100-500M        
 Amazon 1Button           extension               Firefox   157K                           Yahoo News          iOS        6.3.0              N/A          
 Bing Search              extension (unofﬁcial)   Firefox    28K                           Yahoo News          Android    18.10.15         10-50M         
 eBay Sidebar             extension               Firefox    36K                           Yahoo Search        iOS        4.0.2              N/A          
 Google Image Search      extension               Firefox    48K                           Yahoo Search        Android    4.0.2             1-5M          
 Google Translator        extension (unofﬁcial)   Firefox   794K                           Yahoo Sports        iOS        5.7.4             N/A           
 Yahoo Toolbar            extension               Firefox   31K                            Yahoo Sports        Android    5.6.3            5-10M          




Depending on the time lapsed between the user browsing                                      Table IV lists the web components we have evaluated, their
the e-commerce site and the attacker browsing with hijacked                              reported number of downloads if available, and if they leak the
cookies, there is a decrease in the frequency of ads that contain                        cookies required for our hijacking attacks. Our experiments
the viewed product. However, we found that even after several                            yield a number of surprising ﬁndings. The 3 Chrome apps
hours we received ads that continued to promote the exact                                released by Google we tested expose the HTTP cookies,
product, and women’s clothing ads even after several days.                               while their extensions present mixed results with 4 out of 9
                                                                                         leaking the cookie. As one of those is Google Dictionary,
             IV. C OLLATERAL C OOKIE EXPOSURE                                            with over 2.7 million downloads, a signiﬁcant number of
 In this section we explore other means by which a user’s                                Chrome users is vulnerable to considerable risk. Every Firefox
HTTP cookies may be exposed.                                                             extension we tested, along with two of the default search bars,
                                                                                         actually expose the required HTTP cookies over unencrypted
A. Browser Components
                                                                                         connections. Interestingly, Google’s Search by Image exten-
   According to a manifest ﬁle analysis of over 30K Chrome                               sion is secure for Chrome but not for Firefox. As there is
extensions [47], a higher number of extensions requested                                 no ofﬁcial Bing app for Firefox, we test the most popular
permission for connecting to Google over HTTP compared to                                one, and we also audit a popular unofﬁcial Google translator
HTTPS. The same was true for wildcarded (http://*/*)                                     extension with over 794K users, both of which turn out to be
permission requests. This indicates that a considerable number                           vulnerable. Overall, these ﬁndings highlight the privacy threats
of extensions may be weakening security by connecting over                               that millions of users face due to browser components.
unencrypted connections to websites that also support en-
crypted connections. To that end, we explore whether browser                             B. Mobile Devices
components expose users to cookie hijacking attacks.                                         Mobile devices have become ubiquitous, and account for a
   We analyze a selection of the most popular browser com-                               large part of the time users spend online. Due to the quota
ponents, for Chrome and Firefox, that have been released by                              restrictions in mobile data plans, users frequently connect
major vendors we have audited. Our aim is not to conduct an                              to public WiFi access points. According to Cisco [48], an
exhaustive evaluation, but to obtain an understanding of the                             estimated 45% of mobile trafﬁc is “ofﬂoaded” to WiFi con-
implementation practices for browser components and assert                               nections. While this is not restricted to public WiFi networks,
whether they also suffer from a limited use of encryption.                               it is indicative of user behavior, with a recent survey reporting
While we experiment with a relatively small number of                                    that 72% of the participants connect to public WiFi [49]. To
components, we consider any discovered exposure indicative                               explore the feasibility of our HTTP cookie hijacking attacks
of general practices, as ofﬁcial extensions from major vendors                           against users on mobile devices, we audited the ofﬁcial iOS
are likely to adhere to certain quality standards. As Google                             and Android apps for the most popular services that we found
has discontinued the development of extensions for Firefox,                              to expose private information and account functionality.
we cannot do a direct cross-browser comparison for most of                                   The overview of our results is shown in Table V. It is
its components.                                                                          noteworthy that Bing differentiates mobile cookies and, as a



                                                                                   733
                                TABLE VI                                       attack. While the HttpOnly attribute can prevent attackers
  H T T P O N L Y ATTRIBUTE OF THE COOKIES REQUIRED FOR HIJACKING
ACCOUNTS , AND THE FEASIBILITY OF CONDUCTING THE ATTACKS WITH
                                                                               from remotely obtaining cookies through browser scripts, our
              THE COOKIES THAT ARE OBTAINABLE REMOTELY.                        ﬁndings reveal limited adoption, indicating that the situation
                                                                               has not improved in recent years [19].
                                                               XSS                As can be seen in Table VI, websites with multiple cookies
 Site                  HttpOnly           non—HttpOnly
                                                             Hijacking
                                                                               never set the attribute for all. Most websites set the attribute
 Amazon                   —                  x-main             
                                                                               for some cookies, but allow other cookies to be accessed by
 Bing                     —                 _U, WLS             
                                                                               scripts. Furthermore, Amazon and Target have the HttpOnly
 Baidu                    —                  BDUSS                            attribute set to false for all their cookies. Surprisingly,
 CNN                      —              CNNid, authid                        66.6% of the websites that are vulnerable to our cookie hi-
 Doubleclick              —                    id                             jacking attacks, also expose users to remote cookie hijacking.
 Ebay                     —             cid, nonsession                       For Yahoo, while we cannot access all the information and
 Google                 HSID                  SID                             account functionality described previously, several instances
 Guardian                 —                   GU_U                            remain possible (e.g., search history, username etc.) Even
                                          huffpost_user
                                                                               though the attack cannot be done for Hufﬁngton Post as the
 HufﬁngtonPost        huffpost_s        huffpost_user_id                      huffpost_s cookie has the ﬂag set, the remaining cookies
                                       last_login_username                     still expose the user’s username and email address.
 MSN                  MSNRPSAuth               —                
 New York Times           —                  NYT-S                                    V. D EANONYMIZATION R ISK FOR T OR U SERS
                                         WC_PERSISTENT                            In this section, we investigate if more privacy-conscious
 Target                   —             guestDisplayName        
                                          UserLocation                         users are protected against our presented cookie hijacking
 Walmart                  —              customer, CID          
                                                                               attacks. Speciﬁcally, we explore how users employing the
                                                                               Tor bundle (Tor Browser with pre-installed extensions) can
 Yahoo                    F                   T, Y            partial
                                                                               be deanonymized by adversaries. In this case, we consider a
 Youtube          VISITOR_INFO1_LIVE           —                
                                                                               variation of the threat model from the previous sections; the
                                                                               adversary monitors Tor exit nodes instead of public wireless
                                                                               access points. We do not consider content-injection or active
result, hijacked mobile cookies expose the search and click                    attacks, such as SSL stripping [10] for weakening protection.
history that has been conducted only over the mobile device;
the remaining personal information presented in Section III-B                  A. Experimental Analysis
is still obtainable. Spotlight, the system-wide search feature
                                                                                  We repeat our experiments from Section III on a subset of
of iOS, is also powered by Bing. When the user issues a
                                                                               the audited websites. To understand the protection that privacy-
search query, Spotlight connects over HTTPS to Apple servers.
                                                                               conscious users can obtain, we experiment with three different
However, the search results contain a “Show more in Bing”
                                                                               client-side setups. In the ﬁrst case, we simulate a user that uses
button and, if clicked, will open the browser showing the
                                                                               Firefox and connects over the Tor network [50] for increased
search results and leak the user’s HTTP Bing cookie. For Siri,
                                                                               protection. The second user is more well-informed and has
the voice-guided assistant, the Bing results are opened in the
                                                                               installed the HTTPS Everywhere browser extension for better
browser over HTTPS, preventing cookie hijacking. Once again
                                                                               protection. The ﬁnal case is of a user that has selected the
Yahoo follows poor security practices as 3 out of 4 iOS apps
                                                                               default conﬁguration of the Tor bundle, which includes the Tor
leak the user’s cookies. As expected both versions of Gmail
                                                                               Browser (a modiﬁed Firefox) and other extensions (including
protect the cookies, while iOS Amazon apps prior to version
                                                                               HTTPS Everywhere).
5.3.2 expose the cookie. Furthermore, both Amazon iOS apps
                                                                                  HTTPS Everywhere. This browser extension [51] is the
contain cookies that reveal information about the user’s device
                                                                               result of collaboration between EFF and the Tor Project. The
and mobile carrier (details in Appendix A). For both platforms,
                                                                               extension contains per domain rule-sets for a large number of
the Ebay app will expose the cookies under certain conditions.
                                                                               domains4 , which instruct the re-writing of links within pages to
First, Ebay sellers are allowed to customize their item pages
                                                                               force encrypted connections. However, websites may contain
and often add links to other items they are selling; if the
                                                                               pages or subdomains whose functionality breaks over HTTPS.
seller has added an HTTP Ebay link to those items, the cookie
                                                                               For those cases, each website’s rule-set will contain exceptions
will be exposed if a link is clicked by the user. Empirically
                                                                               for identifying links pointing to problematic pages, which are
we found that that these HTTP links are common. The other
                                                                               not overwritten and are connected to over HTTP. The rule-
scenario is if the user clicks on the “Customer Support” menu.
                                                                               sets are created and maintained by the community, which
C. Active Attacks                                                              requires a signiﬁcant amount of manual effort, and can result in
                                                                               incomplete rules. Certain sites (e.g. doubleclick.net, ebay.com)
   Remote hijacking. We analyze the cookies of each service                    are turned off by default, as their functionality breaks if turned
in depth, and identify what information the attacker can obtain
remotely, e.g., by stealing the user’s cookies through an XSS                    4 https://www.eff.org/https-everywhere/atlas/




                                                                         734
                                                           TABLE VII
    E XAMPLES OF URLS AND SUBDOMAINS OF POPULAR SERVICES THAT EXPOSE TOR USERS ’ COOKIES FOR DIFFERENT BROWSER CONFIGURATIONS .

                                                                 Google                                 Bing                     Yahoo          Amazon    Ebay
    Browser Conﬁguration
                                               domain                     subdomains          domain     subdomains     domain     subdomains   domain   domain

    Firefox                                                                                                                                         
                                         error404 page              translate.google.com               m2.cn.bing.com
    Firefox + HTTPS Everywhere                                                                                                                         
                                     google.com/service*             picasa.google.com                 blogs.bing.com
                                         error404 page              translate.google.com               m2.cn.bing.com
    Tor Bundle                                                                                                                                        —
                                     google.com/service*             picasa.google.com                 blogs.bing.com

    *service: {mail, maps, drive, docs, talk, . . . }



                        TABLE VIII                                                       While for Ebay our attacks remain effective when we use
 ACCOUNTS FROM OUR PUBLIC WIRELESS TRACE (S ECTION II-C) THAT                            Firefox, we could not complete the experiment with the Tor
   REMAIN EXPOSED EVEN WITH HTTPS E VERYWHERE INSTALLED .
                                                                                         browser as any login attempts simply redirect to the login page
                                      Exposed                                            without any error message (probably due to incompatibility
                     Services                       Reduction
                                      Accounts                                           with an extension). For the cases where the attack is still
                     Google             31,729          53.12%                           feasible, Table VII does not present an exhaustive list of
                     Yahoo               5,320          43.55%
                     Baidu               4,858           4.63%
                                                                                         vulnerable points, but an indicative selection of those we have
                     Bing                  378          38.03%                           experimented with. In practice, any URL that is handled by
                     Amazon             22,040           5.68%
                     Ebay                1,685              0%
                                                                                         the exceptions in each website’s rule-set can potentially expose
                     Target                 46              0%                           the HTTP cookies.
                     Walmart                97          23.62%
                     NYTimes            15,190              0%
                                                                                            Quantifying impact. To simulate the potential impact of
                     Guardian              343           0.29%                           HTTPS Everywhere, we use the network trace collected from
                     Hufﬁngton              42              0%
                     MSN                   927          39.25%
                                                                                         our campus’ public WiFi, and calculate the number of accounts
                     Doubleclick       124,352              0%                           that would remain exposed due to URLs not handled by
                     Youtube               264          99.21%
                                                                                         HTTPS Everywhere rule-sets (version 5.1.0). We found that
                     Total             207,271          26.62%                           over 77.57% of all the collected HTTP trafﬁc would remain
                                                                                         over HTTP even if HTTPS Everywhere was installed in every
                                                                                         users’ browser. Due to those connections, 207,271 accounts
on. Therefore, user accounts are likely to be exposed even with                          remain exposed to our cookie hijacking attacks. Table VIII
this extension in place, since a single HTTP request is enough.                          breaks down the numbers per targeted service. The largest im-
   Table VII contains the results of our experiments. In the                             pact is seen in Youtube where less than 1% of the users remain
ﬁrst case where the user browses through Firefox and only                                exposed while Ebay, Doubleclick and numerous news sites are
employs Tor, the user remains vulnerable to the full extent of                           not impacted at all. Surprisingly, even though Google’s main
the attacks described in Section III (denoted by ) . This is                            page is protected, over 46% of the users remain exposed when
expected as Tor is not designed to prevent this class of attacks.                        visiting a Google service. For the remaining search engines,
In the second and third cases where HTTPS Everywhere is also                             the impact has a varying degree, with over 95% of the Baidu
installed, we discover a varying degree of effectiveness.                                users remaining susceptible to cookie hijacking.
   For Google the attack surface is signiﬁcantly reduced,                                   While the Tor bundle offers signiﬁcant protection against
as users visiting the main domain through the address bar                                a variety of attacks, its effectiveness in mitigating cookie
are protected. As this is a common usage scenario (if not                                hijacking attacks varies greatly depending on each website’s
the most common), a signiﬁcant number of users may be                                    implementation. Even with all protection mechanisms enabled,
protected in practice. However, the extension’s rule-set does                            users still face the risk of deanonymization when visiting
not cover several cases, such as when the user visits one of                             popular sites. Therefore, the threat they face greatly depends
Google’s services through the address bar (e.g., by typing                               on their browsing behavior, which we try to evaluate next.
google.com/maps), or when receiving Google’s Error
                                                                                         B. Evaluating Potential Risk
404 page. For Bing the attack surface is also signiﬁcantly
reduced, but users can still be exposed, e.g., by a subdomain                               We want to explore whether privacy-conscious users actu-
that hosts the search engine but does not work over HTTPS.                               ally visit these major websites over the Tor network, or if they
For cases such as Amazon and Yahoo, the protection offered                               avoid them due to the lack of ubiquitous encryption.
by the extension is ineffective against our attacks, as browsing                            Ethics. Again, we obtained IRB approval for our ex-
the website will expose the required cookies. In Amazon                                  periments. However, due to our ethical considerations for
any product page will reveal the required cookie, while in                               the Tor users (as they are not members of our university
Yahoo we always receive the cookies required from the links                              nor connecting to our public wireless network), we do not
on the homepage redirecting through hsrd.yahoo.com.                                      replicate the data collection we followed in our experiment



                                                                                   735
                             6
                      1x10                                            100000                                         10000                                          100000
                                       *.com              HTTP                      google.com           HTTP                       yahoo.com           HTTP                           amazon.com            HTTP
                                                         HTTPS                                          HTTPS                                          HTTPS                                                HTTPS

                                                                                                                                                                     10000
 Connections (log)




                     100000                                            10000                                           1000                                           1000



                                                                                                                                                                       100



                      10000                                             1000                                            100                                                10
                                 01        08     15      22     29            01        08      15     22      29            01         08     15     22      29               01          08       15     22      29
                                                   Day                                            Day                                            Day                                                  Day


                     10000                                            100000                                         1000                                           1000
                                      baidu.com           HTTP                      bing.com             HTTP                      ebay.com             HTTP                         walmart.com             HTTP
                                                         HTTPS                                          HTTPS                                          HTTPS                                                HTTPS

                     1000                                              10000
 Connections (log)




                                                                                                                       100                                           100

                      100                                               1000

                                                                                                                        10                                            10
                       10                                                100



                        1                                                 10                                            1                                             1
                             01            08     15     22      29            01        08      15     22      29           01         08      15     22      29          01             08        15      22      29
                                                   Day                                            Day                                            Day                                                 Day

                                                  Fig. 5. Number of encrypted and unencrypted connections per day, as seen from a freshly-deployed Tor exit node.



from Section II-C. We opt for a coarse-grained non-invasive                                                            Doubleclick side channel leakage attack for Tor, as the double
measurement and only count the total connections towards the                                                           key session cookies employed by the Tor browser affect third
websites we audited in Section III, using the port number to                                                           party cookies and their ability to track users across domains.
differentiate between HTTP and HTTPS. We do not log other                                                                 Susceptible population. We see that there is a signiﬁcant
information, inspect any part of the content, or attempt to                                                            amount of HTTP trafﬁc exiting Tor and connecting to popular
deanonymize any users. Furthermore, all data was deleted                                                               websites that expose a vast collection of private user infor-
after calculating the number of connections. Since we do                                                               mation. While the ratio of unencrypted connections is even
not look at the name of the cookies sent in the HTTP                                                                   higher than that of our university’s network, possibly fewer
connections, we cannot accurately estimate the number of                                                               users will be logged in when using Tor. More experienced
users that are susceptible to cookie hijacking attacks. Our                                                            users may be aware of the shortcomings of this mechanism and
goal is to obtain a rough approximation of the number and                                                              avoid the pages and subdomains that are not protected when
respective ratio of encrypted and unencrypted connections to                                                           connecting over untrusted connections. Nonetheless, we expect
these popular websites. Based on the measurements from our                                                             that many users will exhibit normal browsing patterns, thus,
university’s wireless trace, we can deduce the potential extent                                                        exposing their cookies to attackers. Furthermore, even though
of the deanonymization risk that Tor users face. We consider                                                           we can not know how many of the users are indeed logged
this an acceptable risk-beneﬁt tradeoff, as the bulk statistics                                                        in and susceptible to cookie hijacking (that would require
we collect do not endanger users in any way, and we can                                                                looking at the cookie names), for some websites observing
inform the Tor community of a potentially signiﬁcant threat                                                            encrypted connections is an almost deﬁnitive sign that we
they might already be facing. This will allow them to seek                                                             are also observing HTTP trafﬁc of logged in users; due to
countermeasures for protecting their users.                                                                            functionality breaking and the corresponding exceptions in the
   Tor exit node. The number of outgoing connections were                                                              HTTPS Everywhere rule-sets, HTTPS trafﬁc for Amazon and
measured over 1 month, on a fresh exit node with a default                                                             Baidu signiﬁes account-related functionality that requires users
reduced exit policy5 and bandwidth limited to 300 KB/s.                                                                to be logged in (e.g., Amazon checkout) and is accompanied
   Measurements. Figure 5 presents the number of total                                                                 by HTTP trafﬁc (Amazon products pages). Thus, we believe
connections and broken down for some services. The number                                                              that a considerable number of Tor users may be facing the risk
of connections over HTTP account for 75.4% of all the                                                                  of deanonymization through hijacked cookies.
connections we saw, with an average of 10,152 HTTP and                                                                    User bias. As this is a newly deployed exit node, the
3,300 HTTPS connections per hour. While non-HTTP trafﬁc                                                                population of users connecting to it may be biased towards in-
may be contained within the total connections, we do not dis-                                                          experienced users, as more privacy-conscious ones may avoid
tinguish it as that would require a more invasive approach. For                                                        exiting from such nodes. Thus, our observed ratio of encrypted
most of the services, the unencrypted connections completely                                                           connections or the websites users connect to, may present
dominate the outgoing trafﬁc to the respective domains. On the                                                         differences to other exit nodes. Nonetheless, adversaries could
other hand, for Google we observe an average of 508 HTTP                                                               already own exit nodes with long uptimes, or be able to
connections per hour as opposed to 705 HTTPS connections.                                                              monitor the outgoing trafﬁc from legitimate exit nodes, which
Similarly we logged 23 unencrypted connections to Yahoo per                                                            is a common adversarial model for Tor-related research [50].
hour and 36 encrypted connections. We do not consider the                                                              Thus, we believe this to be a credible and severe threat to Tor
                                                                                                                       users that want to maintain their anonymity while browsing
                5 https://trac.torproject.org/projects/tor/wiki/doc/ReducedExitPolicy                                  (popular) websites.


                                                                                                                 736
        VI. C OUNTERMEASURES AND D ISCUSSION                              attacks. Taking into consideration our ﬁndings regarding the
                                                                          amount of personal information and account functionality that
   Our work focuses on highlighting the privacy ramiﬁcations              unauthenticated cookies can access, this is a signiﬁcant privacy
of HTTP cookie hijacking attacks, and we have demonstrated                risk that users face. The need for full HSTS deployment has
the gravity and pervasiveness of sensitive information being              also been argued for by others [11], [52].
exposed by high-proﬁle services. We discuss potential causes                 HTTPS Everywhere. Through our experimentation, we
for the current vulnerable state of major websites, and how               found that this browser extension improves user security by
existing security mechanisms fare in practice. While the de-              minimizing the attack surface, and can prevent risks due to
fenses for preventing these attacks are known and, seemingly,             partial (or non-existent) deployment of HSTS. However, it is
straightforward, our experiments demonstrate that even the                crucial to note that, even with this extension in place, users
most popular and resourceful websites succumb to design and               are not entirely protected. As site functionality can break if
implementation ﬂaws.                                                      the server does not support HTTPS for a speciﬁc subdomain
   Partial encryption and personalization. Due to the                     or page, HTTPS Everywhere relies on rule-sets that contain
complexity in implementing large-scale web services, and                  exceptions for these cases. As such, while certain websites
also deﬁning precise access privileges for multiple (inter-               might be signiﬁcantly covered, other cases still contain a
dependent) cookies for different subdomains, web developers               considerable number of unprotected pages. If users click on
are prone to errors such as the incomplete separation of                  the extension’s notiﬁcation icon, a menu shows information
access control for unauthenticated cookies. In turn, this allows          regarding the current page and if content has been fetched over
passive eavesdroppers that hijack HTTP cookies to obtain                  non-encrypted connections. However, users are notoriously
sensitive information. While we tested certain websites where             good at ignoring warnings, and their design can signiﬁcantly
partial encryption did not result in privacy leakage, none of             affect user actions [53]. The menu contains an option to
those services offered a personalized version of the service to           block such connections. While this can break the browsing
HTTP cookies. This indicates the conﬂicting nature of offering            experience, it may be a prudent choice for users that consider
personalization while aiming to maintain ease-of-use by not               their privacy of paramount importance. This could apply
requiring re-authentication. As such, we argue that any service           to users that rely on systems such as Tor for maintaining
that supports user accounts and personalizes the experience,              their anonymity, who can be deanonymized as we discuss in
should enforce ubiquitous encryption, which would mitigate                Section V. Nonetheless, this is not the default option, and if
the privacy threats we have explored.                                     the user visits such a website before enabling the option, the
   Cookie Flags. By setting the Secure cookie ﬂag to                      HTTP cookies will be exposed. Thus, enabling this option by
True, websites can ensure the conﬁdentiality of a cookie by               default and allowing users to opt-out is a safer approach.
instructing the browser to only send over encrypted connec-                  VPN. End users should also consider the use of VPN tech-
tions. However, while this can prevent passive eavesdroppers              nology when connecting to untrusted public wireless networks,
from acquiring the cookies, it is known that active attackers             as it reduces the threat of the user’s trafﬁc being sniffed [54].
can overwrite secure cookies from an insecure channel [52].
Therefore, the Secure ﬂag as a stand-alone measure cannot
                                                                                         VII. E THICS AND DISCLOSURE
fully protect users. It should be used in combination with
fully deployed HSTS and support for ubiquitous encryption.                   To ensure the ethical nature of our research, we provided a
Furthermore, the HttpOnly ﬂag should be set to prevent                    detailed description of our data collection and analysis process
remote cookie hijacking.                                                  to Columbia University’s IRB, and obtained approval for both
   Security mechanisms. We have evaluated the impact of                   our experiments with the public wireless network and the Tor
browser-supported security mechanisms on the feasibility of               network. Furthermore, all captured data was destroyed after
our attacks. Here we discuss our ﬁndings about the protection             the end of our evaluation measurements.
these mechanisms offer and their shortcomings.                               Disclosing attacks against popular services raises ethical
   HSTS. Recent work presented an extensive study on HSTS                 issues as, one might argue, adversaries may have previously
and discussed the pitfalls of deploying it in practice, reporting         lacked the know-how to conduct these attacks. However the
that many developers fail to implement it correctly [11]. In              practicality of cookie hijacking suggests that such attacks
our work, we focus on the fact that even if implemented                   could soon happen in the wild (if not happening already). To
correctly, partial deployment nulliﬁes the protection it offers           that end, we have already contacted all the audited websites
and users remain exposed. This is particularly apparent when              to disclose our ﬁndings in detail. We have also contacted Tor
the main landing page of a website does not enforce HSTS.                 developers to inform them of the deanonymization threat users
Even if users are subsequently redirected to HTTPS (as is                 face. We believe that by shedding light on this signiﬁcant pri-
the case with Google), the HTTP cookies are exposed during                vacy threat, we can incentivize services to streamline support
the initial connection. As it is common for users to directly             for ubiquitous encryption. Furthermore, we must alert users of
visit popular websites by typing their name in the address                the privacy risks they face when connecting to public wireless
bar, which is facilitated by auto-completion functionality, this          networks or browsing through Tor, and educate them on the
practice can expose a large number of users to cookie hijacking           extent of protection offered by existing mechanisms.



                                                                    737
                   VIII. R ELATED W ORK                                      Privacy leakage. Krishnamurthy and Willis explored online
                                                                          social networks and the leakage of users’ personally identiﬁ-
   Hijacking and other cookie-related issues. Zheng et                    able information (PII) in HTTP headers, and described how
al. [52] recently presented an empirical study on the feasibility         third-party servers can exploit the PII leakage to link it with
of cookie injection attacks. While cookies have the Secure                user actions across different domains [5]. In follow-up work,
ﬂag that can prevent browsers from sending them over un-                  the authors focused on the privacy leakage in social networks
encrypted connections, there is no provision to ensure that               that leveraged the GPS capabilities of mobile devices to offer
such cookies are also set only over HTTPS connections. As                 location-based functionality [6], and explored how pieces of
a result, during an HTTP connection to a domain, a man-in-                information collected from different social networks could be
the-middle attacker can inject cookies that will be appended              combined for further compromising user privacy. Englehardt et
in future HTTPS connections to that speciﬁc domain. In their              al. [7] explored the feasibility of conducting mass surveillance
real-world assessment of this attack, the authors explored how            by monitoring unencrypted trafﬁc and inspecting third-party
cookie injection could enable attacks such as account and                 tracking cookies. They also identiﬁed cases of PII being
(sub-)session hijacking, and cart manipulation in e-commerce              exposed in unencrypted trafﬁc, which can be leveraged for
sites. They also identify how browser-speciﬁc handling of                 improving the clustering of user trafﬁc and linking different
cookies can enable attacks. Bortz et al. [55] had previously              requests to the same user. While their work focuses on
described cookie injection attacks, and proposed origin cookies           a different attack scenario, their results also highlight the
for achieving session integrity in web applications.                      threat of unencrypted connections. Liu et al. [8] developed
   Wang et al. [56] identiﬁed ﬂaws in popular ID providers                a novel method for detecting PII being transmitted in network
of single-sign-on services that allowed attackers to log into             trafﬁc, without prior knowledge of the ﬁelds and form of the
services as the users. Karlof et al. [57] introduced pharming             information transmitted by each service. Due to the very small
attacks that relied on DNS hijacking and allowed attackers to             fraction of ﬁelds that actually contain PII, the authors argue
hijack user sessions. Lekies et al. [58] leveraged the exemption          that looking for ﬁelds with values that are unique to a user
of remote scripts included through the HTML script tag                    results in very high false positives and false negatives. Thus,
from the Same-Origin policy for leaking personal information              mass surveillance attacks will have to employ more advanced
and, in some cases, hijacking sessions. Barth et al. [59]                 techniques. The evaluation of the proposed approach on a
introduced the login CSRF attack where the user is logged                 large-scale trace presented a false positive rate of 13.6%.
into a legitimate service as the attacker, which can result in               These approaches, however, have a limited viewpoint and
the exposure of sensitive user information.                               can only detect information sent in clear text during the
   Numerous approaches have been proposed for prevent-                    monitoring period. There exist multiple common scenarios
ing session hijacking [60]–[62]. Jackson and Barth pre-                   where exposed personal information will not be detected: (i)
sented ForceHTTPS [63], a browser extension for enforcing                 websites are highly dynamic and content may be fetched in an
HTTPS connections. This was reformed and standardized as                  obfuscated form and constructed at runtime on the client side,
HSTS [12]. Kranch and Bonneau [11] performed an extensive                 (ii) sensitive content may always be fetched over encrypted
study on the adoption of HSTS and certiﬁcate pinning in the               connections, even though HTTP cookies may (erroneously)
wild. They reported a lack of understanding by web developers             have sufﬁcient access privileges, (iii) certain pieces of infor-
on the proper use of these mechanisms, as they often use them             mation are only exposed after speciﬁc user actions, which
in illogical or invalid ways. Selvi [64] demonstrated scenarios           may not occur during the monitoring period. Furthermore,
where an attacker could bypass HSTS protection. Bhargavan et              cookie hijacking attacks can also access protected account
al. [65] also showed how the HSTS header could be partially               functionality in certain cases due to imprecise access control.
truncated, resulting in the expiration of the HSTS entry within           Overall, our goal is to explore the prevalence and criticality of
seconds. Singh et al. [3] studied the incoherencies of web                private information and account functionality being accessible
access control and showed that user actions and resources                 to HTTP cookies, and understanding how varying components
could be improperly exposed to web applications.                          of the complicated ecosystem (from browser security mecha-
   Mayer and Mitchel [40] discussed the policy and technology             nisms to mobile apps) affect the attack surface and feasibility
issues of third-party web tracking. Roesner et al. [41] studied           of hijacking. Furthermore, as the authors state [7], using the
the behavior of web trackers and found an extensive set of                Tor bundle likely defeats their attack scenario. On the other
trackers. They also explored the impact of browser mecha-                 hand, we demonstrate that while the Tor bundle reduces the
nisms, such as cookie blocking and DoNotTrack, and found                  attack surface, cookie hijacking remains feasible.
that preventing web-tracking from popular social network                     Risks of personalization. The personal information leakage
widgets also broke their functionality. Sivakorn et al. [66],             we identify in our attacks is a direct result of websites offering
demonstrated how HTTP cookies could be used for inﬂuenc-                  a personalized experience to users. Castelluccia et al. [4] high-
ing Google’s advanced risk analysis system and bypassing                  lighted the problem of privacy leakage that can occur when
reCAPTCHA challenges. Attackers could use hijacked cookies                personalized functionality is accessible to HTTP cookies. The
in a similar fashion, which can bypass even more stringent                authors demonstrated how adversaries could reconstruct a
safeguards that require extensive browsing history.                       user’s Google search history by exploiting the personalized



                                                                    738
suggestions. Korolova presented novel attacks that use tar-             to Tor users, as they can be deanonymized by adversaries
geted ads for obtaining private user information [46]. Toch et          monitoring the outgoing trafﬁc of exit nodes.
al. [67] analyzed the privacy risks that emerge from popular
approaches to personalizing services.                                                       X. ACKNOWLEDGEMENTS
   Encrypted connections. The privacy threats we study are                 We would like to thank the anonymous reviewers for their
also the result of websites not enforcing encryption across all         feedback. We would also like to thank the CUIT team of Joel
pages and subdomains. Previous work has shown the risks                 Rosenblatt and the CRF team of Bach-Thuoc (Daisy) Nguyen
of supporting mixed-content websites, where pages accessed              at Columbia University, for their technical support throughout
over HTTPS also include content fetched over HTTP [68].                 this project. Finally we would like to thank Georgios Kontaxis,
While security mechanisms or browser extensions reduce the              Vasileios P. Kemerlis and Steven Bellovin for informative
attack surface, they do not entirely mitigate these attacks. A          discussions and feedback. This work was supported by the
signiﬁcant step towards improving user privacy, is the deploy-          NSF under grant CNS-13-18415. Author Suphannee Sivakorn
ment of ubiquitous encryption. Naylor et al. [2] discussed              is also partially supported by the Ministry of Science and
the “cost” of a wide deployment of HTTPS and analyzed                   Technology of the Royal Thai Government. Any opinions,
aspects such as infrastructure costs, latency, data usage, and          ﬁndings, conclusions, or recommendations expressed herein
energy consumption. However, even when the connection is                are those of the authors, and do not necessarily reﬂect those
encrypted, previous work has demonstrated the feasibility of            of the US Government or the NSF.
a wide range of attacks at both application and cryptographic
level that can subvert the protection [10], [69]–[72]. Fahl et                                       R EFERENCES
al. [73], [74] explored such attacks in the mobile domain.               [1] E. Butler, “Firesheep,” 2010, http://codebutler.com/ﬁresheep.
                                                                         [2] D. Naylor, A. Finamore, I. Leontiadis, Y. Grunenberger, M. Mellia,
   Deanonymizing Tor users. Huber et al. [75] discussed                      M. Munafò, K. Papagiannaki, and P. Steenkiste, “The Cost of the ”S” in
how Tor users could be deanonymized by PII being leaked                      HTTPS,” in Proceedings of the 10th ACM International on Conference
in HTTP trafﬁc. Chakravarty et al. [76] proposed the use of                  on Emerging Networking Experiments and Technologies, ser. CoNEXT
                                                                             ’14. ACM, 2014, pp. 133–140.
decoy trafﬁc with fake credentials for detecting adversaries             [3] K. Singh, A. Moshchuk, H. J. Wang, and W. Lee, “On the Incoherencies
monitoring trafﬁc from Tor exit nodes. While their prototype                 in Web Browser Access Control Policies,” in Proceedings of the 2010
focused on IMAP and SMTP servers, their technique could be                   IEEE Symposium on Security and Privacy, 2010.
                                                                         [4] C. Castelluccia, E. De Cristofaro, and D. Perito, “Private Information
extended to also leverage decoy accounts in major websites.                  Disclosure from Web Searches,” in Privacy Enhancing Technologies,
If the attacker doesn’t change the account in a visible way,                 ser. PETS ’10, 2010.
this technique will only detect attacks if the service offers            [5] B. Krishnamurthy and C. E. Wills, “On the leakage of personally
                                                                             identiﬁable information via online social networks,” in Proceedings of
information about previous logins (e.g., as Gmail does). Winter              the 2nd ACM workshop on Online social networks, ser. WOSN ’09,
et al. [77] deployed their tool HoneyConnector for a period                  2009.
of 4 months, and identiﬁed 27 Tor exit nodes that monitored              [6] B. Krishnamurthy and C. Wills, “Privacy Leakage in Mobile Online
                                                                             Social Networks,” in Proceedings of the 3rd Workshop on Online Social
outgoing trafﬁc and used stolen decoy credentials.                           Networks, ser. WOSN ’10, 2010.
                                                                         [7] S. Englehardt, D. Reisman, C. Eubank, P. Zimmerman, J. Mayer,
                     IX. C ONCLUSION                                         A. Narayanan, and E. W. Felten, “Cookies That Give You Away: The
   In this paper we presented our extensive in-depth study on                Surveillance Implications of Web Tracking,” in Proceedings of the 24th
                                                                             International Conference on World Wide Web, ser. WWW ’15, 2015.
the privacy threats that users face when attackers steal their           [8] Y. Liu, H. H. Song, I. Bermudez, A. Mislove, M. Baldi, and A. Ton-
HTTP cookies. We audited a wide range of major services                      gaonkar, “Identifying Personal Information in Internet Trafﬁc,” in Pro-
and found that cookie hijacking attacks are not limited to                   ceedings of the 3rd ACM Conference on Online Social Networks, ser.
                                                                             COSN ’15, 2015.
a speciﬁc type of websites, but pose a widespread threat to              [9] B. Möller, T. Duong, and K. Kotowicz. (2014, Oct.) This POODLE bites:
any website that does not enforce ubiquitous encryption. Our                 exploiting the SSL 3.0 fallback. https://googleonlinesecurity.blogspot.
study revealed numerous instances of major services exposing                 com/2014/10/this-poodle-bites-exploiting-ssl-30.html.
                                                                        [10] M. Marlinspike, “New Tricks For Defeating SSL In Practice,” BlackHat
private information and protected account functionality to                   DC, Feb. 2009.
non-authenticated cookies. This threat is not restricted to             [11] M. Kranch and J. Bonneau, “Upgrading HTTPS in Mid-Air: An Empiri-
websites, as users’ cookies are also exposed by ofﬁcial browser              cal Study of Strict Transport Security and Key Pinning,” in Proceedings
                                                                             of the Network and Distributed System Security Symposium, ser. NDSS
extensions, search bars and mobile apps. To obtain a better                  ’15, 2015.
understanding of the risk posed by passive eavesdroppers in             [12] J. Hodges, C. Jackson, and A. Barth, “HTTP Strict Transport Security,”
practice, we conducted an IRB-approved measurement study                     RFC 6797, 2012.
                                                                        [13] Can I use. HSTS Browser Support. http://caniuse.com/#feat=
and detected that a large portion of the outgoing trafﬁc in                  stricttransportsecurity.
public wireless networks remains unencrypted, thus, exposing            [14] L. Garron. HSTS Preload. https://hstspreload.appspot.com/.
a signiﬁcant amount of users to cookie hijacking attacks.               [15] M. Stevens, A. Sotirov, J. Appelbaum, A. Lenstra, D. Molnar, D. A.
                                                                             Osvik, and B. De Weger, “Short chosen-preﬁx collisions for MD5 and
We also evaluated the protection offered by popular browser-                 the creation of a rogue CA certiﬁcate,” in Advances in Cryptology-
supported security mechanisms, and found that they can reduce                CRYPTO 2009, 2009, pp. 55–69.
the attack surface but can not protect users if websites do not         [16] C. Palmer and C. Evans, “Certiﬁcate Pinning Extension for HSTS,” RFC
                                                                             DRAFT, 2011.
support ubiquitous encryption. The practicality and pervasive-          [17] C. Palmer, C. Evans, and R. Sleevi, “Certiﬁcate Pinning Extension for
ness of these attacks, also renders them a signiﬁcant threat                 HSTS,” RFC 7469, 2015.




                                                                  739
[18] N. Heninger, Z. Durumeric, E. Wustrow, and J. A. Halderman, “Mining               [41] F. Roesner, T. Kohno, and D. Wetherall, “Detecting and Defending
     Your Ps and Qs: Detection of Widespread Weak Keys in Network                           Against Third-party Tracking on the Web,” in Proceedings of the 9th
     Devices,” in Proceedings of the 21st USENIX Security Symposium, Aug.                   USENIX Conference on Networked Systems Design and Implementation,
     2012.                                                                                  ser. NSDI ’12, 2012.
[19] Y. Zhou and D. Evans, “Why Arent HTTP-only Cookies More Widely                    [42] P. Gill, V. Erramilli, A. Chaintreau, B. Krishnamurthy, K. Papagiannaki,
     Deployed?” in Proceedings of the Web 2.0 Security and Privacy 2010                     and P. Rodriguez, “Follow the Money: Understanding Economics of
     workshop, ser. W2SP ’10, 2010.                                                         Online Aggregation and Advertising,” in Proceedings of the 2013
[20] S. Fogie, J. Grossman, R. Hansen, A. Rager, and P. D. Petkov, XSS                      Conference on Internet Measurement Conference, ser. IMC ’13, 2013.
     Attacks: Cross Site Scripting Exploits and Defense. Syngress, 2011.               [43] P. Barford, I. Canadi, D. Krushevskaja, Q. Ma, and S. Muthukrishnan,
[21] Randy Westergren. (2016) Widespread XSS Vulnerabilities in Ad Net-                     “Adscape: Harvesting and Analyzing Online Display Ads,” in Proceed-
     work Code Affecting Top Tier Publishers. http://randywestergren.com/                   ings of the 23rd International Conference on World Wide Web, ser.
     widespread-xss-vulnerabilities-ad-network-code-affecting-top-tier-                     WWW ’14, 2014.
     publishers-retailers.                                                             [44] A. Datta, M. C. Tschantz, and A. Datta, “Automated Experiments on
[22] N. Perlroth, J. Larson, and S. Shane. (2013, Sep.) The New York Times                  Ad Privacy Settings: ATale of Opacity, Choice, and Discrimination,”
     - N.S.A. Able to Foil Basic Safeguards of Privacy on Web. http://www.                  Proceedings on Privacy Enhancing Technologies, vol. 2015, no. 1, 2015.
     nytimes.com/2013/09/06/us/nsa-foils-much-internet-encryption.html.                [45] M. Lécuyer, G. Ducoffe, F. Lan, A. Papancea, T. Petsios, R. Spahn,
[23] R. Gallagher. (2015, Sep.) The Intercept - From Radio to Porn, British                 A. Chaintreau, and R. Geambasu, “XRay: Enhancing the Web’s Trans-
     Spies Track Web Users Online Identities. https://theintercept.com/2015/                parency with Differential Correlation,” in Proceedings of the 23rd
     09/25/gchq-radio-porn-spies-track-web-users-online-identities/.                        USENIX Security Symposium, 2014.
[24] A. Soltani, A. Peterson, and B. Gellman. (2013, Dec.) The Wash-                   [46] A. Korolova, “Privacy violations using microtargeted ads: A case study,”
     ington Post - NSA uses Google cookies to pinpoint targets for                          in Proceedings of the 2010 IEEE International Conference on Data
     hacking. https://www.washingtonpost.com/news/the-switch/wp/2013/12/                    Mining Workshops, ser. ICDMW ’10, 2010.
     10/nsa-uses-google-cookies-to-pinpoint-targets-for-hacking/.                      [47] A. Kapravelos, C. Grier, N. Chachra, C. Kruegel, G. Vigna, and
[25] BBC News. (2014, Jul.) NSA ’targets’ Tor web servers and users. http:                  V. Paxson, “Hulk: Eliciting Malicious Behavior in Browser Extensions,”
     //www.bbc.com/news/technology-28162273.                                                in Proceedings of the 23rd USENIX Security Symposium, 2014.
[26] R. Gross and A. Acquisti, “Information Revelation and Privacy in Online           [48] Cisco. (2015, May) Visual Networking Index, Global Trafﬁc Forecast.
     Social Networks,” in Proceedings of the 2005 ACM Workshop on Privacy                   https://www.cisco.com/c/en/us/solutions/collateral/service-provider/
     in the Electronic Society, ser. WPES ’05, 2005.                                        ip-ngn-ip-next-generation-network/white paper c11-481360.html.
[27] I. Polakis, G. Argyros, T. Petsios, S. Sivakorn, and A. D. Keromytis,             [49] PurpleWiFi. (2014, Jun.) Our latest survey: how do people
     “Where’s wally? precise user discovery attacks in location proximity                   use      WiFi     in      public    places?    http://www.purplewiﬁ.net/
     services,” in CCS ’15, 2015, pp. 817–828.                                              latest-survey-people-use-wiﬁ-public-places/.
[28] A. Hannak, P. Sapiezynski, A. Molavi Kakhki, B. Krishnamurthy,                    [50] R. Dingledine, N. Mathewson, and P. Syverson, “Tor: The Second-
     D. Lazer, A. Mislove, and C. Wilson, “Measuring Personalization of                     generation Onion Router,” in Proceedings of the 13th USENIX Security
     Web Search,” in Proceedings of the 22nd International Conference on                    Symposium, ser. SSYM ’04, 2004.
     World Wide Web, ser. WWW ’13, 2013.
                                                                                       [51] EFF. HTTPS Everywhere. https://www.eff.org/https-Everywhere.
[29] X. Xing, W. Meng, D. Doozan, A. C. Snoeren, N. Feamster, and W. Lee,
                                                                                       [52] X. Zheng, J. Jiang, J. Liang, H. Duan, S. Chen, T. Wan, and N. Weaver,
     “Take This Personally: Pollution Attacks on Personalized Services,” in
                                                                                            “Cookies Lack Integrity: Real-World Implications,” in Proceedings of
     Proceedings of the 22nd USENIX Security Symposium, 2013.
                                                                                            the 24th USENIX Security Symposium, 2015.
[30] A. Chaabane, G. Acs, and M. A. Kaafar, “You Are What You Like!
                                                                                       [53] A. P. Felt, A. Ainslie, R. W. Reeder, S. Consolvo, S. Thyagaraja,
     Information Leakage Through Users Interests,” in Proceedings of the
                                                                                            A. Bettes, H. Harris, and J. Grimes, “Improving SSL Warnings: Compre-
     Network and Distributed System Security Symposium, ser. NDSS ’12,
                                                                                            hension and Adherence,” in Proceedings of the Conference on Human
     2012.
                                                                                            Factors and Computing Systems, 2015.
[31] comScore.        (2015,    Aug.)     July    2015      U.S.      Desktop
     Search          Engine       Rankings.        http://www.comscore.com/            [54] B. Potter, “Wireless Hotspots: Petri Dish of Wireless Security,” Commun.
     Insights/Market-Rankings/comScore-Releases-July-2015-U.S.                              ACM, vol. 49, no. 6, Jun. 2006.
     -Desktop-Search-Engine-Rankings?                                                  [55] A. Bortz, A. Barth, and A. Czeskis, “Origin cookies: Session integrity for
[32] A. Acquisti, R. Gross, and F. Stutzman, “Faces of facebook: Privacy in                 web applications,” in Proceedings of the Web 2.0 Security and Privacy
     the age of augmented reality,” BlackHat, 2011.                                         2011 workshop, ser. W2SP ’11, 2011.
[33] I. Polakis, G. Kontaxis, S. Antonatos, E. Gessiou, T. Petsas, and E. P.           [56] R. Wang, S. Chen, and X. Wang, “Signing Me onto Your Accounts
     Markatos, “Using Social Networks to Harvest Email Addresses,” in                       through Facebook and Google: a Trafﬁc-Guided Security Study of
     Proceedings of the 9th Annual ACM Workshop on Privacy in the                           Commercially Deployed Single-Sign-On Web Services,” in Proceedings
     Electronic Society, ser. WPES ’10, 2010.                                               of the 2012 IEEE Symposium on Security and Privacy, 2012.
[34] F. M. Harper, D. Raban, S. Rafaeli, and J. A. Konstan, “Predictors                [57] C. Karlof, U. Shankar, J. D. Tygar, and D. Wagner, “Dynamic Pharm-
     of Answer Quality in Online Q&Amp;A Sites,” in Proceedings of the                      ing Attacks and Locked Same-origin Policies for Web Browsers,” in
     SIGCHI Conference on Human Factors in Computing Systems, ser. CHI                      Proceedings of the 14th ACM Conference on Computer and Communi-
     ’08, 2008.                                                                             cations Security, 2007.
[35] D. Pelleg, E. Yom-Tov, and Y. Maarek, “Can You Believe an Anonymous               [58] S. Lekies, B. Stock, M. Wentzel, and M. Johns, “The Unexpected
     Contributor? On Truthfulness in Yahoo! Answers,” in SOCIALCOM-                         Dangers of Dynamic JavaScript,” in Proceedings of the 24th USENIX
     PASSAT ’12, 2012.                                                                      Security Symposium, 2015.
[36] J. A. Calandrino, A. Kilzer, A. Narayanan, E. W. Felten, and                      [59] A. Barth, C. Jackson, and J. C. Mitchell, “Robust Defenses for Cross-
     V. Shmatikov, “You Might Also LIke: Privacy Risks of Collaborative                     Site Request Forgery,” in Proceedings of the 15th ACM Conference on
     Filtering,” in Proceedings of the 2011 IEEE Symposium on Security and                  Computer and Communications Security, 2008.
     Privacy, 2011.                                                                    [60] N. Nikiforakis, W. Meert, Y. Younan, M. Johns, and W. Joosen,
[37] J. Y. Tsai, S. Egelman, L. Cranor, and A. Acquisti, “The Effect of Online              “SessionShield: Lightweight Protection against Session Hijacking,” in
     Privacy Information on Purchasing Behavior: An Experimental Study,”                    Engineering Secure Software and Systems, ser. ESSoS ’11, 2011.
     Info. Sys. Research, vol. 22, no. 2, 2011.                                        [61] P. De Ryck, L. Desmet, F. Piessens, and W. Joosen, “SecSess: Keeping
[38] N. Christin, S. S. Yanagihara, and K. Kamataki, “Dissecting One Click                  Your Session Tucked Away in Your Browser,” in Proceedings of the 30th
     Frauds,” in Proceedings of the 17th ACM Conference on Computer and                     Annual ACM Symposium on Applied Computing, ser. SAC ’15, 2015.
     Communications Security, 2010.                                                    [62] M. Johns, “SessionSafe: Implementing XSS Immune Session Handling,”
[39] U. Chareca, “Inferring user demographics from reading habits,” Master’s                in Proceedings of the 11th European conference on Research in Com-
     thesis, Linköping University, 2014.                                                   puter Security, ser. ESORICS’ 06, 2006.
[40] J. R. Mayer and J. C. Mitchell, “Third-Party Web Tracking: Policy and             [63] C. Jackson and A. Barth, “ForceHTTPS: Protecting high-security web
     Technology,” in Proceedings of the 2012 IEEE Symposium on Security                     sites from network attacks,” in Proceedings of the 17th International
     and Privacy, 2012.                                                                     World Wide Web Conference, ser. WWW ’08, 2008.




                                                                                 740
[64] J. Selvi, “Bypassing HTTP Strict Transport Security,” BlackHat-EU,
     2014.
[65] K. Bhargavan, A. Delignat-Lavaud, C. Fournet, , A. Pironti, and P.-Y.
     Strub, “Triple Handshakes and Cookie Cutters: Breaking and Fixing
     Authentication over TLS,” in Proceedings of the 2014 IEEE Symposium
     on Security and Privacy, 2014.
[66] S. Sivakorn, I. Polakis, and A. D. Keromytis, “I am robot: (deep) learning
     to break semantic image captchas,” in IEEE European Symposium on
     Security and Privacy (EuroS&P) 2016.
[67] E. Toch, Y. Wang, and L. Cranor, “Personalization and privacy: a survey
     of privacy risks and remedies in personalization-based systems,” User
     Modeling and User-Adapted Interaction, vol. 22, no. 1-2, 2012.
                                                                                                 (a) Browsed page            (b) Attacker receives ads exposing
[68] P. Chen, N. Nikiforakis, C. Huygens, and L. Desmet, “A dangerous mix:
                                                                                                                             browsed page.
     Large-scale analysis of mixed-content websites,” in Proceedings of the
     16th Information Security Conference, 2013.
                                                                                        Fig. 6. Side-channel leak of user’s browsing history by the Doubleclick ad
[69] J. Clark and P. C. van Oorschot, “SoK: SSL and HTTPS: Revisiting
                                                                                        network.
     Past Challenges and Evaluating Certiﬁcate Trust Model Enhancements,”
     in Proceedings of the 2013 IEEE Symposium on Security and Privacy.
[70] S. Chen, Z. Mao, Y.-M. Wang, and M. Zhang, “Pretty-bad-proxy: An
     overlooked adversary in browsers’ https deployments,” in Proceedings                  New York Times. The HTTP cookie allows the adversary
     of the 2009 IEEE Symposium on Security and Privacy, 2009.
[71] Z. Durumeric, J. Kasten, D. Adrian, J. A. Halderman, M. Bailey, F. Li,             to obtain or change the user’s proﬁle photo, name and last
     N. Weaver, J. Amann, J. Beekman, M. Payer, and V. Paxson, “The Matter              name, a link pointing to a personal homepage, and a short
     of Heartbleed,” in Proceedings of the 2014 Conference on Internet                  personal description (bio). The adversary can also obtain and
     Measurement Conference, ser. IMC ’14, 2014, pp. 475–488.
[72] D. Adrian, K. Bhargavan, Z. Durumeric, P. Gaudry, M. Green, J. A.                  edit the list of articles that the user has saved.
     Halderman, N. Heninger, D. Springall, E. Thomé, L. Valenta, B. Vander-               The Guardian. Stolen HTTP cookies provide access to the
     Sloot, E. Wustrow, S. Zanella-Béguelin, and P. Zimmermann, “Imperfect             user’s public proﬁle sections, which includes a proﬁle picture
     Forward Secrecy: How Difﬁe-Hellman Fails in Practice,” in Proceedings
     of the 22nd ACM Conference on Computer and Communications Secu-                    and username, a short bio, the user’s interests, and previous
     rity, 2015.                                                                        comments on articles. The adversary can also post comments
[73] S. Fahl, M. Harbach, T. Muders, L. Baumgärtner, B. Freisleben, and                as the user.
     M. Smith, “Why Eve and Mallory Love Android: An Analysis of
     Android SSL (in)Security,” in Proceedings of the 2012 ACM Conference                  Hufﬁngton Post. Similar to CNN, almost the entire website
     on Computer and Communications Security, 2012.                                     runs overs unencrypted connections, and the HTTP cookie
[74] S. Fahl, M. Harbach, H. Perl, M. Koetter, and M. Smith, “Rethinking
     SSL Development in an Appiﬁed World,” in Proceedings of the 2013
                                                                                        allows read and edit access to the user’s proﬁle, article
     ACM SIGSAC Conference on Computer and Communications Security,                     subscriptions, comments, fans and followings. The proﬁle
     2013.                                                                              includes the user’s login name, proﬁle photo, email address,
[75] M. Huber, M. Mulazzani, and E. Weippl, “Tor http usage and informa-
     tion leakage,” in Communications and Multimedia Security, 2010.
                                                                                        biography, postal code, city and state. The attacker can also
[76] S. Chakravarty, G. Portokalidis, M. Polychronakis, and A. D. Keromytis,            change the user’s password, or delete the account.
     “Detecting Trafﬁc Snooping in Tor Using Decoys,” in Recent Advances
     in Intrusion Detection, 2011.                                                       {"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS
[77] P. Winter, R. Köwer, M. Mulazzani, M. Huber, S. Schrittwieser, S. Lind-               9_0_2 like Mac OS X) AppleWebKit/601.1.46
     skog, and E. Weippl, “Spoiled Onions: Exposing Malicious Tor Exit                      (KHTML, like Gecko) Mobile/13A452",
                                                                                         "cookie_name": "amzn-app-ctxt",
     Relays,” in Privacy Enhancing Technologies Symposium, 2014.
                                                                                         "cookie_value": "1.4%20
                                                                                            {"os":"iOS"
                                A PPENDIX                                                   "ov":"9.0.2"
                                                                                            "an":"Amazon"
A. Information Leakage                                                                      "av":"5.3.0"
                                                                                            "dm":{"w":"640" "h":"960" "ld":"2.000000"}
   Here we provide some details or information on certain                                   "uiv":5 "nal":1
services that were omitted from Section III.                                                "cp":8xxxxx
                                                                                            "xv":"1.11"
   Doubleclick. Figure 6 contains screenshots of our experi-                                "di":{"ca":"AT&T"
ment that demonstrates how ad networks can reveal parts of a                                     "ct":"Wifi"
                                                                                                 "mf":"Apple"
user’s browsing history.                                                                         "pr":"iPhone"
   CNN. Almost the entire website runs over HTTP, including                                      "md":"iPhone"
                                                                                                 "v":"4S"
the login page, which can be exploited by active adversaries                                     "dti":"A287xxxxxxxxxx"
                                                                                            }}"
to modify or inject content. The credentials, however, are                               }
sent over HTTPS, preventing eavesdroppers from hijacking
the user’s session. Nonetheless, the HTTP cookie allows the                             Listing 2. User information disclosed in the value attribute of Walmart’s
                                                                                        HTTP customer cookie (values have been changed for privacy).
attacker to view and edit the user’s proﬁle, which includes ﬁrst
and last name, postal address, email and phone number, proﬁle                             Amazon. the adversary can obtain information regarding
picture and link to the user’s Facebook account. Furthermore,                           previously purchased items either through the recommendation
the attacker can write or delete article comments, and also                             page (Figure 7(a)) or through product pages (Figure 7(b)). The
obtain the recently viewed or created reports on iReport,                               iOS versions of the Amazon app also exposes information
CNN’s citizen journalism portal6 .                                                      about the user’s mobile device, as shown in Listing 2.
  6 http://ireport.cnn.com/                                                               Ebay. Apart from the login and checkout pages, the re-
                                                                                        maining Ebay website runs over HTTP. As a result, the stolen


                                                                                  741
                                                                                   arbitrary items. The attacker can also deploy the two afore-
                                                                                   mentioned extortion scams.

                                                                                    {"domain": ".walmart.com",
                                                                                    "name": "customer",
                                                                                    "path": "/",
                                                                                    "secure": false,
                                                                                    "httpOnly": false,
                                                                                    "value": "%7B%22firstName%22%3A%22JANE%22%2C%22
                                                                                       lastName%22%3A%22DOE%22%2C%22
                                                                                       emailAddress%22%3A%22janedoe%40example.com%22%2C%22
                                                                                       isMigrated%22%3Atrue%2C%22
                                                                                       omsCustomerId%22%3A%22xxxxxxx9%22%2C%22
                                                                                       ReviewUser%22%3A%7B%22isValid%22%3Atrue%2C%22
       (a) Recommendations Page                   (b) Product Page                     AdditionalFieldsOrder%22%xxxxxxxx%2C%22
                                                                                       Avatar%22%3A%7B%7D%2C%22
Fig. 7. Obtaining information about previously purchased items from user’s             UserNickname%22%3A%22xxxxxxxxx%22%2C%22
Amazon account.                                                                        Photos%22%3A%5B%5D%2C%22
                                                                                       ContextDataValues%22%xxxxxxxx%2C%22
                                                                                       Videos%22%3A%5B%5D%2C%22
                                                                                       ContextDataValuesOrder%22%3A%xxxxxxxxxC%22
                                                                                       SubmissionId%22%3Axxxxx%2C%22
HTTP cookie gives the adversary access to both personal                                ContributorRank%22%3A%22xxxx%22%2C%22
information and account functionality.                                                 StoryIds%22%xxxxxxxxC%22
                                                                                       AnswerIds%22%xxxxxx%2C%22
   Personal information. The site always reveals the user’s ﬁrst                       QuestionIds%22xxxxxxD%2C%22
name. Also, depending on what the victim uses for logging                              BadgesOrder%22xxxxxx%2C%22
                                                                                       Badges%22%xxxxxxxxx2C%22
in (username or email address) is also exposed. By forging a                           Location%22%3Axxxxx%2C%22
cookie with the same value but a different scope (domain and                           SecondaryRatingsOrder%22xxxxxx%2C%22
                                                                                       ProductRecommendationIds%22%3A%xxxxxxxxx2C%22
path), we are also able to obtain the user’s delivery address.                         AdditionalFields%22%3A%7B%7D%2C%22
                                                                                       SubmissionTime%22%3A%2220xx-xx-xxxxxxxxxxxxx%22%2C%22
The HTTP cookies can also access the user’s messages, which                            ModerationStatus%22%3A%22APPROVED%22%2C%22
are normally served over HTTPS.                                                        ReviewIds%22%3xxxxxxx%2C%22
                                                                                       ThirdPartyIds%22%xxxxxxxxxxC%22
   History. The cookie provides access to the functionality that                       Id%22%3A%22ff79xxxxxxxxxxxxxx509dc5%22%2C%22
exposes the victim’s purchase history, and also allows us to                           CommentIds%22%3A%5B%5D%2C%22
                                                                                       SecondaryRatings%22%3Axxxxx%2C%22
view and edit the items in the victim’s watch and wish-lists.                          LastModeratedTime%22%3A%2220xxxxxxxxxxxxxxxx%22%2C%22
                                                                                       reviewStatus%22%3A%7B%22
We can also see which items have been bought or bid upon                               hasReview%22%3Axxxxx%7D%7D%7D"
in the past, and all the items being sold by the. victim.                           }

   Cart. Similarly to the other e-commerce websites we tested,
                                                                                   Listing 3. User information disclosed in the value attribute of Walmart’s
the HTTP cookie enables access to the cart,. for viewing items                     HTTP customer cookie (values have been changed for privacy).
already in it, or adding/removing items.
   Walmart. If the adversary appends the stolen cookies when
connecting, the website will reveal the user’s ﬁrst name,
postcode, and also allow editing of the cart. However, upon
inspection, we found that the customer HTTP cookie ac-
tually contains 34 ﬁelds of information about the user within
its value attribute. Apart from the subset that can be seen
in Listing 3, which includes the user’s ﬁrst and last name and
email address, the cookie also contains ID information that
points to the user’s reviews and comments, and a tracking ID
for third parties.
   Target. As with most e-commerce sites, the stolen cookie
reveals the user’s ﬁrst name, email address, and the ability to
view and edit the cart, and the user’s wish-list. Furthermore,
it also reveals items recently viewed by the user.
   Vendor-assisted attacks. The cookie exposes function-
ality that can be leveraged for deploying spam, simi-
larly to Amazon. The attacker can either add items in
the cart and send an email about those items (sent by
orders@service.target.com), or create and send a
wish-list (sent by noreply@service.target.com). In
both cases, the emails explicitly contain the user’s full name
(thus, making the last name obtainable to the attacker). While
the attacker cannot include any text, which would facilitate
deploying spam or phishing campaigns, one could promote



                                                                             742
