Live data from Hacker News

How a web app can download and store over 2GB without you even knowing it

jclaes.blogspot.com

21–30 of 34 posts

Re: How a web app can download and store over 2GB without you even knowing it

#21
post #15
post #6

It would be fun to execute this against a mobile device, where storage is expensive. 2GB might be all that is required to choke the device. A neat client-side DDoS :)

Heh, you could easily DoS a Canadian home internet user (not mobile) by transferring a massive amount of data behind their back. So many people here are stuck with 25GB/mo limits.

That's absurd. I can't even imagine having to live with that kind of cap—I easily download 25GB in a day.

Re: How a web app can download and store over 2GB without you even knowing it

#22
post #13

Earlier quoted context omitted.

I wonder if you could still perform a DOS by doing the following: - register 1000 domains - when the browser navigates to the first domain, store 5Mb - once the store has finished, redirect to the next domain - repeat steps 2-3 ad infinitum Anybody know if this would work?

Sub-domains should work also then. Just make a page with bunch of IFrames, each on a different, random sub-domain. Edit: Ooops; didn't see the comment above about sub-domains. Worth a try though!

A malicious actor might write a wordpress worm to assemble a domain botnet and cross-link them all to each other such that visiting one stores 5 megs of nonsense from every site on a visitor's client.

Re: How a web app can download and store over 2GB without you even knowing it

#23
post #14

The fact that there's a limit is not surprising. That the limit is 2GB is a little surprising, but this is across all sites, so ok. That there's no cache ejection when you reach the limit just seems like a bug. Why not use LRU?

I would not want one rogue site evicting the caches of all other sites.

Re: How a web app can download and store over 2GB without you even knowing it

#24
post #8
post #6

It would be fun to execute this against a mobile device, where storage is expensive. 2GB might be all that is required to choke the device. A neat client-side DDoS :)

iOS (and Android I think, but I primarily dev iOS so that's where my knowledge is) won't let a website exceed a 5MB local storage limit without explicit user consent...so I suppose still technically possible, but not without getting the user to agree to it first.

You can store up to 50 mb in appcache (instead of localstorage) in mobile safari. You can also store 50 mb in the web sql storage, but i don't know if that shares the appcache storage or is counted separately. The 5 mb limit for localstorage is because that's what the spec recommends.

Re: How a web app can download and store over 2GB without you even knowing it

#25
post #18

Earlier quoted context omitted.

I wonder if you could still perform a DOS by doing the following: - register 1000 domains - when the browser navigates to the first domain, store 5Mb - once the store has finished, redirect to the next domain - repeat steps 2-3 ad infinitum Anybody know if this would work?

I mean, theoretically. But would a user actually willingly wait out this process?

They would if you do it in an iframe while letting them play a flash game. They might even attribute slowdowns to the flash game.

Re: How a web app can download and store over 2GB without you even knowing it

#26
post #14

The fact that there's a limit is not surprising. That the limit is 2GB is a little surprising, but this is across all sites, so ok. That there's no cache ejection when you reach the limit just seems like a bug. Why not use LRU?

I would not want one rogue site evicting the caches of all other sites.

It's just a cache. It can be repopulated. But I see your point, a lower per-domain quota would make more sense.

Re: How a web app can download and store over 2GB without you even knowing it

#27
post #21
post #15

Earlier quoted context omitted.

Heh, you could easily DoS a Canadian home internet user (not mobile) by transferring a massive amount of data behind their back. So many people here are stuck with 25GB/mo limits.

That's absurd. I can't even imagine having to live with that kind of cap—I easily download 25GB in a day.

It's not uncommon to find ISPs with monthly quotas of a few GBs - aimed at light users.

Re: How a web app can download and store over 2GB without you even knowing it

#28
>As a user, I had no idea that the website I'm browsing is downloading a suspicious amount of data in the background.

not when you're browsing localhost, because it's implicitly trusted. chrome doesn't prompt you to allow access to the location services API when you're local either, but it does prompt for permission on the web. does the browser still not warn you if you try this same test using a remote server?

Re: How a web app can download and store over 2GB without you even knowing it

#29
post #19
post #8

Earlier quoted context omitted.

iOS (and Android I think, but I primarily dev iOS so that's where my knowledge is) won't let a website exceed a 5MB local storage limit without explicit user consent...so I suppose still technically possible, but not without getting the user to agree to it first.

localStorage and application cache are not the same thing. localStorage is the one that prompts the user for more than 5MB, but the author was using application, which I've never seen prompt.

unless something's changed in the last couple months, localStorage prompts for any storage, and cuts you off completely at 5MB.

Re: How a web app can download and store over 2GB without you even knowing it

#30
post #18

Earlier quoted context omitted.

I wonder if you could still perform a DOS by doing the following: - register 1000 domains - when the browser navigates to the first domain, store 5Mb - once the store has finished, redirect to the next domain - repeat steps 2-3 ad infinitum Anybody know if this would work?

I mean, theoretically. But would a user actually willingly wait out this process?

it doesn't need to be downloaded. it can be populated with generated data using JavaScript.
Post reply on HN