wolfiton
Hey community,
After reading this https://hackernoon.com/20-hours-18-and-11-million-passwords-cracked-c4513f61fdb1
I thought i should share it with all of you and maybe find a solution to this potential problem.
My questions are:
Can this brute force attack be stopped?
If so how?
What is the best defense to prevent such an attack?
Also can a rate limiter prevent this penetration in the database?
Thanks and hope to hear your points of view on this.
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Hello,
I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex











Showing Posts 1 to 10- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
OvermindDL1
Rate limiter does not help when the DB is dumped.
A multitude of ways, all of the passwords he used were in insecure database’s, just hashed or hashed and salted or so.
First of all, if you are implementing username/passwords in your app, then you are almost assuredly wrong. Don’t do that. If you think you need to do it you are almost certainly wrong. Use OIDC to an actually tested server and backend system or so.
Second, if you have to implement username/password yourself then use bcrypt or argon or so, those are not just hashing algorithms, they are specifically designed to be extremely slow to hash, which would make an attack like this take a few years to a few thousand years (depending on your complexity settings for it) essentially per password as you can’t reuse a hash from one on another even if the password is identical.
Essentially, that brute force attack only works on very poorly designed systems, which is almost every system out there, hence why you want to use OIDC only to well designed systems (facebook, google, github, whatever).
wolfiton
Thank you,
I already use argon2 for hashing my passwords.
Is there a way to detect such an attack and block it?
OvermindDL1
That attack happens if they managed to get access to and dump your database. Nothing you can do on the HTTP server side other than just not letting it happen ‘through’ it (not saying there aren’t other methods though, depending on how the server is built).
wolfiton
So you have to rely on third party auth to be secure?
Also can you mention those other methods that can be used to stop something like this?
Thanks in advanced
OvermindDL1
It ‘increases’ your chance of security because an OIDC’s server is specifically designed to be hard to breach by every major company that hosts them.
All application specific. Like if you host a SQL database then make sure it’s not accessible except to the sole server that requires it, make sure it can’t run untrusted code, make sure the server that can access it cannot run untrusted code, etc… etc… etc… It’s an almost impossible task to get right and almost none of it relates to the HTTP server like phoenix itself. I consider any site that doesn’t allow me to use only third-party OIDC auth like google/github while disabling local-auth on my account as inherently insecure, and they get a corresponding single-use password and I try to never go there to begin with or put anything important at all.
wolfiton
Thank you for taking the time and explaining your point of view and experience, this really meant a lot.
Also if others would like to add to this discussion please do so.
Many opinions may provide multiple solutions
wolfiton
After searching a bit more on the Internet it appears that a table with unique salts combined with passwords can make an attacker’s life a bit harder.
Also a rate limiter may determine the hacker or in most cases the bot(automated attack server) to move on to easier targets.
If you like to review the info you can read it here from the Kaspersky blog What is a brute force attack?
dimitarvp
This may be factually correct but it also centralizes authentication and gives the providers access to literally billions of social graphs.
This is not okay. Providers like Facebook and Google have a very poor track record of reusing such information to relentlessly chase you around with ads.
I like OAuth like everybody else due to it making the lives of users easier but let’s not pretend that centralisation of credentials is an innocent issue, especially when handed to corporations.
In the meantime, a lot of libraries provide pretty okay security: CORS, form tokens, Argon / Bcrypt / Scrypt with hashes, salts and peppers, cookies expiring in 1 hour, etc.
Let’s face the facts: if you use a modern library, you are very reasonably secure unless a state actor or spy agency targets you… In which case you are royally screwed anyhow.
danschultzer
You can’t prevent such brute force attacks. That means your DB has already been leaked. That’s why it’s recommended to have unique salts on passwords and use something like argon2 that slows down brute force attacks even on specialized hardware, so passwords are very difficult to crack in the worst case scenario of a DB leak.
You’ll remove that responsibility by using a third party with OIDC. I think a better alternative may be WebAuthn that can forego passwords, and prevent phishing. I hope to implement it in Pow at some point.
First rule of security is to never roll your own. The best is to use a maintained and audited open source library to handle auth.
You should follow industry practices, but cracking of password shouldn’t be a big worry. There are plenty of other threats that are much more likely. Phishing is much easier than cracking password. Or DB leak that gets access to personal information can be much more valuable than a password.
wolfiton
Also please don’t forget CSRF tokens that validate the request