Using Facebook Notes to DDoS any website
chr13.com
chr13.com
Nonsense. Every web crawler should have some form of rate limiting. That's just good etiquette. I can control the number of requests that the Google search indexer sends to my site via webmaster tools. I don't see a good reason why Facebook can't be a good net citizen and do the same.
Benefits to Facebook might outweigh intangibles like "being nice" to the people and places they are indirectly making money off of.
If the issue is used to DoS a site Zuckerberg cares about, not that I would encourage such action as it would in itself be a dick move, I'm sure some form of rate limiting will be implemented in short order...
It would be smart to at implement rate-limiting, and also delegate to a specific server close to the host to fetch the image, and then sync the image/file across their own networks to whatever server needs it.
It is just a huge waste of bandwidth that 100+ servers need to fetch the file, instead of Facebook itself absorbing the cost.
[1] https://hn.algolia.com/#!/story/past_month/0/ddos%20facebook
It isn't meant to stop you if you are intent on reposting a dup, it is just there for informational purposes and to make you stop and think about it before you really do it.
Then I found a bigger file.
It's now maxes out my upload speed (50mbps on fiber). The notes have been deleted but Facebook continues to do http requests for the file. That, or Apache continues to write requests to the access log after they finished and Facebook does not close active connections when it knows that the answer will never be used.
Edit: Found a video (big file) hosted by Facebook. Guess who's under attack now :D
Edit2: Seems they're loading at about 1.6-1.9gbps speed, calculating from how quickly the images seem to 'load' (become blank 1x1px images) on my client and how big the actual file is.
Are you breaching their ToC or AUP? (I'm sure I've "agreed" to it but I doubt I've ever read it in full.)
It's way easier to just fix the issue than to sue me, as long as I don't noticeably disturb their infrastructure (i.e. don't bother other users).
Why not just limit the number of request per site and per user? Ie. John Smith can only make X request (let say 1000) to www.google.com.
Doesn't seem too hard.
1 Gbps dedicated uplink is not trivial everywhere in the world. You also need more quota. Facebook easily crawled more than 1 TB of data during an hour. The more the better may not be best solution here. The higher the uplink, faster Facebook may crawl. So instead of transfering 1 TB in an hour for a 1 Gbps uplink, the transfer will be 10 TB if you have 10 Gbps. This will also depend how much bandwidth they allow their crawler, there must be an upper limit though.
Maybe that's not a big deal to you, but it would be to me!
If enough people start using technique they will have no choice but to create a fix for this.
Exclusions
The following bugs are not eligible for a bounty (and we do not recommend testing for these):
...
Denial of Service Vulnerabilities
...
That said, they do appear to be quite hypocritical when it comes to enforcing this, as at least one user on the /r/netsec thread claimed that Facebook paid them for a mail bombing vulnerability.I guess you have to use this to attack high-profile targets (or Facebook themselves) until they notice.
If you can easily cause any website to become an on demand low orbit ion cannon, they're going to cause problems.
You can do this with any website that lets users post links which may or may not be automatically loaded (by other users too). There are tons of these around; forums, blogs, etc. See also: Slashdot effect. That's also a true DDoS, coming from many IPs, as compared with a few of Facebook's servers.
> HTTP status codes are extensible. HTTP applications are not required
> to understand the meaning of all registered status codes, though such
> understanding is obviously desirable. However, applications MUST
> understand the class of any status code, as indicated by the first
> digit, and treat any unrecognized response as being equivalent to the
> x00 status code of that class, with the exception that an
> unrecognized response MUST NOT be cached. For example, if an
> unrecognized status code of 431 is received by the client, it can
> safely assume that there was something wrong with its request and
> treat the response as if it had received a 400 status code. In such
> cases, user agents SHOULD present to the user the entity returned
> with the response, since that entity is likely to include human-
> readable information which will explain the unusual status.
http://tools.ietf.org/html/rfc2616#section-6.1.1This text was basically unchanged in httpbis: http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-2...
They will only fix it when it starts to hurt them it seems.
Add a boolean to a attachment in the db, queryDiff
Add a string (for md5 hash)
Calculate the hash on every file with a query parameter, if the file is requested the second time (with different query parameters), check if the file hash is the same. If the file hash is the same, change the bool queryDiff
Next time you fetch the file, queryDiff is false, so you shouldn't fetch the url and only get the original one (which was already downloaded)
http://example.org/images?image_id=12121
http://example.org/images?image_id=7272 http://example.org/images?image_id=12121
http://example.org/images?image_id=7272
contain the same images, chances are very high that other query parameters will be the same.If they are different, chances are very high that other query parameters are also different.
Want to up your chances, then instead of only 2 requests, raise the bar to 10 different query parameter checks and add some additional db values (like CountFetch:int,sameUntillCurrentFetch:bool)
As soon as sameUntillCurrentFetch = false, then you request all images in the future. If CountFetch = 5 and sameUntillCurrentFetch = true, then queryDiff = false.
It's kinda weird my answer was downvoted, any better solutions to avoid the stated problem then?
http://stackoverflow.com/questions/4032209/is-md5-still-good...