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

Issue metadata

Status: Fixed
Owner:
Closed: Oct 8
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug-Security



Sign in to add a comment
link

Issue 889459: Security: remote code execution attack chain

Reported by ma7h1a...@gmail.com, Sep 26

Issue description

VERSION
Chrome Version: chrome 70 beta / 69 stable
Operating System: windows7

Ignore Sandbox , Ignore Applock , Ignore download restriction , so funny :)

combined 3 bugs into logical vulnerability attack chain

1. url spoof
popup on sites.google.com , the popup did not show the real origin which open it

2. download safe.txt , bypass the check.

3. user click the button , here comes the calc.exe.

online demo : https://sites.google.com/view/userslogin

reproduce see rce.mp4

when try to reproduce it by yourself

visit http://f.3cm.me/r/chrome_rce.html and edit username variable to yourself

as we know python is usually installed like java , but only it did not check the extension , ".py" is blocked by the downloader

I also found attack chain by windows itself using file format vulnerability (do not need to install anything) , but I reported it to microsoft , I think it's the right place , when it was fixed by microsoft , then it would be fixed in chrome.
 
rce.mp4
828 KB View Download

Comment 1 by kenrb@chromium.org, Sep 26

Cc: dominickn@chromium.org benwells@chromium.org
Labels: Security_Severity-High Security_Impact-Stable Pri-1
Owner: mea...@chromium.org
Status: Assigned (was: Unconfirmed)
Interesting report, thanks. The main problem here seems to be that we allow ProgIDs to be launched as external protocol handlers on Windows, and that is pretty scary on its own.

Adding some people who might have thoughts on how to prevent that.

Comment 2 by sheriffbot@chromium.org, Sep 27

Project Member
Labels: M-69 Target-69

Comment 3 by ma7h1a...@gmail.com, Sep 29

confirm it would also affect popular application like java with default installation config. (which use jarfile: in regedit,  and do not check extension so bypassed the download check , also bypass the sandbox)

Comment 4 by awhalley@google.com, Oct 1

Labels: -Target-69 Target-70 M-70

Comment 5 by mea...@chromium.org, Oct 1

Components: Internals>PlatformIntegration
The reason for allowing ProgIDs is that the difference between a ProgID and a custom protocol is small, from Windows's point of view. Both are registered under HKEY_CLASSES_ROOT\<string>\, but custom protocols have an extra "URL Protocol" key with an empty string.

So when we are launching an external protocol, we ought to make sure if the protocol is a valid one by checking a "URL Protocol" key exists under the registered class.

I tested this on Windows by creating a .url file pointing to an iTunes link in Windows Explorer:

[InternetShortcut]
URL=itmss://itunes.apple.com/deeplink?app=music&p=subscribe&ign-refClientId=3z1mamAFz6MRz4XczD3ozBJwRKWNQ
IDList=
HotKey=0
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,0

When iTunes is installed, this shortcut works properly. But when I remove HKEY_CLASSES_ROOT\itmss\"URL Protocol" key, Explorer complains with "Unable to open this Internet Shortcut. The protocol itmss does not have a registered program."

So this would be my suggested fix. But as a quick bandaid, we can also add python.file and jarfile to the denided schemes: https://cs.chromium.org/chromium/src/chrome/browser/external_protocol/external_protocol_handler.cc?rcl=5e3bf2a1f618d292d253ee5b0236fcd2cb909c50&l=36

Comment 6 by palmer@chromium.org, Oct 2

Labels: OS-Windows

Comment 7 by mea...@chromium.org, Oct 2

Cc: nasko@chromium.org wfh@chromium.org
Tentative patch: https://chromium-review.googlesource.com/c/chromium/src/+/1256208

This also affects Windows 10, by the way.

Comment 8 by mea...@chromium.org, Oct 2

nasko, wfh: As Windows experts, would you be able to take a look at comment #5 and see if the fix makes sense to you?

Comment 9 by mea...@chromium.org, Oct 2

Status: Started (was: Assigned)

Comment 10 by wfh@chromium.org, Oct 2

the fix in #5 seems reasonable, but I don't know if it might break behavior people are relying on...?

Comment 11 by mea...@chromium.org, Oct 2

Probably will, but there is a workaround (adding the relevant registry key) so I'm not overly concerned about breakage.

Comment 12 by mea...@chromium.org, Oct 2

Cc: grt@chromium.org
+grt for bug visibility

Comment 13 by ma7h1a...@gmail.com, Oct 8

sorry , the online demo URL changed to http://1vpctucm.3cm.me/chrome_rce.html
if you want to check the patch is effective or not, visit it please.

Comment 14 by bugdroid1@chromium.org, Oct 8

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d19a75fc26fd0ab1ce79ef3d1c1c9b3cc1fbd098

commit d19a75fc26fd0ab1ce79ef3d1c1c9b3cc1fbd098
Author: Mustafa Emre Acer <meacer@chromium.org>
Date: Mon Oct 08 18:15:14 2018

Validate external protocols before launching on Windows

Bug:  889459 
Change-Id: Id33ca6444bff1e6dd71b6000823cf6fec09746ef
Reviewed-on: https://chromium-review.googlesource.com/c/1256208
Reviewed-by: Greg Thompson <grt@chromium.org>
Commit-Queue: Mustafa Emre Acer <meacer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597611}
[modify] https://crrev.com/d19a75fc26fd0ab1ce79ef3d1c1c9b3cc1fbd098/chrome/browser/shell_integration_win.cc

Comment 15 by mea...@chromium.org, Oct 8

Status: Fixed (was: Started)

Comment 16 by sheriffbot@chromium.org, Oct 9

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

Comment 17 by awhalley@google.com, Oct 15

Labels: -M-69 -Target-70 -M-70 Target-71 M-71

Comment 18 by awhalley@chromium.org, Oct 15

Labels: reward-topanel

Comment 19 Deleted

Comment 20 by awhalley@google.com, Oct 17

Labels: -Merge-Rejected-70

Comment 21 by awhalley@chromium.org, Oct 22

Labels: -reward-topanel reward-unpaid reward-1000
*** 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.
*********************************

Comment 22 by awhalley@google.com, Oct 22

Labels: -Security_Severity-High Security_Severity-Medium
Hi ma7h1as.l@ - thanks for the report! The VRP Panel decided that this bug should be tracked as medium severity, and awarded $1,000 - cheers!

Comment 23 by awhalley@chromium.org, Oct 22

Labels: -reward-unpaid reward-inprocess

Comment 24 Deleted

Comment 25 Deleted

Comment 26 Deleted

Comment 27 by awhalley@google.com, Dec 3

Labels: Release-0-M71

Comment 28 by awhalley@chromium.org, Dec 11

Labels: CVE-2018-18354 CVE_description-missing

Comment 29 by awhalley@chromium.org, Dec 11

Labels: -CVE_description-missing CVE_description-submitted

Comment 30 by sheriffbot@chromium.org, Jan 15

Project Member
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