Building a Password Cracker in 2024
sevnx.com
sevnx.com
[0] https://feeds.feedburner.com/HaveIBeenPwnedLatestBreaches
They also have historically had a backlog of data to process - leaked databases can be a pain to parse and turn into something usable.
You take that list of hashes, and copy to your password cracking rig, where it can run for a few days to see how many password hashes you can find a match for. Then once you have identified a password hash match, you now know an account password.
However, if things aren’t properly secured where an attacker can dump password hashes, they likely can utilize “pass the hash” style attacks as well where you don’t even need to know the password to be able to sign in as a user.
Windows machines on a network are constantly scanning around, looking for new devices, and when they find them, they like to see if they can access them so they show up in network manager or whatever. They do this by trying to log in. Obviously logging in with a password would be insecure, so they try to log in with a hash. Responder pretends to be any sort of server that a Windows machine would try to log in to, so right when you run it, all the nearby machines hand over their hashes.
Crack even one of those hashes, and now you can log in to Active Directory. This will let you get the full list of all users, permissions, groups, machines, and sessions, etc, and basically tell you exactly what you need to do to get anywhere you want (Bloodhound is the main tool people use for this).
That AD account also lets you dump all the SPNs (service accounts) on the network, and because Windows is Windows, of course that gives you something like 20-30 password hashes, many of which are almost certainly Domain Admins on the network.
Crack a Domain Admin account, and you can basically do whatever you want on the network, including doing a dcsync, which is normally used to back up a domain controller, but also dumps every account and NTLM hash straight into your lap. These hashes can be used with pass-the-hash to impersonate any account, or you can just crack them and basically have free access to the network for the rest of your life.
The entire security of Windows networks is based on the premise that password crackers don't exist, which is why they have been fundamentally fucked for decades, and there's zero chance that any of this will ever get fixed.
These are in a text file locally (offline), so there is no system that you are submitting hashes to for verification. It simply tries md5(your_password_guess) until it computes the same hash that you supplied.
This is oversimplified and you can replace md5 with any hash alg that you need, but i hope it makes it clear that guesses don't happen against the auth server.
As others have said, if you have the hashes, you can brute force them offline and there won't be any limits on how fast it can go besides your algorithms and compute resources.
But even online, attackers can be pretty smart. For example, something we detected was an attacker rotating both through a bunch of accounts and a bunch of IP addresses. That way you never saw many incorrect login tries per account and IP in a timeframe. It's not millions/billions of tries, but it can get around naive limits per IP or per account and you need some SIEM tooling to detect that.
Saying "there's no limit besides your resources" is basically saying "there's no limit besides the very real and insurmountable limit there is".
Plus, nowadays, most (all?) big frameworks have used KDFs by default for years.
I'm not even contradicting you there. You can go as fast as you can go. Even if every atom in the current estimation of the universe had a couple thousand computations available, we couldn't brute-force some passwords. Except, now customer security asks you "but what about millions of computations per atom? Checkmate!".
Being too concrete and absolute with these kinds of people ends up with so many stupid discussions.
This is true, it's just that, with modern KDFs, that's still too slow to matter (unless someone broke them and we don't know). If you use a modern KDF, you basically don't have to worry about brute forcing at all, even for fairly weak passwords.
I have been asked by customers about the reliability of our software platform if major german cities have been hit with either nuclear, natural or military disaster. It's that level of silly you sometimes have to deal with.
Eventually I got fed up enough and told those kinda people that I'm volunteering in disaster prevention services and their systems wouldn't be my problem at that point.
Is something like this safe against the kind of rigs and attacks being built in 2024?
You can assume the hashes are publicly downloadable, but the secret remains secret.
EDIT: Thanks for the replies. The use case is that I made a commenting system that accepts submissions via email. However, it's only being used by my personal website right now, because I'm gathering feedback on it. You can see it at https://r3ply.com. Two things to protect are privacy of commentators, and to prevent tampering of the subject line. I had plans to use an HMAC, but right now I just naively sha256(message+pepper).
Example when you say concatenation, do you mean hash(email + secret) or hash(secret + email)? The choice matters: off the top of my head, I know the former lets an attacker reuse state between hashing attempts if the emails are known because hashing occurs one block at a time, so knowing. I wouldn’t be surprised if the later had weaknesses too.
Keep in mind most emails appear in public databases, so it’s not clear what you’re trying to protect.
An attacker in a position to grab password hashes is also going to be in a position to grab that secret. No matter how you shuffle and try to hide it, there's not really a way around that.
But your system is relying on sha256 providing a guarantee that it wasn't designed to provide. It's better to only rely on dependencies in ways they actually were designed for.
Are there legit services offering brute-force cracking? How long would it take, and how much it would it cost?
Definitely better to do this in a VM, but then your performance would take a hit
[0] https://security.stackexchange.com/questions/61346/how-long-...
Also I didn't discuss entropy here in order to represent it more basically for the parent comment.
% Trailer dictionary
trailer
<<
/Size 95 % number of objects in the file
/Root 93 0 R % the page tree is object ID (93,0)
/Encrypt 94 0 R % the encryption dict is object ID (94,0)
/ID [<1cf5...>] % an arbitrary file identifier
>>
Use the object id to find the encryption dictionary: % Encryption dictionary
94 0 obj
<<
/Filter /Standard % use the standard security handler
/V 1 % algorithm 1
/R 2 % revision 2
/U (xxx...xxx) % hashed user password (32 bytes)
/O (xxx...xxx) % hashed owner password (32 bytes)
/P 65472 % flags specifying the allowed operations
>>
endobj
Generally, if /V and /R are both 4 or less, you can find tools to crack it yourself on a normal PC.More info on the values of /V and /R here: https://qpdf.readthedocs.io/en/stable/encryption.html
20 0 obj
<<
/R 4
/O (...)
/U (...)
/P -1548
/Length 128
/V 4
/EncryptMetadata true
/Filter /Standard
/StmF /StdCF
/StrF /StdCF
/CF <<
/StdCF <<
/AuthEvent /DocOpen
/CFM /AESV2
>>>>>>
endobj
I tried a bunch of tools, including https://www.elcomsoft.com/apdfpr.html?src=prog_apdfprp to get it to quickly remove the password, but nothing worked :/So you're left with brute force or dictionary attacks for your 10 char A-Za-z0-9 password.
Also, is the password completely random? If it's not, you'd have a much easier time using a large dictionary rather than every possible 10-character word.
As in the article, it looks like on a consumer GPU you'd get on the order of 10MH/s, or 10 million hashes per second. I need someone to check my math on this, but 36**10/10_000_000 GPU-seconds (36 characters, optimistically assuming [a-z0-9] lowercase) is about 4000 GPU-days, so out of reach. The A100 attempt from the article only made it about 15x faster, so you'd still need to wait a few months at best. (This is with the assumption you know it's pure lowercase.)
Can someone confirm my math on this?
Think what if NSA could order FB to run their infrastructure for one hour? How long passwords would need to be to still resist this?
And there is also Space Force. They can crack EVERYTHING.
Of course I cannot prove this, but I trust my sources. Will not tell here.
It's not that cryptography is "weak" or "broken", but people should be aware that (except from God Himself), there is also a purely human instance you cannot hide from...
Remember the "We have it all", pronounced by "45"? Maybe he simply told a FACT?
Fwiw; Europe did standardize on 230V back in 1992. 220V hasn't been used in a generation or so.
There are many places where the power stations have not been updated for many years, so 220 V remains the actual voltage that can be measured on the outlet.
I once had a blade server chassis delivered with a cable for this.
There is really nothing exciting in that part of cybersecurity and with the above in place you are safe and can move towards the real risks. Online password cracking does not matter in practical terms and for offline one you have other problems to urgently address.
What are these risks depends on who you are but if you address aggressive, stubborn and coercive patching + development security (if you develop) + enthusiastic awareness you are ahead of 99% of the world already.
Add to this some endpoint protection and monitoring of the events and, man, you are a company I can trust my HN rep.
Please stop cargo culting this.
> “Verifiers SHOULD NOT require memorized secrets to be changed arbitrarily (e.g., periodically). However, verifiers SHALL force a change if there is evidence of compromise of the authenticator.”
They also don't recommend having rules about like, a certain number of symbols, etc.
To explain the other side of the comment, "cargo cult security" refers to some groups of tribal people in New Guinea who build giant wooden airplanes and control towers in the hopes of attracting airplanes delivering food[1][2].
It's very common in the security space for people who have zero understanding of underlying security models to build elaborate structures that kind of look like and feel like they're doing security, but it's actually providing no value. These practices get blindly passed on for decades despite all the best effort of actual experts to explain to them why the practices are, in fact, completely useless. Password rotation is a mindbogglingly persistent one, as described in the other comment.
So many people these days seem to completely forget that not everything is in the cloud, and there are many services in a company that you don’t see as a regular user or developer.