[Paper Review] PassGPT: Password Modeling and (Guided) Generation with Large Language Models
PassGPT is a large language model based on GPT-2 that models human-generated passwords using autoregressive, character-level generation, achieving 20% higher guessing accuracy on unseen passwords than prior GAN-based methods. It enables guided password generation under arbitrary constraints and provides an explicit probability distribution that aligns with password strength estimators, enhancing existing strength estimation techniques.
Large language models (LLMs) successfully model natural language from vast amounts of text without the need for explicit supervision. In this paper, we investigate the efficacy of LLMs in modeling passwords. We present PassGPT, a LLM trained on password leaks for password generation. PassGPT outperforms existing methods based on generative adversarial networks (GAN) by guessing twice as many previously unseen passwords. Furthermore, we introduce the concept of guided password generation, where we leverage PassGPT sampling procedure to generate passwords matching arbitrary constraints, a feat lacking in current GAN-based strategies. Lastly, we conduct an in-depth analysis of the entropy and probability distribution that PassGPT defines over passwords and discuss their use in enhancing existing password strength estimators.
Motivation & Objective
- To investigate the effectiveness of large language models (LLMs) in modeling human-generated passwords without explicit supervision.
- To develop a state-of-the-art offline password-guessing model that generalizes well to unseen password leaks.
- To introduce guided password generation, allowing generation under arbitrary constraints via character-level autoregressive sampling.
- To analyze the probability distribution and entropy of passwords under PassGPT and assess alignment with existing strength estimators.
- To improve password strength estimation by integrating log-probability scores from generative models.
Proposed method
- PassGPT is an autoregressive transformer model trained on password leaks using the GPT-2 architecture to model the conditional probability of each character given previous characters.
- The model enables guided password generation by controlling the sampling process at each character step, allowing constraints such as length, character set, or patterns to be enforced.
- Vector quantization is applied in PassVQT to increase generation perplexity and improve diversity while maintaining fidelity to the training distribution.
- Log-probabilities and entropy of passwords are computed under PassGPT and compared with zxcvbn strength scores to evaluate alignment and detect discrepancies.
- Top-k sampling and temperature scaling are used to control the trade-off between diversity and likelihood during generation, enabling targeted exploration of the search space.
- The model is evaluated on RockYou and LinkedIn password leaks, measuring guessing accuracy on previously unseen passwords and analyzing probability distributions.
Experimental results
Research questions
- RQ1Can large language models effectively model the distribution of human-generated passwords without explicit supervision?
- RQ2How does PassGPT’s performance in guessing unseen passwords compare to state-of-the-art GAN-based models?
- RQ3To what extent can PassGPT support guided password generation under arbitrary constraints?
- RQ4How well do the log-probabilities assigned by PassGPT align with established password strength estimators like zxcvbn?
- RQ5Can PassGPT’s probability scores improve the accuracy of existing password strength estimation systems?
Key findings
- PassGPT outperforms prior GAN-based models by guessing 20% more previously unseen passwords on benchmark datasets.
- PassGPT assigns lower probabilities and higher entropy to stronger passwords, demonstrating alignment with established strength estimators like zxcvbn.
- The model identifies specific patterns—such as repeated sequences, leetspeak substitutions, and reversed words—as outliers where zxcvbn deems passwords weak but PassGPT assigns low probabilities.
- Conversely, PassGPT assigns high probabilities to some very strong passwords, particularly those with non-English words or common love-related phrases with suffixes like '4eva' or '4ever'.
- The integration of PassGPT’s log-likelihood scores into strength estimators could reduce false negatives by identifying passwords that are likely to be guessed by generative models despite high zxcvbn scores.
- PassVQT, enhanced with vector quantization, increases generation perplexity, offering a trade-off between diversity and distributional fidelity for specialized use cases.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.