How difficult to crack keepass master password?

  • How easily could someone crack my keepass .kdbx file if that person steals the file but never obtains the Master Password?

    Is this a serious threat, or would a brute force attack require massive computing time?

    Assume a password more than 10 characters long with randomly distributed characters of the set including all letters, numbers and most non-alphanumeric keyboard symbols.

    If you're *really* paranoid, you could drop the .kdbx file in a Truecrypt volume for extra safety.

    if moores law is correct, then every 18 months, in general terms a computer gets twice as fast,, in 50 or 60 years you end up with a number with 14 or 15 numerals,,ie 1, 2, 4, 8, 16, do that 50 times or 50 years,, a password you make now cant be cracked for 50 million years,, but a computer in 50 years will crack it in a second

    Since the KeePass source code is open, it should be possible use it to implement a recovery tool that's a bit smarter than just trying passwords one by one. I remember that there was one tool around, but I've forgotten the name. Maybe Mr. Google can help...

    talking about million years, i guess the data will be useless after 5 years... or may be less..

    @Iszi If you're really paranoid, you want never put all your eggs in one basket!

    @F.Hauri In a sense, putting the KDBX file into a TrueCrypt volume *is* putting your eggs into more than one basket - in this case though, the baskets are inside each other.

    If you log keyboard strokes or are able to intercept (and proxy) the USB keyfob you use ... it can be almost instantaneously. Just a reminder: Don't discount other attack vectors.

    See this recent article; someone was able to make use of Hashcat, along with their GPU, to crack a kee-pass DB in just 12 minutes. Full guide included for your own tests: https://www.rubydevices.com.au/blog/how-to-hack-keepass ; To answer your question I'd say it is a serious threat. Hashes can always be broken, more or less, given enough time and computing power.

    @schizoid04 they used a dictionary attack. I wonder what the original password was? (didn't see the original pw in the article) Obviously a weak password will invalidate the strength of the keepass security scheme. My original question specified "randomly distributed characters" for the pw.

    @steampowered the password was `password123` – the reader had to do the attack as an exercise.

  • Tom Leek

    Tom Leek Correct answer

    9 years ago

    KeePass uses a custom password derivation process which includes multiple iterations of symmetric encryption with a random key (which then serves as salt), as explained there. The default number of iterations is 6000, so that's 12000 AES invocations for processing one password (encryption is done on a 256-bit value, AES uses 128-bit blocks, so there must be two AES invocations at least for each round). With a quad-core recent PC (those with the spiffy AES instructions), you should be able to test about 32000 potential passwords per second.

    With ten random characters chosen uniformly among the hundred-of-so of characters which can be typed on a keyboard, there are 1020 potential passwords, and brute force will, on average, try half of them. You're in for 1020*0.5/32000 seconds, also known as 50 million years. But with two PC that's only 25 million years.

    This assumes that the password derivation process is not flawed in some way. In "custom password derivation process", the "custom" is a scary word. Also, the number of iterations is configurable (6000 is only the default value).

    +1 for the "with two PC that's only 25 mi..."

    You just killed my hopes in recovering the password of my own Keepass store in at least a few days... I especially loved the 25 million year thing, but that would just work if both are trying different offsets, otherwise they'd just do the same work twice... just sayin'. :D

    @DoNuT If it's your own password, you don't have to brute force it. You will have a LOT of information about what kind of passwords you keep, do you put numbers in, do you remember any specific characters (or password length)? All of them can be used to bring down the time immensely. It only takes 25 million years if you want to break someone else's password (and they can't even be "social-engineered").

    Keepass has an excellent feature where you can set the number if iterations based on how many your CPU can perform in 1 second. So this means that *you* wait 1 second for it to decrypt your data, but it limits brute-force attacks to 1 per second, which would discourage most attempts.

    This answer does not demonstrate knowledge of how fast KeePass passwords can be cracked in practice. The answer also ignores GPUs.

    @AleksandrDubinsky Ok, so let's assume GPUs and some slick optimizations can increase performance by an order of magnitude. That's *still* 2.5 million years. And even then, only if you're using 2 PCs.

    @Iszi I simply observed that the answer is low on information.

    @Tom Leek , Can you update this 25 million year thing with current technology ? Say using clusters ?

    @Dexter The use of a "cluster" is just throwing more hardware at the problem. 50 million years with one computer would be approx one year with 50 million computers (some assumptions, e.g. that you can evenly distribute the work... and that you have access to that many powerful computers). If you want more modern AES-NI figures, 2x-5x. Overall, maybe 10 million computer-years.

    For some extra security, Keepass allows you to automatically calculate the amount of iterations in such a way that it takes exactly one second on the current computer to open or save the database. That's well within acceptable time limits and makes brute forcing completely infeasible.

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM