Security: download protection doesn't work on local network
Reported by
vladimir...@gmail.com,
Jun 10 2018
|
||||
Issue descriptionVULNERABILITY DETAILS On local network it's possible to download dangerous files without check. chrome://histograms/SBClientDownload.CheckDownloadStats increments I'm not sure that it's incorrect behavior, but allowing to download dangerous files from local network looks like a bug. VERSION Chrome Version: 67.0.3396.79 (Official Build) Stable + 69.0.3453.3 canary Operating System: macOS 10.13.4 17E202 x86_64 REPRODUCTION CASE PoC attached Start 2 static servers on localhost:3000 and localhost:5000 (or using address in local network) 1. Open localhost:3000/test.html 2. Try to download test.sh from localhost:3000/test.sh - Chrome shows warnings about file extension 3. Try to download test.sh from localhost:5000/test.sh - Chrome downloads file without warnings 3. Try to download test.sh from 192.168.0.101:3000/test.sh (same as localhost:3000, but using address in intranet) - Chrome downloads file without warnings 4. Try to download test.sh from internet - Chrome downloads file without warnings
,
Jun 10 2018
(Although that would only explain Windows, not Mac)
,
Jun 10 2018
Ah, perhaps https://cs.chromium.org/chromium/src/chrome/browser/safe_browsing/client_side_detection_service.h?l=109&rcl=257f778c824dd36bd8896d120d6c6b006f117f51 // Returns true if the given IP address string falls within a private // (unroutable) network block. Pages which are hosted on these IP addresses // are exempt from client-side phishing detection. This is called by the // ClientSideDetectionHost prior to sending the renderer a // SafeBrowsingMsg_StartPhishingDetection IPC. // // ip_address should be a dotted IPv4 address, or an unbracketed IPv6 // address.
,
Jun 11 2018
#3 makes this sound like this is working as intended? Can anyone confirm that?
,
Jun 11 2018
On Windows .sh is not considered dangerous. Pings should still be getting sent, but the file won't be marked as dangerous if the SafeBrowsing service gives a verdict of UNKONWN.
On macOS, I can confirm that the pings do get sent for localhost:{3000,5000}. If SafeBrowsing returns UNKNOWN (i.e. the service doesn't have enough information to say whether this file is bad), then the warning should show up unless you've visited the host frequently[1]. But again, you should be seeing pings in the form of increments at bucket #27 in SBClientDownload.CheckDownloadStats (27 means UNKOWN).
[1]: E.g. If you try downloading test.sh from localhost:<port> where localhost:<port> is a host you haven't visited on your current browser profile, then you should see a warning. I think this may explain the discrepancies in prompting that you are seeing.
,
Jun 12 2018
Thanks, looks interesting I've tested this on a freshly installed Chromium and it works(i.e. download is blocked) Just interesting, what was the reason to implement this behavior? i.e., same-origin download from trusted host is blocked, while cross-origin download isn't
,
Jun 12 2018
Status -> WontFix. The current behavior is WAI and this issues doesn't uncover any previously unknown risks. #6: The behavior is based on the origin of the download and not whether the request that initiated the download was cross origin or not. There's no CORS restriction for downloads. Chrome has an additional heuristic for some potentially dangerous file types where we suppress the warning if both the following are true: a) The download was initiated via a user gesture (e.g. a click) b) The user has visited the download's host prior to the date of the download. This goal of this heuristic is to remove prompting for files that are downloaded frequently from a well known source (e.g. maybe you download ".sh" files from some staging site every day). The file types for which this heuristic applies are those that are marked as ALLOW_ON_USER_GESTURE in download_file_types.asciipb [1] (the format and an explanation of that file is at [2]). I hope this clarifies what's going on. [1]: https://chromium.googlesource.com/chromium/src/+/master/chrome/browser/resources/safe_browsing/download_file_types.asciipb [2]: https://chromium.googlesource.com/chromium/src/+/master/chrome/browser/resources/safe_browsing/README.md
,
Sep 19
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 |
||||
Comment 1 by elawrence@chromium.org
, Jun 10 2018