New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 659489 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android , iOS
Pri: 0
Type: Bug-Security

Blocked on:
issue 659492



Sign in to add a comment

Pwn2Own: content: scheme allows cross-origin info leaks

Project Member Reported by dcheng@chromium.org, Oct 26 2016

Issue description

The primary bug appears to be that the Android content: scheme exposes downloads directory, but doesn't enforce isolation between downloaded files

We may also want to investigate mitigations in other areas (for example, downloads can be triggered by calling click() on an <a download> with no user interaction).
 

Comment 1 by dcheng@chromium.org, Oct 26 2016

Cc: nnk@google.com

Comment 2 by dcheng@chromium.org, Oct 26 2016

mwri_pwn2own-android-whitepaper_2016-03-14.doc
171 KB Download

Comment 3 by dcheng@chromium.org, Oct 26 2016

Blockedon: 659492

Comment 4 by dcheng@chromium.org, Oct 26 2016

Cc: quanto@google.com olorin@google.com shaileshs@google.com

Comment 5 by rsesek@chromium.org, Oct 26 2016

Cc: rsesek@chromium.org

Comment 6 by aarya@google.com, Oct 26 2016

Cc: twelling...@chromium.org aelias@chromium.org dfalcant...@chromium.org tedc...@chromium.org yus...@chromium.org qin...@chromium.org wangxianzhu@chromium.org
Owner: mariakho...@chromium.org
Chrome for Android allows web sites to automatically download HTML pages to the device and redirect to them
using the &quot;Content://&quot; scheme. Once in the Content scheme, the Same Origin Policy does not protect a
downloaded HTML from accessing other content files, such as other downloaded files.

Not only does this give web pages access to sensitive user data in the Download directory via a carefully crafted
downloaded HTML page, but also enables the interaction with any other web site. This is achieved by triggering
GET requests, downloading the response and reading the response back out using their own downloaded HTML
page.

MWR used this vulnerability to exfiltrate the victim&#39;s Downloaded files, and then to also interact with sites they were
logged into. In particular, this was used to read out files from the victim&#39;s Google Drive account, and to install
applications to the device using the Google Play store.

Chrome for Android permits the use of &quot;content&quot; as a scheme. This scheme according to the AndroidManifest.xml
file is marked as BROWSABLE:

&lt;activity android:name=”org.chromium.chrome.browser.document.ChromeLauncherActivity”
android:theme=”@android:style/Theme.Translucent.NoTitleBar”&gt;
…(snip)…
&lt;intent-filter&gt;

&lt;action android:name=&quot;android.intent.action.VIEW&quot;/&gt;

&lt;category android:name=&quot;android.intent.category.DEFAULT&quot;/&gt;

&lt;category android:name=&quot;android.intent.category.BROWSABLE&quot;/&gt;

&lt;data android:scheme=&quot;googlechrome&quot;/&gt;

&lt;data android:scheme=&quot;http&quot;/&gt;

&lt;data android:scheme=&quot;https&quot;/&gt;

&lt;data android:scheme=&quot;about&quot;/&gt;

&lt;data android:scheme=&quot;content&quot;/&gt;

This allows an attacker to redirect a user from a malicious web page to a file stored under the content scheme,
which includes any downloaded file. Downloads are accessible with the content scheme due to Android&#39;s
DownloadProvider allowing file access to downloaded files via its content://downloads/my_downloads/# URL. An
example of this redirect in JavaScript would therefore be:
document.location=&#39;content://downloads/my_downloads/25&#39;;

If a malicious HTML page is downloaded, chrome can be redirected to the content:// url of this download. From
here due to the Same Origin Policy of content URLs, it is possible to read any other download file and exfiltrate
their data. For example if an HTML page &#39;content://downloads/my_downloads/25&#39; was loaded into Chrome, then
this page could open content://downloads/my_downloads/23 into an iframe and read its contents.

The downloading of HTML pages can be achieved without user interaction. This is performed by placing the URL
into an HTML Anchor element that includes the Download attribute and then calling the “click()” function in
JavaScript. This technique works for downloading pages on the malicious site, but also for any page on any other
web site. This can be used, for example, to exfiltrate Google Drive files by determining their URL and then
triggering their download. By redirecting to the malicious downloaded HTML page under the content scheme, it is
then possible to exfiltrate these downloaded files.

These exfiltrated pages will contain Cross Site Request Forgery (CSRF) tokens needed to make valid POST
messages. The data from the exfiltrated pages can therefore be used to create and submit valid POST requests to
these same sites. In essence it allows for an attack that can bypass a site&#39;s CSRF protection to perform sensitive
actions on the site as the victim, or to download and exfiltrate further data.

Comment 7 by dcheng@chromium.org, Oct 26 2016

Going to add the CCs to the dependent bug, since there's already some discussion there.

Comment 8 by klo...@chromium.org, Oct 26 2016

Cc: -qin...@chromium.org mariakho...@chromium.org
Owner: qin...@chromium.org
Status: Assigned (was: Untriaged)

Comment 9 by kerz@chromium.org, Oct 26 2016

Labels: M-54 ReleaseBlock-Stable
This is a meta bug, lets do discussion in 659492.

Comment 11 by quanto@google.com, Oct 26 2016

can the android guys get access to 659492?
Anybody CCed on this bug is now CCed on 659492.

Comment 13 by aarya@google.com, Oct 26 2016

Done!

Comment 14 by ta...@google.com, Oct 27 2016

Components: UI>Browser>Navigation
Labels: Security_Impact-Stable OS-iOS
Status: Fixed (was: Assigned)
Since it appears all Pwn2Own bugs have been fixed on trunk and all release branches, marking this meta bug as fixed - please reopen if there is still work pending.
Project Member

Comment 16 by sheriffbot@chromium.org, Nov 1 2016

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify
Project Member

Comment 17 by sheriffbot@chromium.org, Nov 3 2016

Labels: Merge-Request-55

Comment 18 by dimu@chromium.org, Nov 4 2016

Labels: -Merge-Request-55 Merge-Review-55 Hotlist-Merge-Review
[Automated comment] Less than 2 weeks to go before AppStore submit on M55, manual review required.
Labels: -ReleaseBlock-Stable -Merge-Review-55 Merge-Rejected-55
Merge to M55 was done on 659492
Labels: -Hotlist-Merge-Review
Project Member

Comment 21 by sheriffbot@chromium.org, Feb 7 2017

Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment