Reddit Security Incident
reddit.com
reddit.com
* A complete copy of an old database backup containing very early Reddit user data -- from the site’s launch in 2005 through May 2007
* Logs containing the email digests we sent between June 3 and June 17, 2018
Also of note:
"Already having our primary access points for code and infrastructure behind strong authentication requiring two factor authentication (2FA), we learned that SMS-based authentication is not nearly as secure as we would hope, and the main attack was via SMS intercept."
If this doesn't put the nail in the coffin of SMS-based 2FA, I'm not sure what will.
When NIST recommends the deprecation of a protocol you know you should've already gotten rid of it five years earlier, not keep it around for another five years.
The sooner more companies start supporting U2F and WebAuthn, the sooner more people will start buying and using hardware security keys.
Microsoft has been lax on this.
Implementing TOTP: https://www.serverstack.com/blog/2013/02/21/implementing-tot...
My opinion is hardware tokens are a joke for average user security. If I can't even keep my phone around to use TOTP, I'm sure as hell not going to keep track of my U2F token.
But yes, TOTP is a good start; the minimum that every serious team should have for its own personnel now.
A client (or an extension) could generate a QR code which embeds a signed request from the server (SRS) along with a signed request from the client using a key it generates just for this server (CRS). The user scans this QR, the user's phone app recognizes the SRS+CRS, and spits out a token or QR.
The phisher might be able to mitm the SRS, but they can't know what the CRS is, so they can't generate a fake QR that will validate on the client app. So with no special hardware, we generate a one-time token that [as long as they can't mess with browser window pop-ups or some other nonsense] can't be phished. (I'm excluding malware because we all know it's game over by that point)
You effectively can't implement U2F without TOTP, because otherwise when people lose their U2F dongle they'll be locked out of the site. For any given site you should turn on TOTP before activating U2F, but then store the TOTP secret somewhere secure and don't actually use it.
Here is the list of what of what they are saying they got access to: https://news.ycombinator.com/item?id=17665254
Yeesh, what is going on with their security team over there? Years ago it was "oh, now we realize why everyone was saying that storing passwords in plaintext is a bad idea." Now it's "oh, now we realize what a bad idea SMS auth is."
So what is Reddit doing today that you and I would think, "of course, no one does that anymore 'cuz 'duh'." but they think, "nah, it's still okay."?
Well, by "security team" I meant "people that should know better". I mean, raise your hand if you knew even ten years ago what a bad idea it was to store passwords in plaintext. Okay, now keep your hand up if you're job role includes the words "security team". Hmm, not a lot of hands left. You don't need a dedicated security team to figure out that some folks, including the CEO, shouldn't be let anywhere near the database nor making design decisions.
[0]: https://old.reddit.com/r/announcements/comments/93qnm5/we_ha...
[1]: https://old.reddit.com/r/announcements/comments/93qnm5/we_ha...
How does that work? Do they really have some low-level access log that shows who accessed what file and at what time?
And then, do they keep that log for some months at least?
And, can they query that log and declare that, six months ago, "this" data was compromised, but "that" data was not?
How does all that work.
1) User inputs username and pw into spurious site.
2) Spurious site prompts for the user's TOTP token.
3) Spurious site proceeds to immediately log in to the real site w/ username, pw, and valid TOTP token.
4) Bad guys get an HTTP session cookie which for many sites lasts practically indefinitely.
https://www.theregister.co.uk/2016/12/06/2fa_missed_warning/
Your number can easily be stolen or redirected to get and sometimes send SMS from/to your number. Your cell phone account is the linchpin for a very extensive identity theft attack.
Blaming companies for responding to that incentives isn't going to accomplish anything. The way to fix things is to change the incentives by either increasing the punishment for falling for social engineering or create a system that makes it easier to remotely identify people.
Also, I am not sure I understand:
> we suspect weaknesses inherent to SMS-based 2FA to be the root cause of this incident
It seems that optaining employee login credentials was the root cause, and bypassing 2FA was the second hurdle but not the root cause.
2. MITM for SMS is not hard if you can get close and requires <$500 in hardware
Here's a pretty hilarious and effective example where a crying baby background was used: https://www.youtube.com/watch?v=lc7scxvKQOo
In May 2017, O2 Telefónica, a German mobile service provider, confirmed that cybercriminals had exploited SS7 vulnerabilities to bypass two-factor authentication (2FA) to make unauthorized withdrawals from users' bank accounts. The criminals first installed malware on people's computers, allowing them to steal online banking users' account credentials and phone numbers. Then the attackers purchased access to a fake telecom provider and set up redirects from the victims' phone numbers to lines controlled by them.
While looking at GDPR compliance, I came across a guide that said "backups are kept for as long as it will take you to notice the missing data and restore it. Exported data kept for longer than this is an archive".
That helped me realise I really shouldn't be keeping 5-year-old database backups for some systems; a few months is plenty sufficient time for us to notice any corruption. As part of that clear-out, I searched for and deleted many old mysql-backup-2012-just-in-case.tar.gz from /root and similar places.
https://ico.org.uk/for-organisations/guide-to-the-general-da...
It will be interesting to see what consequences, if any, Reddit end up facing over this.
https://community.jisc.ac.uk/blogs/regulatory-developments/a...
* A complete copy of an old database backup containing user data from launch in 2005 through May 2007 including:
-usernames,
-salted/hashed passwords,
-e-mails,
-all content including private messages
* Reddit source code* Internal logs
* configuration files
* other employee workspace files [?]
Given how the report is structured, it seems like the amount of leaked data is purposefully being hidden behind red herring info about SMS 2FA that is not important to users who want to know where they stand.
When this DB is leaked, there should be more than enough weak passwords to both pwn and dox many, many reddit users. Do we know the encryption scheme reddit used to encrypt their password database involved in the leak?
Also, how is it that Reddit gained a head of security 2.5 months ago? Who was in charge of this prior to that date?
At the time of this backup, it would have been SHA1. Here's the relevant hashing code:
https://github.com/reddit-archive/reddit/blob/4778b17e939e11...
Edit: reddit's confirmed this here: https://www.reddit.com/r/announcements/comments/93qnm5/we_ha...
"""If reallyrandom = False, generates a random alphanumeric string
(base-36 compatible) of length len. If reallyrandom, add
uppercase and punctuation (which we'll call 'base-93' for the sake
of argument) and suitable for use as salt."""
https://github.com/reddit-archive/reddit/blob/4778b17e939e11...The function has specifically a flag for use as salt, but the hashing code does not actually use it. Whoops. Of course the loss here is not really that significant (~4bits of entropy), but I find it still bit funny.
Kinda interesting is how they decided on specifically 3 characters for salt, which seems really low. Its not like the characters cost anything, why not 30 characters instead?
However, the fact that private messages were stolen is... I mean, it is just mind boggling to me. There has to be so much shit in there.
If "workspace files" meant "home directory", that's the big holy shit moment. People keep all kinds of stupid shit in home directories. SSH keys. Browser profiles. E-mail cache. Private keys for TLS certificates. Logs. Logs with secrets. Literally anything that's supposedly secret and used to run things.
Put user home directories on an NFS mount and I can basically own your whole company.
Are you implying that it's stupid to keep SSH keys in one's home dir?
Does not necessarily help when the machine is compromised. Using one key per machine and storing it in the corresponding home directory seems safer to me.
If the keys are in a thumbdrive and in a keyring, you can only attack two things: 1) the user namespace, 2) the thumbdrive's mounted contents while it is inserted _and unlocked_. This limits the scope of attacks. When the keys in the keyring expire ("-t life" option to ssh-agent), you can't even attack that.
While the more secure organisations disable USB in the OS / BIOS and glue the ports shut to prevent anyone using them, to prevent against data loss by employee.
Source: worked in two different organisations that literally glued the USB ports shut.
Your SSH key should only exist on your desktop/laptop, never on a server. Use ssh-agent (and agent forwarding, when needed), which was designed for this.
The best approach is to use yubikeys and pkcs11 along with your ssh-agent so the private key never exists on disk at all, but at the very least, using vanilla ssh-agent is an imperative.
Yes, such enterprises are stuck in the 1980s and deserve what they get.
(Also, "personal files" shouldn't mean SSH private keys in any stretch of the definition.)
Did you have an account 11 years ago? Did you vote on anything embarrassing, or send any compromising messages? How sure are you?
I don't even know the answer to those questions for myself.
If they did require an email address, they could restore their database backups to retrieve that information.
Welcome to trade-off oriented programming.
From the standpoint of the person who took the data it is likely boring enough that it's not even worth the effort to restore the database.
Given the existence of more pressing problems I really can't do more than shrug.
It doesn't sound like IP address data was compromised, but I wouldn't be surprised.
Yubikey 4 / Feitian looks interesting, but it seems it only works in Chrome with Gmail etc. etc.
Anyone have any thoughts on solutions that include Safari on Mac and/or iOS? The NEO claims NFC support but I doubt that works on iOS.
Most of the time, 2FA means using a token generator, such as Google Authenticator, Authy, or similar. They are just apps. This is much safer than SMS because one would need physical access to your unlocked phone to generate a token.
In cases where server security was breached and databases (or database backups or dumps) were accessed, if the TOTP seeds were part of the database (not sure how likely that is, but I'm guessing it's likely), then TOTP is doing nothing for security.
TOTP protects against things like credential stuffing and weak passwords, and is safer than SMS (no hijacking/intercepting), but for database security breaches things aren't so cut and dry.
I wonder if there should be a TOTP-like app which you still register with a site when you first log in or create your account, and which codes are sent to when new logins are needed, but which uses a more secure communication channel than SMS. This gives you the best of both worlds, no? One-time codes not generated from a single plain text seed, communicated to a known client over a secure channel, to prove the initial user is still in possession of the known client?
If your database contents are exposed (or a dump or backup is exposed) unbeknownst to you, those TOTP secrets won't be invalidated, and attackers which get their hands on that have more than they'd have if some other second factor method was in use which didn't rely solely on a long-term shared secret.
And since database exposures can go back a long way (like this one), and TOTP secrets aren't normally rotated over time, then this difference in second factor methods seems interesting.
But since your user auth flow needs access to the unencrypted TOTP seeds, and user info generally lives in a database, for the majority share of infrastructures a compromise of the DB will compromise all TOTP seeds.
Which is not true of some other 2FA mechanisms (which is my point - I never thought about it before, but TOTP has a specific failure mechanism that not all 2FA mechanisms have). I still prefer TOTP to auth codes over SMS, but I wish there was something better (TOTP with seed rotation, auth codes over more secure channels, etc).
Scenario 1: The service stored passwords in some way and TOTP seeds in the database and uses TOTP to authenticate users.
Scenario 2: The service stored passwords in some way and uses some other 2FA mechanism (like unique codes over some secure channel)
You seem to be claiming there is no different between the two, where as I think I'd prefer scenario 2, because in scenario 1, if my password is obtained somehow (the password was not stored securely, I used a weak password, credential stuffing matched my password from other site leaks against the email in this database leak, or any other way) then the attacker can log in to my account on the service right now and bypass TOTP 2FA. In scenario 2, 2FA is still protecting my account.
Regardless, I will keep this 2FA difference in mind going forward, since it is interesting to me; of course, you (and others) are free to ignore my thoughts if you so choose.
You can protect your TOTP/HOTP seeds on the YubiKey using a PIN (which I would recommend anyone to do). This is supported in all the Yubico Authenticator clients.
But: When your YubiKey is stolen/lost, your TOTP/HOTP seeds are gone for good. Make sure you have recovery codes stored in a safe place, e.g. your password manager.
Try this: Go to your own site backup for whatever you've got, be it a personal disk backup or something you made for a customer or friend or whatnot. Now, tell me which files might contain sensitive information to third parties. I'll wait.
This isn't "hygine". This is "we have a 11 year old backup mounted somewhere that we all forgot about and we honestly don't know what's in it". Yeah, it sounds dumb, but it's not reasonably avoidable by internet pontification regarding "best practices" unless your "best practices" involve eidetic memories or time machines.
There is just no excuse for that, it serves no business purpose, ancient backups that have no recovery value should not be online if they are kept at all. This incident shows an appalling lack of care by reddit technical leadership. Obviously they are not systematically tracking and reviewing the data they keep. Given this incident I would not be the least bit surprised if they have copies of this and that all over the place with no awareness or oversight.
How is that remotely simple? This is a medium size company. They have thousands or tens of thousands of storage devices mounted "online" in some way. How do you purport to audit every single one of them to determine when the "last access" time was for all the relevant data?
I suspect, as mentioned earlier, that your answer is going to involve a time machine to go back to 2007 and make sure reddit was doing things "right".
The way you protect old data is by routinely auditing what you have. You make sure each department is on top of organizing its data. If you're not sure what it is, you offline it. It can always be brought back online if necessary. Even lowest-common-denominator schemes like ISO 27001, a system designed to allow management that doesn't even know how to turn on a computer to manage information security, covers this basic idea. It would be one thing if a non-technical department had leaked some ancient folder full of reports containing some sensitive data, but this is a database dump of one of the most highly trafficked sites on the net. Reasonable people should expect the custodians of those sorts of things to know better. To anyone with technical knowledge, minimizing your data exposure should be as natural as breathing.
And yet again this time we get the usual "the attack was so sophisticated" refrain. Oh, the defenders were so careful, and tried to take every precaution for sure! The attackers hacked the 2FA! If that's true why didn't the attackers get the 2018 data? Frankly I don't believe the Reddit management. They probably left that old database dump on some old system they forgot about that tons of people had access to.
How many breaches to we need to remind us to be aware of what data we are managing and take precautions? How many more is it going to take before we collectively stop being so careless?
I've literally never worked at nor heard of an employer that tried this. You have a case study example? You seriously think IT departments are in the business of finding an archiving the contents of every random PC on the network?
People working in development or operations on the other hand, should instinctively know and do what must be done with their own data. And reddit didn't do that. Management failed and even worse the technical leadership inside the company was directly responsible.
Remember this next time you're working at a place with a poor management of data and a culture of indifference. Do something about it, sound the alarm instead of sitting on your hands waiting for the inevitable leak.
«Old salted and hashed passwords» This sentence mean: All hashed were readable. It also mean, if they are still needed on their servers, that they are probably still in use. It would had been easy to salt this hashes.
First fix holes, then redesign...
Using it as a security measure is a mistake.
One way to help protect you is to visit your carrier's retail store and have them turn off online access to your account and require all changes to your account to be done in person with a valid government ID. This should make it more difficult for number porting attacks but they can still sniff the SMS message when goes over the cell network. As far as I know, mobile network control messages aren't protected.
Like this: https://c7.alamy.com/comp/CYGATP/online-banking-security-chi...
Wells Fargo supports RSA SecurID tokens.
Source : I have one.
However, they also support SMS as an alternative. I'm not sure if SMS can be disabled..
Just tried it myself, it works.
Edit: 12 years, not 13.
-------------------------------
Account credentials from 2007 compromised
from reddit
[A] sent 35 minutes ago
Hi,
TL;DR: As part of the security incident described here, we've determined that your account credentials may have been compromised. You'll need to reset your password to continue using Reddit. Details below.
On June 19, Reddit was alerted about a security incident during which an attacker gained access to account credentials from 2007 (usernames + salted password hashes).
We're messaging you because your Reddit account credentials were among the data that was accessed.
If there's a chance the credentials relate to your current password, we'll prompt you to reset the password on your Reddit account. Also, think about whether you still use the password you used on Reddit 11 years ago on any other sites today. If there's a chance the credentials relate to the password you're currently using on Reddit, we'll make you reset your Reddit account password. You can find more information about the incident in the announcement post linked above. If you have other questions not answered there, feel free to contact us at contact@reddit.com.
Got on thefacebook as well in 2005 because the college kids in my classes (taking for fun as an adult) told me I needed to be on there to get invited to parties and so they could write on my wall. Good times.
https://theantisocialengineer.com/2018/07/23/sim-swap-fraud-...
Of course if you have a 0day RCE its possible to get the SMS as well. Even local malware on the computer that you're entering the code into could work if you're an identified target. Many protocol downgrade attacks are possible too, though I'd wager most developers would notice the lack of HTTPS in the browser bar.
And of course social engineering the cell phone company. Though if you call you can put a flag on your account to make it harder to transfer numbers.
Basically, imagine every conceivable way any human or computer might at any point interact with a plaintext signaling packet designed to be passed around the world by different companies and eventually read by people. Now attack all of them. Something somewhere will give it up.
The ROI doesn't seem that high.
(Actually, the attackers were likely cybercriminals looking for the whole database of current users. Even with salted hashed passwords, it's trivial to find commonly used passwords and reuse the e-mail address and password to attack other accounts, such as bank accounts, paypal, amazon, facebook, gmail, etc. Each pilfered account adds up to a payday when you sell them on the black market, for things such as money laundering, account draining, and spam)
So specific information on known attack paths is an interesting conversation, because part of the SMS 2FA security is the belief that while 1-off SMS 2FA attacks are possible, they generally don't scale, and so that puts a high cost on carrying out the SMS 2FA, or informs a limit on the value that can be protected by SMS 2FA.
So, good for reddit? Maybe yes. Good for your bank? Maybe not, but maybe yes, depending on the diligence of the customer, the robustness of anti-fraud measures, and the cost of fraud insurance.
Good for Instagram? Maybe no, without much dependence on the diligence of the customer.
https://motherboard.vice.com/en_us/article/vbqax3/hackers-si...
A friend and I were brainstorming the design of a fraud prevention app/startup just this week and we naively thought SMS would be the way to go. Yikes!
[0] https://www.washingtonpost.com/news/the-switch/wp/2014/12/18...
[1] https://www.theregister.co.uk/2017/07/10/att_falls_for_hacke...
One one hand it's hilariously insecure to begin with, especially now lots of it gets trucked over the internet. On the other hand, there's a number of companies selling access and associated services for trivial amounts of money.
There are other more technical weaknesses with SMS, because the phone networks themselves are also insecure. But the big issue is phone companies themselves.
Don't use SMS 2FA.
Consumer/enterprise Google accounts have supported U2F and the Google Authenticator app for quite some time. I have SMS completely eliminated as a factor on my GMail account (Yubikey primary with codes from the app as a fallback; no way to authenticate via SMS at all).
Where so many companies go wrong with SMS “2FA” is by treating it as an alternate authentication method, rather than as a second factor. If you can reset the account password over SMS then you’re boned.
.. which isn't to suggest either password reuse or SMS TFA is a good idea.
My understanding of it is if you can use anything other than SMS 2FA then use that and remove SMS, but if your choice if between no 2FA or SMS 2FA then go with SMS. Also, use it stictly as 2FA, not as identity.
This is not my area of expertise so if I'm wrong I would genuinely like to understand why.
My feeling after supporting end users on and off since '95 is they won't differ if they have 2FA or not.
https://security.stackexchange.com/questions/49521/does-two-...
It gets worse if you search around for people talking about how they use 2FA codes to protect their accounts when logging into services on public computers.
The perception of the security added by 2FA emboldens people to make all kinds of poor security choices.
Don't do this either. It makes 2FA into 1FA.
Which only happens regularly in US? I have yet to heard as many cases in EU or Asia. Where you are require to proof yourself before any of these customer support staff can alter these information.
>There are other more technical weaknesses with SMS, because the phone networks themselves are also insecure. But the big issue is phone companies themselves.
I have beeb wondering if these are patchable? Or requires Hardware replacement?
https://theantisocialengineer.com/2018/07/23/sim-swap-fraud-...
Seems just as possible as hijacking your phone.
Stripe use it for logging into your business's account.
HMRC (the UK government tax office) also uses it for logging in.
Various banks and financial services I use in a personal capacity rely on secondary phone authentication to set up things like new recipients for paying bills online.
wow...
He started before the hack happened
They said they only got R access instead of RW access.
Uh huh.
How is it that Reddit’s security team is continually learning security lessons that have been common knowledge among non-technical people for 5+ years? They seem to treat their production systems more carelessly than the average person treats their Nintendo switch account.
Additionally, it can take some time to change security standards in a large company. Most companies that are not in high compliance environments focus their engineering efforts on features.
Who are these non-technical people that you know that are not only using MFA but also know that SMS is insecure for MFA?
Rather than putting them down I'm happy they're willing to share and bring knowledge, that some communities already know, to even more people.
Anyone who reads pretty much any mainstream newspaper? At this point it would be easier to name mainstream media publications that haven’t covered this issue extensively. E.g. just google:
site:nytimes.com sms hijacking
site:wsj.com sms hijacking
site:latimes.com sms hijacking
Not to mention the fact that it’s been discussed on Reddit itself hundreds of times. And on the front page of HN dozens of times as well. E.g.:
You should talk to non-technical people when you get some time.