Important Security Notice from Patreon
patreon.com
patreon.com
The unauthorized access was confirmed to have taken place ... via a debug version of our website that was visible to the public.
This is a ridiculously common way for attackers to get into your network. You both want to have an accurate inventory of the apps/boxes your organization has (highly non-trivial at scale) and you don't want dev/staging/etc to be publicly accessible. The simplest way is to firewall off traffic to them.
If you need them to be accessible for e.g. callbacks from public services, default-deny everything and control access at the network or frontend web server level before things get to your applications (which are likely going to be your vulnerable underbelly).
In most cases, the dev servers will not themselves have really interesting things on them. They will instead be used by attackers to pivot to other, more interesting servers on your network. Patreon's understanding is that the dev servers lacked SSH keys to the production servers -- that's a good thing, but after the bad guy has a dev server with local network access to interesting machines, they're going to do things like e.g. probe for exposed admin consoles to network appliances, outdated RedMine instances, internal tools, etc etc, and they will eventually own every machine that talks to any machine that your dev server can talk to. You will eventually lose the entire deployment if the bad guy wants you to.
The development server included a snapshot of our production database, which included encrypted data.
Never, ever do this. (It's been a firing offense at most shops I've worked at in my career, and that's for good reasons.)
>Never, ever do this. (It's been a firing offense at most shops I've worked at in my career, and that's for good reasons.)
Would you use a migration script that "scrambled" certain columns on the way back from Production to Development? That's the only way I've seen it done properly at $EMPLOYER.
No, because you'll almost certainly fail to fully anonymize the data and if there is anything "interesting" in your possession it will probably still be recoverable. I wrote a comment on HN long ago about this, and still stand by it.
Further back, there's also this one for Python: https://news.ycombinator.com/item?id=7102268
And this one for PHP: https://github.com/fzaninotto/Faker (there were no HN comments on that thread)
And this one for Ruby: https://news.ycombinator.com/item?id=86018 (also no comments)
These seem like a good starting point.
Also, mining bug reports for data that causes problems in your application is a lot of fun. You can turn your development database into a collection of pathological edge cases.
Congratulations Patreon, you just executed a textbook "good" public disclosure of a security breach!
My confidence is zero.
Considering patreon has some users who have been, and still are, targets of harassment, this could be much worse than having their credit card or password leaked.
> ...
> We protect our users’ passwords with a hashing scheme called ‘bcrypt’ and randomly salt each individual password. Bcrypt is non-reversible, so passwords cannot be “decrypted.” We do not store plaintext passwords anywhere.
Updated post now says the above.
Usually rsa is used when the source of the data never needs to read the data again. Usually for example like sending an email. The sender encrypts it and sends it, but the sender cannot decrypt it. Why were they using rsa for the tax information? Were there multiple servers and the server that creates the information is not trusted with being able to ever read the information later?
Since the data that was encrypted in this case is inherently tiny (social security numbers etc.), I'd think it would be a good idea to directly encrypt this with an asymmetric algorithm, thereby reducing the complexity of the entire mechanism, which is generally beneficial for security as well as maintainability.
But I'm wondering as well about the reasons for choosing an asymmetric algorithm in the first place. Typically, symmetric algorithms are used for such cases in which the entity that encrypts something is the same entity that needs to be able to decrypt it later. It's not that this could not be implemented as well using asymmetric crypto, but it somehow defies the whole point of the asymmetry.