{'fraction_non_alphanumeric': 0.03388181174805378, 'fraction_numerical': 0.017958244869072895, 'mean_word_length': 4.945476858345021, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
PassGAN: A Deep Learning Approach for Password Guessing

State-of-the-art password guessing tools, such as HashCat and John the Ripper (JTR), enable users to check billions of passwords per second against password hashes. In addition to straightforward dictionary attacks, these tools can expand dictionaries using password generation rules. Although these rules perform well on current password datasets, creating new rules that are optimized for new datasets is a laborious task that requires specialized expertise. In this paper, we devise how to replace human-generated password rules with a theory-grounded password generation approach based on machine learning. The result of this effort is PassGAN, a novel technique that leverages Generative Adversarial Networks (GANs) to enhance password guessing. PassGAN generates password guesses by training a GAN on a list of leaked passwords. Because the output of the GAN is distributed closely to its training set, the password generated using PassGAN are likely to match passwords that have not been leaked yet. PassGAN represents a substantial improvement on rule-based password generation tools because it infers password distribution information autonomously from password data rather than via manual analysis. As a result, it can effortlessly take advantage of new password leaks to generate richer password distributions. Our experiments show that this approach is very promising. When we evaluated PassGAN on two large password datasets, we were able to outperform JTR's rules by a 2x factor, and we were competitive with HashCat's rules - within a 2x factor. More importantly, when we combined the output of PassGAN with the output of HashCat, we were able to match 18%-24% more passwords than HashCat alone. This is remarkable because it shows that PassGAN can generate a considerable number of passwords that are out of reach for current tools.

Abstract-State-of-the-art password guessing tools, such as HashCat and John the Ripper, enable users to check billions of passwords per second against password hashes. In addition to straightforward dictionary attacks, these tools can expand dictionaries using password generation rules. These rules define transformations such as concatenation of words (e.g., "password123456") and leet speak (e.g., "password" becomes "p4s5w0rd"). Although these rules perform well on current password datasets, creating new rules that are optimized for new datasets is a laborious task that requires specialized expertise.
In this paper, we devise how to replace human-generated password rules with a theory-grounded password generation approach based on machine learning. The result of this effort is PassGAN, a novel technique that leverages Generative Adversarial Networks (GANs) to enhance password guessing. PassGAN generates password guesses by training a GAN on a list of leaked passwords. Because the output of the GAN is distributed closely to its training set, the password generated using PassGAN are likely to match passwords that have not been leaked yet. PassGAN represents a substantial improvement on rule-based password generation tools because it infers password distribution information autonomously from password data rather than via manual analysis. As a result, it can effortlessly take advantage of new password leaks to generate richer password distributions.
Our experiments show that this approach is very promising. When we evaluated PassGAN on two large password datasets, we were able to outperform John the Ripper's SpyderLab rules by a 2x factor, on average, and we were competitive with the best64 and gen2 rules from HashCat-our results were within a 2x factor from HashCat's rules. More importantly, when we combined the output of PassGAN with the output of HashCat, we were able to match 18%-24% more passwords than HashCat alone. This is remarkable because it shows that PassGAN can generate a considerable number of passwords that are out of reach for current tools.

I. INTRODUCTION
Passwords are the most popular authentication method, mainly because they are easy to implement, require no special hardware or software, and are familiar to users and developers. Unfortunately, multiple password database leaks have shown that users tend to choose easy-to-guess passwords [14], [18], [42], primarily composed of common strings (e.g., password, 123456, iloveyou), and variants thereof.
Password guessing tools provide a valuable tool for identifying weak passwords, especially when they are stored in hashed form [54], [58]. The effectiveness of password guessing software relies on the ability to quickly test a large number of highly likely passwords against each password hash. Instead of exhaustively trying all possible character combinations, password guessing tools use words from dictionaries and previous password leaks as candidate passwords. State-of-theart password guessing tools, such as John the Ripper [71] and HashCat [28], take this approach one step further by defining heuristics for password transformations, which include combinations of multiple words (e.g., iloveyou123456), mixed letter case (e.g., iLoVeyOu), and leet speak (e.g., il0v3you). These heuristics, in conjunction with Markov models, allow John the Ripper and HashCat to generate a large number of new highly likely passwords.
While these heuristics are reasonably successful in practice, they are ad-hoc and based on intuitions on how users choose passwords, rather than constructed from a coherent and principled analysis of large password datasets. Further, developing and testing new heuristics is a time-consuming task that requires specialized expertise. To address these shortcomings, in this paper we propose PassGAN, a new approach for generating password guesses based on deep learning and Generative Adversarial Networks (GANs) [23]. GANs are recently-introduced machine-learning tools designed to perform density estimation in high-dimensional spaces [23]. A GAN is composed of two deep neural networks: a generative deep neural network (G), and a discriminative deep neural network (D). D is designed to distinguish between "real samples" from a distribution, and "fake samples", generated by G. The two deep neural networks interact with each other over many iterations. In each iteration, fake samples from G are given to D. The output of D is then provided to G, which uses it as feedback to generate fake samples that are distributed closer and closer to the real samples. After a sufficient number of iterations, the output of G simply becomes the output of the GAN. PassGAN leverages this technique to generate new password guesses. Our core idea is to train D using a list of leaked passwords (real samples). Therefore, at each iteration, the output of PassGAN (fake samples) becomes closer to the distribution of passwords in the original leak, and hence more likely to match real users' passwords. To the best of our knowledge, this work is the first to use GANs for this purpose.
PassGAN represents a principled and theory-grounded take on the generation of password guesses. We explore different neural network configurations, parameters, and training procedures, to identify the appropriate balance between learning and overfitting, and report our results. Specifically, our contributions are as follows: (1) we show that GANs can generate high-quality password guesses. In our experiments, we were able to match 2,774,269 out of 5,919,936 passwords (46.86%) from a testing set composed of real user passwords from the RockYou dataset [61], and 4,996,980 out of 43,354,871 passwords (11.53%) from the LinkedIn dataset [40]. Further, the overwhelming majority of passwords generated by Pass-GAN that did not match our testing set still "looked like" human-generated passwords; (2) we show that our technique is competitive with state-of-the-art password generation rules. Even though these rules were specifically tuned for the dataset used in our evaluation, the quality of PassGAN's output was comparable to (in the case of HashCat), or better than (in the case of John the Ripper) that of password rules; (3) our results also show that PassGAN can be used to complement password generation rules. In our experiments, we successfully used PassGAN to generate password matches that were not generated by any password rule. When we combined the output of PassGAN with the output of HashCat, we were able to match between 18% and 24% additional unique passwords compared to HashCat alone; and (4) in contrast with password generation rules, PassGAN can generate a practically unbounded number of password guesses. Our experiments show that the number of new (unique) password guesses increases steadily with the overall number of passwords generated by the GAN. This is important because currently the number of unique passwords generated using rules is ultimately bounded by the size of the password dataset used to instantiate these rules.
We consider this work the first step towards a fully automated generation of high-quality password guesses. Our results constitute evidence that, when trained with large enough passwords datasets, and when instantiated with a complex enough neural network architecture, GANs can outperform rule-based password guessing. Moreover, PassGAN achieves this result while requiring none of the user effort commonly associated with the design of password guessing rules.
We argue that this work is relevant, important, and timely. Relevant, because despite numerous alternatives [55], [67], [21], [17], [80], we see little evidence that passwords will be replaced any time soon. Important, because establishing the limits of password guessing-and better understanding how guessable real-world passwords are-will help to make password-based systems more secure. And timely, because recent leaks containing hundreds of millions of passwords [20] provide a formidable source of data for attackers to compromise systems, and for system administrators to re-evaluate password policies.
Organization. The rest of this paper is organized as follows. In Section II, we briefly overview deep learning, GANs, and password guessing, and provide a summary of the relevant state of the art. Section III discusses the architecutral and training choices for the GAN used to instantiate PassGAN, and the hyperparameters used in our evaluation. We report on the evaluation of PassGAN, and on the comparison with state-of-the-art rule-based techniques, in Section IV. We conclude in Section V.

II. BACKGROUND AND RELATED WORK
In this section, we present a brief overview of deep learning and GANs. We then review the state of the art in password guessing.

A. Deep Learning
In the mid-nineties, machine learning methods such as support vector machines [64], random forests [7], and Gaussian processes [60], showed remarkable results in classification and regression for mostly uncorrelated human engineered (handcoded) features. Starting in the mid-2000s, with an increased availability of storage and data, these methods have been superseded by deep learning. Research on deep learning has shown that features can effectively be learned from data, and that hand-coded features tend to underperform learned features. These gains are more relevant with correlated features, in which human-engineered features might only encode lowdimensional correlations.
Deep learning has raised several privacy implications on data usage, on what can be learned from trained models, and on the ability of a model to learn more private information than necessary for the given task. For this reason, researchers have proposed privacy-preserving collaborative learning techniques [65], and techniques that rely on differential privacy [1]. However, recent work has shown that these techniques are not as privacy preserving as originally thought. Specifically, it was shown that trained models are susceptible to information leakage [4], model inversion attacks [22], membership attacks [66], [29], and model extraction attacks [74], even when the models are trained using privacy-preserving collaborative learning techniques [31].

B. Generative Adversarial Networks
Generative Adversarial Networks (GANs) represent a remarkable advance in the area of deep learning. A GAN is composed of two neural networks, a generative deep neural network G, and a discriminative deep neural network D. Given an input dataset I = {x 1 , x 2 , . . . , x n }, the goal of G is to produce "fake" samples from the underlying probability distribution Pr(x), that are accepted by D. At the same time, D's goal is to learn to distinguish fake samples from G from the real ones coming from I. More formally, on input a simple noise distribution z, the optimization problem solved by GANs can be summarized as follows: where the model attempts to minimize with respect to θ G , and simultaneously maximize with respect to θ D . The learning phase is considered complete when D is unable to distinguish between the fake samples produced by G, and the real samples from I.
Since the original work by Goodfellow et al. [23], there have been several improvements on GANs. Radford et al. [59] introduce DCGAN, which improves on [23] by using a convolutional neural network instead of a multi-layer perceptron. As a result, DCGAN can produce more realistic image samples compared to [23].
Arjovsky et al. introduce the Wasserstein GAN (WGAN) [3]. WGAN improves learning stability of prior GANs by using gradient clipping. Benefits of this approach include reduced mode collapse, and meaningful learning curves, which are helpful in identifying optimal hyperparameters.
All work above focuses on the generation of realistic images. To address the problem of text generation, Gulrajani et al. [27] recently introduced the Improved Wasserstein GAN (IWGAN). With IWGAN, both G and D are simple convolutional neural networks (CNNs). G takes as input a latent noise vector, transforms it by forwarding it through its convolutional layers, and outputs a sequence of 32 one-hot character vectors. A softmax nonlinearity is applied at the output of G, and then forwarded to D. Each output character from IWGAN is obtained by computing the argmax of each output vector produced by G.

C. Password Guessing
In a password guessing attack, the adversary attempts to identify the password of one or more users by repeatedly testing multiple candidate passwords. Password guessing attacks are probably as old as password themselves [6], with more formal studies dating back to 1979 [48].
Two popular modern password guessing tools are John the Ripper (JTR) [71] and HashCat [28]. Both tools implement multiple types of password guessing strategies, including: exhaustive brute-force attacks; dictionary-based attacks; rulebased attacks, which consist in generating password guesses from transformations of dictionary words [63], [62]; and Markov-model-based attacks [72], [56], in which each character of a password is selected via a stochastic process that considers one or more preceding character, and which is trained on dictionaries of plaintext passwords. JTR and HashCat are notably effective at guessing passwords. Specifically, there have been several instances in which well over 90% of the password leaked from online services have been successfully recovered [57].
Markov models were first used to generate password guesses by Narayanan et al. [49]. Their approach uses manually defined password rules, such as which portion of the generated passwords is composed of letters and numbers. This technique was subsequently improved by Weir et al. [75], who showed how to "learn" these rules from password distributions. This early work has been subsequently extended by Ma et al. [42] and by Durmuth et al. [18]. Techniques based on Markov models have also been used to implement real-time password strength estimators, and to evaluate the strength of passwords in plaintext databases (see, e.g., [14], [10]).
Probabilistic context-free grammars (PCFGs) [32], [75] leverage manually-encoded information on passwords structure to generate new guesses. This information can be implicit (e.g., a dictionary word followed by the user's birth date) or explicit (e.g., passwords are required to contain at least six characters, one capital letter, and one digit). Appropriate tokens are then randomly selected to build passwords from the resulting grammars.
Recently, Melicher et al. [44] introduced a password guessing method based on recurrent neural networks [25], [69]. With this technique, the neural network is trained using passwords leaked from several websites. During password generation, the neural network outputs one password character at a time. Each new character (including a special end-of-password character) is selected based on its probability given the current password, similarly to methods based on Markov models. (This technique was also used in [44] to perform real-time password strength estimation.) The evaluation presented in [44] shows that their technique outperforms PCFGs, Markov models, and password composition rules commonly used with JTR and HashCat, when testing a large number of password guesses (in the 10 10 to 10 25 range).

III. GAN ARCHITECTURE AND HYPERPARAMETERS
To leverage the ability of the GAN to effectively estimate the probability distribution of passwords from the training set, we experimented with a variety of parameters. In this section, we report our choices on specific GAN architecture and hyperparameters.
We instantiated PassGAN using the Improved training of Wasserstein GANs (IWGAN) of Gulrajani et al. [27]. The IWGAN implementation used in this paper relies on the ADAM optimizer [34] to minimize the training error, i.e., to reduce the mismatch between the output of the model and its training data.
Our model is characterized by the following hyperparameters: • Batch size, which represents the number of passwords from the training set that propagate through the GAN at each step of the optimizer. • Number of iterations, which indicates how many times the GAN invokes its forward step and its backpropagation step [38], [37]. In each iteration, the GAN runs one generator iteration and one or more discriminator iterations. • Number of discriminator iterations per generator iteration, which indicates how many iterations the generator performs in each GAN iteration. • Model dimensionality, which represents the number of dimensions (weights) for each convolutional layer. • Gradient penalty coefficient (λ), which specifies the penalty applied to the norm of the gradient of the discriminator with respect to its input [27]. Increasing this parameter leads to a more stable training of the GAN [27]. • Output sequence length, which indicates the maximum length of the strings generated by the generator (G henceforth). • Size of the input noise vector (seed), which determines how many random bits are fed as input to G for the purpose of generating samples. • Maximum number of examples, which represents the maximum number of training items (passwords, in the case of PassGAN) to load. • Adam optimizer's hyper-parameters: • Learning rate, i.e., how quickly the weights of the model are adjusted • Coefficient β 1 , which specifies the decaying rate of the running average of the gradient. • Coefficient β 2 , which indicates the decaying rate of the running average of the square of the gradient. We instantiated our model with a batch size of 64. We trained the GAN using various number of iterations and eventually settled for 199,000 iterations, as further iterations provided diminishing returns in the number of matches (see analysis in Section IV-A). The number of discriminator iterations per generative iteration was set to 10, which is the default value used by IWGAN. We experimented using 5 residual layers for both the generator and the discriminator, with each of the layers in both deep neural network having 128 dimensions.
We set the gradient penalty to 10 and modified the length of the sequence generated by the GAN from 32 characters (default length for IWGAN) to 10 characters, to match the maximum length of passwords used during training (see Section IV-A). The maximum number of examples loaded by the GAN was set to the size of the entire training dataset. We set the size of the noise vector to 128 floating point numbers.
Coefficients β 1 and β 2 of the Adam optimizer were set to 0.5 and 0.9, respectively, while the learning rate was 10 −4 . These parameters are the default values used by Gulrajani et al. [27].

IV. EVALUATION
In this section, we first present our training and testing procedure. We then report the results of our experiments and compare the output of PassGAN with that of password generation rules commonly used with JTR and HashCat.
Our experiments were run using the TensorFlow implementation of IWGAN. We used TensorFlow version 1.2.1 for GPUs, with Python version 2.7.12. All experiments were performed on a workstation running Ubuntu 16.04.2 LTS, with 64GB of RAM, a 12-core 2.0 GHz Intel Xeon CPU, and an NVIDIA GeForce GTX 1080 Ti GPU.

A. GAN Training and Testing
To evaluate the performance of PassGAN, and to compare it with state-of-the-art password generation rules, we first trained the GAN, JTR, and HashCat on a large set of passwords from the RockYou leak [61]. Entries in this dataset represent a mixture of common and complex passwords because these passwords were stored on servers in plaintext, and therefore all of them were recovered. We then counted how many of the passwords that each tool generated were present in two separate testing sets: a subset of RockYou distinct from the training set, and the LinkedIn password dataset [40].
The RockYou dataset contains 32,603,388 passwords. We selected all passwords of length 10 characters or less (29,599,680 passwords, which corresponds to 90.8% of the dataset), and used 80% of them (23,679,744 total passwords, 9,925,896 unique passwords) to train each tool. For testing, we used the remaining 20% (5,919,936 total passwords, 3,094,199 unique passwords).
We also tested each tool on all passwords of length 10 characters or less from the LinkedIn dataset. This dataset consists of 60,065,486 total unique passwords, out of which 43,354,871 unique passwords are of length 10 characters or less (frequency count was not available for the LinkedIn dataset). Passwords in the LinkedIn dataset were exfiltrated as hashes, rather than in plaintext. As such, the LinkedIn dataset contains only plaintext passwords that tools such as JTR and HashCat were able to recover. Our results, presented in Section IV-B, suggest that the rules and the datasets used to recover the LinkedIn passwords substantially overlap with the rules and the dataset used in this work.
Our training and testing procedures allowed us to determine: (1) how well PassGAN predicts passwords when trained and tested on the same password distribution (i.e., when using the RockYou dataset for both training and testing); and (2) whether PassGAN generalizes across password datasets, i.e., how it performs when trained on the RockYou dataset, and tested on the LinkedIn dataset.
Effects of the GAN Training Process on Its Output. Training a GAN is an iterative process that consists of a large number of iterations. As the number of iterations increases, the GAN learns more information from the distribution of the data. However, increasing the number of steps also increases the probability of overfitting [23], [76]. To evaluate this tradeoff on password data, we stored intermediate training checkpoints and generated 10 8 passwords at each checkpoint.  Figure 1 shows the number of unique passwords generated by the GAN at each checkpoint, and how many of these passwords match with the content of the RockYou testing set. The number of unique samples generated by the GAN remains fairly constant with the number of iterations (checkpoint number). However, the number of passwords that match the testing set steadily increases with the number of iterations. This increase tapers off around 175,000-199,000 iterations, where the number of unique passwords also decreases slightly. This indicates that further increasing the number of iterations will likely lead to overfitting, thus reducing the ability of the GAN to generate a wide variety of highly likely passwords. Therefore, we consider this range of iterations adequate for our RockYou training set.

B. Evaluating the Passwords Generated by PassGAN
We generated up to 10 10 passwords using PassGAN, JTR, and HashCat. For JTR we used the SpiderLabs mangling rules [68], while for HashCat we used the best64 and gen2 rules [28]. These rules are commonly used in the password guessing literature [44], and have been optimized over the years on password datasets including RockYou and LinkedIn. Because of these dataset-specific optimizations, we consider these rules a good representation of the best matching performance that can be obtained using manually-generated rules. Both best64 and gen2 were able to generate less than 10 10 passwords (roughly 998M and 754M passwords, respectively-see Table I), given our training dataset. For the SpiderLabs mangling rules, we generated about 6 · 10 10 passwords. From this set, we sampled uniformly 528,834,530 unique passwords. This allowed us to perform a fair comparison between JTR and PassGAN because the latter generated I: Comparison of uniqueness and novelty of the passwords generated using PassGAN, HashCat, and JTR. Column (1) shows the total number of passwords generated using each tool. In our experiments, HashCat was unable to generate as many passwords as PassGAN and JTR given the training dataset and the rule sets we used. Column (2) shows how many of the passwords generated by each tool were unique. Column (3) indicates how many unique passwords generated by each tool were already present in the training set.  Nr. of unique samples the same number of unique passwords from a set of 10 10 samples. We first determined whether increasing the number of passwords generated by PassGAN also increases the number of unique passwords, as well as the number of matches with the training and the testing sets. To this end, we generated various passwords sets of sizes between 10 6 and 10 10 . We observed that, as the number of passwords increased, so did the number of unique passwords. Results of this evaluation are reported in Table I, column (2). As shown in Figure 2, when we increased the number of passwords generated by PassGAN, the rate at which new unique passwords were generated decreased only slightly. Similarly, the rate of increase of the number of matches, shown in Figure 3, diminished as the number  (2) shows how many of generated passwords appear in the testing set, which is composed of 3,094,199 unique entries. Column (3) shows the number of generated passwords that appear in the testing set, weighting each match by the number of corresponding entries in the testing set. (The testing set contains 5,919,936 non-unique entries). Columns (4) and (5) report the number of generated passwords that appear in the testing set, and that were not in the training set (i.e., new passwords). The numbers in Column (4) count each match as unique, while the numbers in Column (5) weight each password match by the number of occurrence of the password in the test set. The maximum number of matches is 1,978,367 in Column (4) and 2,032,728 in Column (5).  of passwords generated increased. This is to be expected, as the simpler passwords are matched early on, and the remaining (more complex) passwords require a substantially larger number of attempts in order to be matched. Our experiments also show that PassGAN's output has a higher rate of repeated passwords compared to JTR and HashCat rules. This is since, of the three tools, PassGAN is the only tool that attempts to generate passwords with the same distribution as the training set-which is characterized by a large number of repeated passwords. This allows PassGAN to output highly likely passwords earlier than less likely passwords, thus potentially reducing the number of guessing attempts in practice.
For each tool, we report the number of passwords generated that also appear in the training set. We do not consider these passwords to be valuable because any match they lead to could have been trivially obtained via a dictionary attack based on the training set. Table I, column (3), shows the results for each tool, and Figure 3 (blue line) provides further details related to PassGAN's output. In our experiments, PassGAN generated considerably fewer passwords that matched its training set, compared to both JTR and HashCat.
Next, we calculated the number of passwords, generated by each tool, which matched the RockYou and LinkedIn testing sets. Our results for RockYou are presented in Table II, while  love42743  ilovey2b93  paolo9630  italyit  sadgross  usa2598  s13trumpy  trumpart3  ttybaby5  dark1106  vamperiosa˜dracula  saddracula  luvengland  albania.  bananabake  paleyoung  @crepess  emily1015  enemy20  goku476  coolarse18  iscoolin  serious003  nyc1234  thepotus12  greatrun  babybad528  santazone  apple8487  1loveyoung  bitchin706  toshibaod  tweet1997b  103tears  1holys01 results for LinkedIn are shown in Table III. Columns (2) and (3) of Table II show the number of passwords in the RockYou testing set that were generated by each tool-without counting repeated matches and counting repeated matches, respectively. Columns (4) and (5) of Table II report the number of matches when we excluded passwords that appear in both the training set and the testing set (without and with repeated matches, respectively). In our experiments, the best64 rules were able to match 54% more passwords than the GAN, with best64 outperforming our technique by roughly a 1.7×-2× factor. In the same experiments, PassGAN significantly and consistently outperformed the SpiderLabs rules used with JTR. Under all metrics, combining the output of the GAN with the output of best64 led to the best performance, resulting in 115,613 additional passwords being matched in the RockYou testing set when counting unique passwords (see Table II, Column (4)), and 118,490 when counting repetitions (See Table II, Column (5)). In both cases, this corresponds to an 18% improvement over HashCat's best64. We consider this is a significant result because it shows that the GAN was able to successfully model how users choose their passwords based only on password samples-in some case better than the experts that wrote HashCat's password generation rules.
Columns (2) and (3) of Table III show the number of matches with the LinkedIn testing set. Column (2) includes all matches, while Column (3) does not include matches for passwords that also appear in the RockYou training set. In our experiments, the gap between HashCat's rules and PassGAN was smaller than with the RockYou dataset. This shows that the GAN generalizes better than manually-generated rules. Further, combining PassGAN with best64 led once again to the highest number of matches. These results show that PassGAN provides substantial benefits when no samples from the target distribution are available, which is often the case with password guessing. Further, when we combined the output of PassGAN with that of HashCat's best64 rules, we were able to match 1,772,524 more passwords than with best64 alone-an increase of about 24%.
We inspected a list of passwords generated by PassGAN that did not match any of the testing sets and determined that many of these passwords are reasonable candidates for humangenerated passwords. As such, we speculate that a possibly large number of passwords generated by the GAN, and that did not match our test sets, might still match user accounts from services other than RockYou. We list a small sample of these passwords in Table IV. V. CONCLUSION In this paper, we introduced PassGAN, the first password guessing technique based on GANs. Our results show that character-level GANs are well suited for generating password guesses when trained on leaked password data. Further, our results show that GANs generalize well when trained on a password dataset, and tested on a differently distributed dataset.
In our experiments, we were able to match over 46% of the passwords in a testing set extracted from the RockYou password dataset, when the GAN was trained on a different subset of RockYou. Compared to rule-based password generation techniques, our experiments show that PassGAN is very competitive. Although HashCat's best64 and gen2 rules outperformed PassGAN, our approach was able to match twice as many passwords as JTR's SpyderLabs rules. Moreover, by combining the output of the GAN with the output of the best64 rules, we were able to match more than 78% of the passwords in the RockYou dataset, and almost 27% of the passwords from the LinkedIn dataset-an increase of about 18% and 24%, respectively. This is remarkable because it shows that the GAN can generate a large number of passwords that are out of reach for current state-of-the-art password generation tools. Further, when we evaluated each password guessing tool on a dataset (LinkedIn) distinct from the training set (RockYou), the drop in matching rate of the GAN was less pronounced.
We believe that our approach to password guessing is revolutionary because, unlike current rule-based tools, PassGAN was able to generate passwords with no user interventionthus requiring no domain knowledge on passwords, nor manual analysis of password database leaks. Also, our evaluation of training performance suggests that, when supplied with a large enough leaked password set, the performance of PassGAN could surpass that of the best rule-based password generation techniques.