PassGAN: A Deep Learning Approach for Password Guessing
arxiv.org
arxiv.org
Of course, maybe a more accurate view was that the paper isn't actually seeking to advance to the state of the art in password cracking, and has other motivations.
The answer is yes, but not in the way that one might think. Despite the fact that we seed the GAN with input noise, there is no guarantee that the GAN makes use of this at all. This is a theme with GANs: we often want to imbue them with prior knowledge that we think is important, but is easily ignored by the GAN. In this case, we want to generate samples from p(x|z), where x is in the space of our data (often images, in this case passwords), but provided it gets good results according the the loss function, your GAN may learn p(x|z)=p(x). This is fine if you don't care about enforcing some relationship between input and generated samples, but here we do.
One solution is to use InfoGAN (https://arxiv.org/abs/1606.03657), which adds a term to the loss function that the mutual information between a latent code and the generator output must be high. Your latent code might be drawn from a uniform distribution on [-1,1], and the generator output will be conditioned on this code. This being continuous, it's questionable what "iterate" might mean. On a computer, maybe you iterate through every possible float (as someone mentioned), but if you want to generate N different samples, you could also discretize this distribution to N values on the given interval, each with probability 1/N and sample from this PMF.
If your noise is uniform on [0, 1], then, sure, you could just iterate through every possible float, I guess. Though in practice you're talking an astronomical number of possible combinations.
Another option is to take two samples from the distribution and interpolate in-between them, which might give you an idea of the distribution of samples. Maybe, it depends on the GAN and data.
You could likely probabilistically guess gender or age from many addresses, and I'm sure domain (yahoo, gmail) changes the distribution as well.
In other words, how do you most effectively combine different strategies?
Remove duplicate words and code.
Repeat with other sources of information (FB profiles, etc, etc).
Remove duplicate words.
Add it to your dictionary and then use that to see the generated dictionary.
Password cracking is always a compromise between speed and thoroughness.
I used to provide crypto coin wallet password recovery service. The first couple of days would be spent on building a knowledge database with the help of the wallet owner. Plugging that data into the algorithm, even if the password was random and long allowed me to usually get the correct password. Exploring the whole search space without pruning is a fools errand
I don't have a guessable password on any remote account I have. A remote attacker simply cannot guess passwords; he'd have to use some other method, e.g. taking over my phone number or email account.
For special accounts, such as bank accounts, you could have a second password manager database with a unique password, if you are concerned that a password db which gets unlocked (almost) daily is not secure enough. Or remember unique password for those special accounts.
Thus I can run something like:
$ pass foobar.example
jDHQxFTkPjLkvbLNRQe5Ad
Or: $ pass -c bazquux.example
Copied bazquux.example to clipboard. Will clear in 45 seconds.
[0] https://www.passwordstore.org/hehe - I actually change that per site for extra strong security. Site 1 = caliperbrake. Site 2 = "caliperbrake"
It's really been very reliable.
How much truth is there to the fairly famous XKCD comic "correct horse battery staple" in this scenario. Isn't it possible that random word combinations, if they were common in passwords, could be guessed relatively early in a password hash brute force attack?
Especially considering we are talking about apparently billions of attempts per second.
Second question, is it true that placing restrictions on the password such as that it must include a capital letter, a special character, and be 8 characters long. Also reduces the time it takes to crack because the algorithm can simply dump a huge amount of possible answers?
Assuming a vocabulary of 16K words, it's 15 bits per word for a total of 60 bits for the four word password. Letters plus punctuation will give you about 60 symbols or 6 bits per position. At 60 bits, the four word password is as good as the 10 characters you generated by smashing your elbows on the keyboard and, hopefully, easier to remember.
> Also reduces the time it takes to crack because the algorithm can simply dump a huge amount of possible answers?
Yes. Knowing the password rules limits the space that'd need to be bruteforced.
> Yes. Knowing the password rules limits the space that'd need to be bruteforced.
Yes, but not that much, really:
1. Giving away the length of your password doesn't help the attacker much. For realistic scenarios, testing all passwords with length < N takes less than 2% of the time of testing all passwords with length N.
(The proportion of passwords with length < N to passwords with length N is approximately 1/M, where M is the number of distinct symbols (here about 60). Exactly it's (q-q^N)/(1-q), I think, where q=1/M.) So, even if you use only numbers, telling the attacker the length of the password gives them only a 10% edge.
2. Knowing that a 10 letter password contains at least one number excludes about 1/6 of passwords ((50/60)^10). So, that's less than one bit. Similarly with special characters etc.
TL;DR: Telling an adversary the length of your password doesn't really help them. Telling them password rules (contains a number, etc.) helps them more, but adding just one more character to your password increases the difficulty more than knowing the password rules decreases it.
[1] https://blogs.dropbox.com/tech/2012/04/zxcvbn-realistic-pass...
What one is really trying to estimate with a "strength estimator" is how much entropy needs to be used to crack it when the generation method is known (Kerckhoff's principle, sort of). So what one really needs to look at is the generation method, not the resulting password.
If you are unsatisfied with these, use Finnish or Turkish. The vocabulary there is unlimited, for all practical purposes.
Even English can do better than 64K words - use suffixes, as Turkish people do. "Correctless horse batteryness staplenesslessness".
Now you are in the 80 bits for 4 words territory.
Don't know about Turkish, but for practical purposes Finnish dictionary is very much limited. Source: I'm a native (bilingual) Finnish speaker.
I would assume that including words not likely to be in any dictionary is a good way to increase the difficulty of guessing a password; made up words, slang in non-english languages, rare names, etc.
If we don't limit number of characters (but seriously I'd say on average password lengh would be 8-10; I go a lot beyond that). In practice forcing to have combinations of various character sets increase search space, but in practice I bet most users are likely to use @ for a, l for 1, or captialize either first initial, or first initial of every word.
Or worse, just append, preappend, or modify one or two characters because some other websites decided to have a more unique password policy, and users hate to reinvent a whole new password. Then imagine one website got hacked, the next is easy..
So essentially if we can gather sufficent data about a target, then the brute force search space is now hammered and reduced.
In any case, I am a big believer of no restriction, because of what I said above. The behavior of choosing password is not too random so we can predict and infer from whatever we know. Password and passphrase are the same shit because "ILoveTacoAndBurgersWhatever1984" is a legitmate password. Good luck guessing that because I am not a huge fan of Taco, and I bet you no machine brute force this in any reasonable time.
The whole password vs passphrase is a campaign to get rid of the sophicated password policy, so people came up with a new name.
In the end, I believe having a 2-auth and allowing users to freely choose whatever passwors they want is better than forcing them to choose whatever we think is best. Education is the key, both on social engineering and on choosing passwords. We as software technologists have the responsibility to make dangerous / "i am not sure if that's a good thing to do" warning more obvious.
Of course I am aware there are other alternative proposals to replace pwd but for now password is not going anywhere soon.
bcrypt's maximum password length is not 32 bytes. In fact the maximum has been debated due to discrepancies from the paper describing it and the first implementation, which actually accepted longer passwords due to how it handled words internally. In either case the max length is at least 20 characters more than you state.
Your own words above: "because encrypt/decrypt takes up" is 32 bytes. By most measures a five word passphrase fitting into 32 bytes doesn't even contain 80 bits of entropy.
If you don't choose the words randomly, the security may decrease drastically, but I doubt it will be less for a passphrase of 8 words than a non-randomly chosen short 'password'. Generally, XKCD's advice is sound, as long as people are aware that dedicated attackers can and probably will guess common phrases and book codes (passages from a book).
Second question: Yes, any restrictions on password length or allowed characters drastically reduces password security. For example, 8 characters of random Latin1 is too short, it only has an entropy of 56.87 bit. Things get way worse once passords are not randomly generated. A user-chosen password limited to 8 characters of Latin1 is ridiculous and anyone can crack it.
Generally speaking, humanly generated passphrases are no longer secure.
Five words makes it a lot more secure, or using more obscure words. Coming up with a "random" method of choosing some 5-6 words out of a dictionary, using dice or coin flips, can go a long way to make your "phrase" password more secure against these kinds of attacks.
Of course, the best approach is to use such a password, and use a password manager.
As for your second question, I believe it doesn't reduce the time it takes to guess some user's password. The restriction to include capital letters or special characters forces users to introduce more entropy in their password, and thus prevents a lot of common password usage. An attacker knowing that the site's password must be at least 8 characters long is not that helpful. Checking all the 1-7 character long passwords is trivial compared to checking all the 8-10 character long passwords. So it is helpful, since it prevents a lot of users from using simple, guessable passwords. In short, the restrictions introduce more complexity than they subtract for most users.
Edit: Having read the other replies, yes, it does technically reduce the search space, and it might be a bad thing (due to users adding simple common symbols, which are again easily guessed). So it probably isn't good practice.
All combinations take 1x10^9 cpu-days or 14 x 10^9 cpu-days. Amazon pricing ranges from a lot to a whole lot more (at least 39 million $).
Set Number of symbols Bits per symbol 80 bit string length
20k word dict 20000 14.29 6
Printable ASCII 95 6.57 13
[A-Za-z0-9] 62 5.95 14
[a-zA-Z] 52 5.70 15
[a-z0-9] 36 5.17 16
[a-z] 26 4.70 18
[0-9] 10 3.32 25
???? n log2(n) ceil(80/log2(n))
Bigger question is what is reasonable security level for common use. 80 bit security (like in that table) is probably good enough for most people, 40ish bits like in the XKCD is on the low side. Of course those bits should be always be generated in a secure manner, e.g. CSPRNG, no matter how they are then transformed into a password/phrse/whatever.edit: did some further quick math: From random internet source I got that single Nvidia 1080 GPU can do about 25 GH/s for MD5 (and much less for something sane). With that 80 bit password takes about 60000 GPU years to crack, 64 bits 1 GPU year, 40 bits less than a single GPU minute.
If you still are feeling bit iffy, then you can easily throw another word in. Or use bigger dictionary; 6 words from 40k word dictionary gets you about 90 bits of entropy, which takes in the order of 10^9 GPU years to crack. That should certainly be enough, even if you account few orders of magnitude for ASICs and other general near-future improvements in crack rate.
Nobody processing a whole table is going to spend that much time on your password specifically. If the government wants your data, or someone is willing to spend that many GPU cycles to get at your data, they probably have better ways of getting it.
With password guessing, one wants to generate as many possible options as possible in order of most likely to least likely. If the generation method takes more than a microsecond it might already be faster to just go the brute force way.
With speech recognition one is also time-constrained, but much less so. If it takes 0.2 seconds to come up with the best match, the user is barely done pronouncing the next word.
Neural stuff is slower than Markov chains if I'm not mistaken, but while for speech recognition that might work great, it could be fatal for password guessing.
The point is that humans are quite bad at generating "random" strings, and you can extract regularities there.