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

Issue 677759 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: ----
Type: Bug



Sign in to add a comment

Security: 'img' tag src attribute ddos/botnet

Reported by insanama...@gmail.com, Jan 1 2017

Issue description

VULNERABILITY DETAILS
I have sucessfully written a program that uses a client's browser to spam a website with GET request. It works by adding multiple 'img' tags to the current HTML document. The 'img' tag is generated with a src attribute of the target and a '/i' at the end of the url where i represents an integer. I have tested it against a python server and I was able to confirm that it does work.

VERSION
Chrome Version: all
Operating System: all

REPRODUCTION CASE
All files used will be attached to this message. I managed to write a node.js/socket.io browser based botnet using this exploit. To start it, make sure to install node and npm, then open a command promt/terminal at the extracted folder location and type 'npm install' and 'npm install ejs'. Once all the modules are installed on your local machine, run the index.js file using node (cmd: node index.js). If no errors occur, navigate to localhost:3000 in your web browser and login in with (username: datboi / password: 0e1b8b3ef01dad60a89c3b16b6eeff54). Once you have logged in, you will see that there is 1 bot connected, you. If you want to add more bots, open another tab and navigate to localhost:3000/client. Enter your target (the python server) as http://localhost:2000/ and it will print out every request that it receives.

PATCH
You would have to change the cross domain request policy for anything with the 'src' attribute, causing disruption all over the web. The other option is to limit the amount of images that can be loaded by javascript code (reasonable). I plan on sharing my findings with the internet community of programmers.
 
srcnet.zip
263 KB Download
Cc: mmoroz@chromium.org
Labels: Needs-Feedback
Thanks for your report.

Do you have an estimation on how many "bots" does an attacker need to cause a DDoS on a simple server, let's say the cheapest VPS with a default nginx installation?

One more question: assuming that cross domain requests with `src` attribute would be restricted, what would you suggest to do with other HTML elements: `script`, `iframe`, etc?
Sorry for the late reply, I had work all day yesterday. Anyway, assuming a nginx server can handle up to 500,000 request per second, and a bot can be modified to send up to 1000 request per second (change the setInterval time to 1), if the bots can handle it, I would assume the minimum amount of bots would be 500. However, with the current settings, each bot sends about 40 request per second. This would mean it would take about 12,500 bots to take out a high end nginx server. Keep in mind that by default the nginx server bottlenecks at about 50,000 request per second.

In a side note, restricting cross domain request in all src attributes would affect the web development community very negatively. My suggestion is change the src request protocol by having the client browser download a file that specifies what files can be retrieved, then before sending a request to a website, make sure that it is specified as retrievable. Once the file has been retrieved, it can be accessed through cache memory instead of sending more request. 
Cc: jww@chromium.org mkwst@chromium.org est...@chromium.org
Components: Blink>Loader
mkwst/jww/estark: Do you have any thoughts on this issue?
Labels: -Type-Bug-Security -Restrict-View-SecurityTeam -Needs-Feedback Type-Bug
This isn't something we'd usually consider a security vulnerability, so I'm removing the labels. Will leave it open for the ccs to take a look, but I'm not sure if we can realistically do anything here. 

Comment 5 by ajha@chromium.org, Jan 25 2017

Labels: TE-NeedsTriageHelp
Status: WontFix (was: Unconfirmed)
You can do the same thing with fetch() function. A server can inspect Origin header with "crossorigin" attribute to mitigate the risk.
Well it was a fun project. It's currently listed on my github (https://github.com/Tino-F/srcnet). 

Sign in to add a comment