Issue metadata
Sign in to add a comment
|
Security: It is currently possible to sideload non Play Store apks on a Chromebook in Verified Boot (non-Dev) mode via adb.
Reported by
n35...@gmail.com,
Aug 14 2017
|
||||||||||||||||||||||
Issue descriptionDetails: As per title summary - it is currently possible to sideload non Play Store apps on a Chromebook in Verified Boot (non-Dev) mode. It may be done via adb, so without having to enable 'Unknown Sources'. One may turn on adb debugging in Android, download the Android app GNURoot from the Play Store, add the android-tools-adb package to GNURoot, use adb in GNURoot to connect to the Android instance at localhost, then sideload the non Play store apk. Version information: Google Chrome: 59.0.3071.134 (Official Build) (32-bit) (Same situation on v61 Dev channel. Probably also 55-58). OS: Chrome OS Platform: 9460.73.0 (Official Build) stable-channel veyron_minnie Steps to reproduce: Example: installing non Play Store app DNS66 (ad-blocker). Switch on adb debugging in Android Developer options. Install GNURoot Debian from the Play Store. In GNURoot, apt update apt install android-tools-adb apt install android-tools-fastboot adb connect localhost #(or adb connect 100.115.92.2) Android RSA authentication checkbox dialog pops up. We may now either download the desired non Play store apk in Chrome in CrOS (or copy it from a storage device to 'Downloads' with the 'Files' app), then switch back to GNURoot and install it from /storage/emulated/0/Download/ with 'adb shell pm install', or we can download and install the apk directly in GNURoot e.g. apt install wget cd /home wget https://f-droid.org/repo/org.jak_linux.dns66_16.apk adb shell pm install /storage/emulated/0/GNURoot/home/org.jak_linux.dns66_16.apk In either case, the app is installed, and may be opened via the CrOS Launcher/Search button as usual. Other comments: I was not sure whether this might be considered a 'security bug/issue', other 'issue', or simply an 'undocumented feature'. I imagine there's probably already been some consideration given internally with regard to potentially making the 'Unknown Sources' Android option available in verified boot mode; if there are no immediate plans to support the installation of non Play store apps while in verified boot mode, I suppose that perhaps the current situation of having adbd running in Android, and accessible from e.g. GNURoot, with the 'adb debugging' option available within the Android settings, outside of Dev mode, might be considered a potential security-related issue. I had the thought of writing up a short guide to using this method of sideloading non Play store apks on a blog/social media website, as I am aware that some people have been asking around on forums etc. for a method to sideload Android apps on Chrome OS without having to be in Dev mode, but bearing in mind that there could be potential security implications to doing this, and that the official developer guide* advises that Dev Mode and Unknown Sources should be enabled to sideload apps, I just wanted to check in here on the bug tracker first, to make sure you guys were aware that this is possible, and in case anyone might perhaps like to express a preference that this method not be made more widely known at this time. *https://developer.android.com/topic/arc/sideload.html
,
Aug 14 2017
,
Aug 14 2017
Guessing sev high, not sure why you'd even get as far as running the debugger in dev mode.
,
Aug 14 2017
Elijah, Dylan, is this expected?
,
Aug 14 2017
No, that certainly shouldn't be possible. Where did the installation of apk's get restricted?
,
Aug 14 2017
This does require local access to switch the ADB toggle inside the container though.
,
Aug 14 2017
I haven't been able to get this to work on my corp device. adb won't connect to localhost.
,
Aug 14 2017
While I can't speak to any difference between a corp device and my own, there is an extra step to reproduce that I accidentally omitted from the bug report. I just powerwashed my device and retried the procedure, and it turns out that a reboot of the device is in fact necessary before adb will connect successfully. Apologies for the omission of this additional step in the original bug report.
,
Aug 14 2017
I'll set up a device in verified mode that isn't enrolled and try again. The reboot didn't help on my enrolled device. Thanks for following up!
,
Aug 14 2017
Got it. On a non-corp, normal mode device I can push an apk I download from the web. I don't understand why this doesn't happen on a corp device, but we will try to figure that out separately.
,
Aug 14 2017
I was under the impression PackageInstaller should also be invoked via the ADB install path, which should be restricted to dev mode, but seems like I'm mistaken. +jhorwich who implemented this
,
Aug 15 2017
+jhorwich for real and +lhchavez too
,
Aug 15 2017
Two things *should* prevent PackageInstaller from handling the android.intent.action.INSTALL_PACKAGE intent in cases like this. First, the check for dev_mode when running on a Chromebook. Second, the normal check for Settings.Secure.INSTALL_NON_MARKET_APPS. Given that the user's "steps to reproduce" don't include "enable sideloading in Settings > Security" (*) - and even explicitly mentions it's not necessary - I'm inclined to believe that adb must be using a different mechanism to install the APK - e.g. through PackageInstallerService (base/services/core/java/com/android/server/pm/PackageInstallerService.java), not the PackageInstaller app / intent handlers. I was also able to install via adb onto my Chromebook, which was in Dev Mode, but did NOT have sideloading enabled by the user in Settings > Security. (*) Which *also* shouldn't be possible on a Verified-Boot (non-Dev) mode Chromebook FWIW.
,
Aug 15 2017
Josh, can you figure out how to disable the PackageInstallerService method of installation too?
,
Aug 15 2017
,
Aug 15 2017
One thing that's not clear to me is why adbd is running in verified mode as well. At one point we had conditionalized adbd on dev mode, does anyone have history of why this was changed?
,
Aug 15 2017
Even though init.cheets.rc does gate starting adbd on dev mode, there's another .rc (init.usb.rc) that can start adbd under different conditions. concretely, the steps outlined in #c0 wil cause sys.usb.config to have the value of "adb" (instead of "mtp,adb"). The best course of action is probably to remove the /init.usb.rc and /init.usb.configfs.rc altogether so this can't happen again. Also, add a stanza in init.cheets.rc so that it also matches property:sys.usb.config=adb instead of just property:sys.usb.config=mtp,adb.
,
Aug 15 2017
comment #17 sounds like a good approach, then we can grey out the adb option later as a UI optimization.
,
Aug 15 2017
Should we also make pms/installd be aware of the source of an app? If the app does not come from Play store, then ignore the installation request?
,
Aug 15 2017
For comment #19; that sounds optimal, as long the check can be bypassed if the chromebook is in developer mode.
,
Aug 15 2017
CLs outlined in #c17 have landed in Android. jhorwich@ is currently working on the adb option. +ketakid@ for merge approval.
,
Aug 17 2017
+josafat@ for M60 merge approval.
,
Aug 22 2017
Patches landed in nyc-mr1-arc and nyc-mr1-arc-m61 branches. 61 should have the fix as of platform version 9765.33.0. 62 should have the fix as of platform version 9854.0.0.
,
Aug 23 2017
,
Aug 28 2017
,
Aug 30 2017
this was tracked internally as b/64720460
,
Sep 11 2017
*** Boilerplate reminders! *** Please do NOT publicly disclose details until a fix has been released to all our users. Early public disclosure may cancel the provisional reward. Also, please be considerate about disclosure when the bug affects a core library that may be used by other products. Please do NOT share this information with third parties who are not directly involved in fixing the bug. Doing so may cancel the provisional reward. Please be honest if you have already disclosed anything publicly or to third parties. Lastly, we understand that some of you are not interested in money. We offer the option to donate your reward to an eligible charity. If you prefer this option, let us know and we will also match your donation - subject to our discretion. Any rewards that are unclaimed after 12 months will be donated to a charity of our choosing. *********************************
,
Sep 11 2017
Thanks for the report! The VRP panel decided to award $500 for this - many thanks!
,
Sep 11 2017
A member of our finance team will be in touch to arrange payment. Also, if this is included in Chrome release notes, how would you like to be credited?
,
Sep 12 2017
,
Sep 12 2017
Pleasure to assist, and thanks for the reward! If mentioned in any release notes, I'd like to be credited as "Julian J.". Cheers!
,
Nov 29 2017
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
,
Jan 22 2018
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by tsepez@chromium.org
, Aug 14 2017Status: Assigned (was: Unconfirmed)