News for hackers. Stuff that matters.
Re:Just Delete Me – A directory of direct links to delete yo... by vortico on Monday September 02, 2019 @10:50AM (#20859406)
For a minute, I thought these were direct links to delete your account, meaning that going to these links would delete your account immediately, a bit like like Super Logout (DO NOT CLICK https://superlogout.com/ OPEN IN INCOGNITO TAB).
Re:Just Delete Me – A directory of direct links to delete yo... by yjftsjthsd-h on Monday September 02, 2019 @11:19AM (#20859609)
I'm surprised that isn't blocked by cross-site scripting prevention or something along those lines. Shouldn't forcing logout require that you have the cookie that proves that you're logged in in the first place?
Re:Just Delete Me – A directory of direct links to delete yo... by vortico on Monday September 02, 2019 @11:22AM (#20859630)
Any site that has a GET route to /logout that does not check the referrer is vulnerable to this iframe/img attack.
Re:Just Delete Me – A directory of direct links to delete yo... by _jomo on Monday September 02, 2019 @04:28PM (#20861563)
Please don't rely on the Referer being present (ever). It's an optional header to send in a request and you can configure your browser — at least Firefox — to not send it for privacy reasons.

Logout (or anything else that triggers changes of any kind) shouldn't be a GET request.

Re:Just Delete Me – A directory of direct links to delete yo... by throwaway63839 on Monday September 02, 2019 @04:29PM (#20861569)
Not true. Using samesite cookie attribute prevents CSRF through IMG tags. (On browsers that support samesite, i.e. most browsers.)
Re:Just Delete Me – A directory of direct links to delete yo... by yjftsjthsd-h on Monday September 02, 2019 @12:26PM (#20860075)
It really shouldn't be GET anyways; that's asking for trouble.
Re:Just Delete Me – A directory of direct links to delete yo... by iwalton3 on Monday September 02, 2019 @01:10PM (#20860450)
Some of the pages that are exploited do use POST though. If it accepts authorization through a cookie and doesn't require an XSRF token or JSON content type, it is probably vulnerable.

But yes in general making actions happen in response to a GET request is generally a bad idea, since these are often cached and considered "safe" to retry.

Re:Just Delete Me – A directory of direct links to delete yo... by hirsin on Monday September 02, 2019 @11:30AM (#20859682)
This is tricky - it's up to the site basically. For single site websites (hacker news, let's say) then yeah - samesite should be enabled to prevent this.

For a large IDP like Google, Facebook, Microsoft, etc, you start to want* logout via cross-site requests, but it needs to be protected against DoS attacks like the link provided. So you need some other proof that the requesting site has a session - a session ID, an ID token, a unique identifier for one of the users in session (this is the least bulletproof one).

* well, standards wise at least. Google doesn't document a logout url anymore.

Re:Just Delete Me – A directory of direct links to delete yo... by yoz-y on Monday September 02, 2019 @11:10AM (#20859529)
Which raises a question of how many services out there do have links that would delete your account without confirmation (or confirmation that could be somehow spoofed by client side JS).
Re:Just Delete Me – A directory of direct links to delete yo... by t0astbread on Monday September 02, 2019 @11:27AM (#20859667)
How could you even implement an easy account deletion flow with un-spoofable confirmation if the whole client is considered untrusted?
Re:Just Delete Me – A directory of direct links to delete yo... by iwalton3 on Monday September 02, 2019 @12:09PM (#20859951)
Usually this is done by sending an nonce that must be sent back with the request to delete the account. The attacking site won't have the nonce, so it cannot delete the account.

Currently, you can also get a similar protection by requiring headers such as "Content-Type: application/json", since other sites will not be able to make that request.

Referer does work in some cases, but it is fairly common for users to disable the Referer, so relying on it for site functionality is not ideal.

Re:Just Delete Me – A directory of direct links to delete yo... by t0astbread on Monday September 02, 2019 @08:31PM (#20862762)
How's the resource containing the nonce any more secure than just a plain "delete-account" endpoint?

Thinking about it, you could probably use CORS and some methods like X-Frame-Options to protect your nonce. But then you could just use that on the whole deletion page and avoid the nonce, I guess?

Re:Just Delete Me – A directory of direct links to delete yo... by vortico on Tuesday September 03, 2019 @01:43AM (#20863973)
The nonce would only be available if you scrape the page while logged in and extract the logout URL, which is impossible with iframes.
Re:Just Delete Me – A directory of direct links to delete yo... by t0astbread on Tuesday September 03, 2019 @04:52AM (#20864752)
Could you not still scrape the HTTP response for the page containing the nonce?
Re:Just Delete Me – A directory of direct links to delete yo... by vortico on Tuesday September 03, 2019 @07:27AM (#20865472)
Not with a browser, no.
Re:Just Delete Me – A directory of direct links to delete yo... by vortico on Monday September 02, 2019 @12:01PM (#20859885)
I think checking referrers is the normal way to solve this. As long as your site doesn't have XSS vulnerabilities on other pages, I think you're fine, but I'm not an expert though.

EDIT: Nonces are better, ignore this reply.

Re:Just Delete Me – A directory of direct links to delete yo... by dmix on Monday September 02, 2019 @02:03PM (#20860779)
Why would they make it on initial load and not have a confirmation step + a list of supported sites first? Is it for trolling?
Re:Just Delete Me – A directory of direct links to delete yo... by vortico on Monday September 02, 2019 @02:03PM (#20860782)
Yes.
Re:Just Delete Me – A directory of direct links to delete yo... by dmix on Monday September 02, 2019 @02:19PM (#20860898)
Oh god, I can just imagine getting the phone call from my dad.