{"id":8876,"date":"2020-02-07T19:44:51","date_gmt":"2020-02-07T14:14:51","guid":{"rendered":"http:\/\/kalilinuxtutorials.com\/?p=8876"},"modified":"2020-02-07T19:44:51","modified_gmt":"2020-02-07T14:14:51","slug":"pcfg","status":"publish","type":"post","link":"https:\/\/kalilinuxtutorials.com\/pcfg\/","title":{"rendered":"PCFG Cracker : Probabilistic Context Free Grammar (PCFG) Password Guess Generator"},"content":{"rendered":"\n<p>This project uses machine learning to identify password creation  habits of users. A PCFG model is generated by training on a list of  disclosed plaintext\/cracked passwords. In the context of this project,  the model is referred to as a ruleset and contains many different parts  of the passwords identified during training, along with their associated  probabilities. <\/p>\n\n\n\n<p>This stemming can be useful for other cracking tools  such as PRINCE, and\/or parts of the ruleset can be directly incorporated  into more traditional dictionary-based attacks. This project also  includes a PCFG guess generator that makes use of this ruleset to  generate password guesses in probability order. <\/p>\n\n\n\n<p>This is much more  powerful than standard dictionary attacks, and in testing has proven to  be able to crack passwords on average with significantly less guesses  than other publicly available methods. <\/p>\n\n\n\n<p>The downside is that generating  guesses in probability order is slow, meaning it is creating on average  50-100k guesses a second, where GPU based algorithms can create millions  to billions (and up), of guesses a second against fast hashing  algorithms. <\/p>\n\n\n\n<p>Therefore, the PCFG guesser is best used against large  numbers of salted hashes, or other slow hashing algorithms, where the  performance cost of the algorithm is made up for with the accuracy of  the guesses.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>PCFG &#8211; Probabilistic Context Free Grammar<\/li><li>PCFG &#8211; Pretty Cool Fuzzy Guesser<\/li><\/ul>\n\n\n\n<p>In short: A collection of tools to perform research into how humans  generate passwords. These can be used to crack password hashes, but also  create synthetic passwords (honeywords), or help develop better  password strength algorithms.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>Also Read &#8211; <a href=\"https:\/\/kalilinuxtutorials.com\/s3enum\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"S3enum : Fast Amazon S3 Bucket Enumeration Tool For Pentesters (opens in a new tab)\">S3enum : Fast Amazon S3 Bucket Enumeration Tool For Pentesters<\/a><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/lakiw\/pcfg_cracker#requirements--installation\"><\/a><\/h2>\n\n\n\n<p class=\"has-background has-text-align-center has-light-green-cyan-background-color\"><strong>Requirements &amp; Installation<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Python3 is the only hard requirement for these tools<\/li><li>It is <strong>highly recommended<\/strong> that you install the \nchardet python3 library for training. While not required, it performs \ncharacter encoding autodetection of the training passwords. To install \nit:<\/li><li>Download the source from <a href=\"http:\/\/https:\/\/pypi.python.org\/pypi\/chardet\">https:\/\/pypi.python.org\/pypi\/chardet<\/a><\/li><li>Or install it using <code>pip3 install chardet<\/code><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/lakiw\/pcfg_cracker#quick-start-guide\"><\/a><\/h2>\n\n\n\n<p class=\"has-background has-text-align-center has-light-green-cyan-background-color\"><strong>Quick Start Guide<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/lakiw\/pcfg_cracker#training\"><\/a><\/h3>\n\n\n\n<p><strong>Training<\/strong><\/p>\n\n\n\n<p>The default ruleset included in this repo was created by training on a  1 million password subset of the RockYou dataset. Better performance  can be achieved by training on the full 32 million password set for  RockYou, but that was excluded to keep the download size small. <\/p>\n\n\n\n<p>You can  use the default ruleset to start generating passwords without having to  train on a new list, but it is recommended to train on a target set of  passwords that may be closer to what you are trying to target. If you do  create your own ruleset, here is a quick guide:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Identify a set of plaintext passwords to train on.<ul><li>This passwords set should include duplicate passwords. That way the  trainer can identify common passwords like 123456 are common.<\/li><li>The passwords should be in plaintext with hashes and associated info  like usernames removed from them. Don&#8217;t try to use raw .pot files as  your training set as the hashes will be considered part of the password  by the training program.<\/li><li>The passwords should be encoded the same way you want to generate  password guesses as. So, if you want to create UTF-8 password guesses,  the training set should also be encoded as UTF-8. Long term, the ability  to modify this when generating guesses is on the development plan, but  that feature is currently not supported.<\/li><li>The training password list should be between 100k and 50 million.  Testing is still being done on how the size of the training password  list affects guess generation, and there has been good success even with  password lists as small as 10k, but an ideal size is likely around 1  million, with diminishing returns after that.<\/li><li>For the purposes of this tutorial the input password list will be referred to as INPUT_PASSWORD_LIST<\/li><\/ul><\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>Choose a name for your generated ruleset. For the purposes of this tutorial it will be NEW_RULESET<\/li><li>Run the trainer on the input password list<ul><li><code><strong>python3 trainer.py -t INPUT_PASSWORD_LIST -r NEW_RULESET<\/strong><\/code><\/li><li>Common optional flags: a. <strong>coverage<\/strong>: How much you trust the training set to  match the target passwords. A higher coverage means to use less  intelligent brute force generation using Markov modeling, (currently  using the OMEN algorithm). If you set coverage to 1, no brute force will  be performed. If you set coverage to 0, it will only generate guesses  using Markov attacks. This value is a float, with the default being 0.6  which means it expects a 60% chance the target password&#8217;s base words can  be found in the training set. Example: <code><strong>python3 trainer.py -t INPUT_PASSWORD_LIST -r NEW_RULESET -c 0.6<\/strong><\/code> b. <strong>&#8211;save_sensitive<\/strong>: If this is specified, sensitive  data such as e-mail addresses and full websites which are discovered  during training will be saved in the ruleset. While the PCFG guess  generator does not currently make use of this data, it is very valuable  during a real password cracking attack. This by default is off to make  this tool easier to use in an academic setting. Note, even when this is  off, there will almost certainly still be PII data saved inside a  ruleset, so protect generated rulesets appropriately. Example: <code><strong>python3 trainer.py -t INPUT_PASSWORD_LIST -r NEW_RULESET --save_sensitive<\/strong><\/code> c. <strong>&#8211;comments<\/strong>: Adds a comment to your ruleset config  file. This is useful so you know why and how you generated your ruleset  when looking back at it later. Include the comment you want to add in  quotes.<\/li><\/ul><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/lakiw\/pcfg_cracker#guess-generation\"><\/a><\/h3>\n\n\n\n<p class=\"has-background has-light-green-cyan-background-color\"><strong>Guess Generation<\/strong><\/p>\n\n\n\n<p>This generates guesses to stdout using a previously training PCFG \nruleset. These guesses can then be piped into any program that you want \nto make use of them. If no ruleset is specified, the default ruleset <strong>DEFAULT<\/strong> will be used. For the purposes of this guide it will assume the ruleset being used is <strong>NEW_RULESET<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Note: the guess generation program is case sensitive when specifying the ruleset name.<ul><li>A session name is not required, (it will by default create a session called <strong>default_run<\/strong>), but it is helpful to make restarting a paused\/stopped session easier. These examples will use the session name <strong>SESSION_NAME<\/strong>.  Note, there is no built in sanity check if you run multiple sessions  with the same name at the same time, but it is recommend to avoid that.<\/li><\/ul><\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>To start a new guessing session run:<ul><li><code><strong>python3 pcfg_guesser.py -r NEW_RULESET<\/strong><\/code> -s SESSION_NAME<\/li><\/ul><\/li><li>To restart a previous guessing session run:<ul><li><code><strong>python3 pcfg_guesser.py -s SESSION_NAME --load<\/strong><\/code><\/li><\/ul><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/lakiw\/pcfg_cracker#password-strength-scoring\"><\/a><\/h3>\n\n\n\n<p class=\"has-background has-light-green-cyan-background-color\"><strong>Password Strength Scoring<\/strong><\/p>\n\n\n\n<p>There are many cases where you may want to estimate the probability \nof a password being generated by a previously trained ruleset. For \nexample, this could be part of a password strength metric, or used for \nother research purposes. A sample program has been included to perform \nthis.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>INPUT_LIST represents the list of passwords to score. These  passwords should be plaintext, and separated by newlines, with one  password per line.<\/li><li>To run a scoring session: <code><strong>python3 password_scorer -r NEW_RULESET -i INPUT_LIST<\/strong><\/code><\/li><li>By default. it will output the results to stdout, with each password scored per line<ul><li>The first value is the raw password<\/li><li>The second value will represent if the input value was scored a  &#8216;password&#8217;, &#8216;website&#8217;, &#8216;e-mail address&#8217;, or &#8216;other&#8217;. This determination  of password or other is dependent on the limits you set for both OMEN  guess limit, as well as probability associated with the PCFG.<\/li><li>The third value is the probability of the password according to the  Ruleset. If it is assigned a value of 0.0, that means that the password  will not be generated by the ruleset, though it may be generated by a  Markov based attack<\/li><li>The fourth value is the OMEN level that will generate the password. A  value of -1 means the password will not be generated by OMEN.<\/li><\/ul><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/lakiw\/pcfg_cracker#prince-ling-wordlist-generator\"><\/a><\/h3>\n\n\n\n<p class=\"has-background has-light-green-cyan-background-color\"><strong>Prince-Ling Wordlist Generator<\/strong><\/p>\n\n\n\n<p>**Name: **PRINCE Language Idexed N-Grams (Prince-Ling)<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Overview:<\/strong> Constructs customized wordlists based on  an already trained PCFG ruleset\/grammar for use in PRINCE style  combinator attacks. The idea behind this was since the PCFG trainer is  already breaking up a training set up passwords into individual  parsings, that information could be leveraged to make targeted wordlists  for other attacks.<\/li><li><strong>Basic Mechanics:<\/strong> Under the hood, the Prince-Ling  tool is basically a mini-PCFG guess generator. It strips out the Markov  guess generation, and replaces the base structures used in normal PCFG  attacks with a significantly reduced base-structure tailored for  generating PRINCE wordlists. This allows generating dictionary words in  probability order with an eye to how useful those words are expected to  be in a PRINCE attack.<\/li><\/ul>\n\n\n\n<p class=\"has-background has-light-green-cyan-background-color\"><strong>Using Prince-Ling<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Train a PCFG ruleset using trainer.py. Note you need to create the  ruleset using version 4.1 or later of the PCFG toolset, as earlier  versions did not learn all the datastructures that Prince-Ling utilizes.<\/li><li>Run Prince-Ling  <code><strong>python3 prince-ling.py -r RULESET_NAME -s SIZE_OF_WORDLIST_TO_CREATE -o OUTPUT_FILENAME<\/strong><\/code><ul><li><strong>&#8211;rule<\/strong>: Name of the PCFG ruleset to create the PRINCE wordlist from<\/li><li><strong>&#8211;size<\/strong>: Number of words to create for the PRINCE  wordlist. Note, if not specified, Prince-Ling will generate all possible  words which can be quite large depending on if case_mangling is  enabled. (Case mangling increases the keyspace enourmously)<\/li><li><strong>&#8211;output<\/strong>: Output filename to write entrees to.  Note, if not specified, Prince-Ling will output words to stdout, which  may cause problems depending on what shell you are using when printing  non-ASCII characters.<\/li><li><strong>&#8211;all_lower<\/strong>: Only generate lowercase words for the  PRINCE dictionary. This is useful when attacking case-insensitive  hashes, or if you plan on applying targeted case mangling a different  way.<\/li><\/ul><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/lakiw\/pcfg_cracker#example-cracking-passwords-using-john-the-ripper\"><\/a><\/h3>\n\n\n\n<p class=\"has-background has-light-green-cyan-background-color\"><strong>Example Cracking Passwords Using Joh<\/strong><\/p>\n\n\n\n<p><strong>n the Ripper<\/strong><\/p>\n\n\n\n<p class=\"has-text-color has-background has-vivid-green-cyan-color has-very-dark-gray-background-color\">python3 pcfg_guesser -r NEW_RULESET -s SESSION_NAME | .\/john &#8211;stdin &#8211;format=bcrypt PASSWORDS_TO_CRACK.txt<\/p>\n\n\n\n<div class=\"wp-block-button aligncenter is-style-outline is-style-outline--1\"><a class=\"wp-block-button__link has-background has-vivid-cyan-blue-background-color\" href=\"https:\/\/github.com\/lakiw\/pcfg_cracker\"><strong>Download<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This project uses machine learning to identify password creation habits of users. A PCFG model is generated by training on a list of disclosed plaintext\/cracked passwords. In the context of this project, the model is referred to as a ruleset and contains many different parts of the passwords identified during training, along with their associated [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":16085,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png","fifu_image_alt":"PCFG Cracker : Probabilistic Context Free Grammar (PCFG) Password Guess Generator","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[28],"tags":[],"class_list":["post-8876","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kali"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>PCFG : Probabilistic Context Free Grammar Password Guess Generator<\/title>\n<meta name=\"description\" content=\"This project uses machine learning to identify password creation habits of users. A PCFG model is generated by training on a list of disclosed\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kalilinuxtutorials.com\/pcfg\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PCFG : Probabilistic Context Free Grammar Password Guess Generator\" \/>\n<meta property=\"og:description\" content=\"This project uses machine learning to identify password creation habits of users. A PCFG model is generated by training on a list of disclosed\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kalilinuxtutorials.com\/pcfg\/\" \/>\n<meta property=\"og:site_name\" content=\"Kali Linux Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2020-02-07T14:14:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png\" \/>\n<meta name=\"author\" content=\"R K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png\" \/>\n<meta name=\"twitter:creator\" content=\"@CyberEdition\" \/>\n<meta name=\"twitter:site\" content=\"@CyberEdition\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"R K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/pcfg\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/pcfg\/\"},\"author\":{\"name\":\"R K\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/#\/schema\/person\/69444b58b9e267a4cf08fceb34b6f6ad\"},\"headline\":\"PCFG Cracker : Probabilistic Context Free Grammar (PCFG) Password Guess Generator\",\"datePublished\":\"2020-02-07T14:14:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/pcfg\/\"},\"wordCount\":1543,\"publisher\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/pcfg\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png\",\"articleSection\":[\"Kali Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/pcfg\/\",\"url\":\"https:\/\/kalilinuxtutorials.com\/pcfg\/\",\"name\":\"PCFG : Probabilistic Context Free Grammar Password Guess Generator\",\"isPartOf\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/pcfg\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/pcfg\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png\",\"datePublished\":\"2020-02-07T14:14:51+00:00\",\"description\":\"This project uses machine learning to identify password creation habits of users. A PCFG model is generated by training on a list of disclosed\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kalilinuxtutorials.com\/pcfg\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/pcfg\/#primaryimage\",\"url\":\"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png\",\"contentUrl\":\"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/#website\",\"url\":\"https:\/\/kalilinuxtutorials.com\/\",\"name\":\"Kali Linux Tutorials\",\"description\":\"Kali Linux Tutorials\",\"publisher\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kalilinuxtutorials.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/#organization\",\"name\":\"Kali Linux Tutorials\",\"url\":\"https:\/\/kalilinuxtutorials.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kalilinuxtutorials.com\/wp-content\/uploads\/2025\/07\/Kali.png\",\"contentUrl\":\"https:\/\/kalilinuxtutorials.com\/wp-content\/uploads\/2025\/07\/Kali.png\",\"width\":272,\"height\":90,\"caption\":\"Kali Linux Tutorials\"},\"image\":{\"@id\":\"https:\/\/kalilinuxtutorials.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/CyberEdition\",\"https:\/\/www.threads.com\/@cybersecurityedition\",\"https:\/\/www.linkedin.com\/company\/cyberedition\",\"https:\/\/www.instagram.com\/cybersecurityedition\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/#\/schema\/person\/69444b58b9e267a4cf08fceb34b6f6ad\",\"name\":\"R K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kalilinuxtutorials.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d3937c9687f2da11bc0a716404ff91779fe19ca115208dbf66167ad353aca5aa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d3937c9687f2da11bc0a716404ff91779fe19ca115208dbf66167ad353aca5aa?s=96&d=mm&r=g\",\"caption\":\"R K\"},\"url\":\"https:\/\/kalilinuxtutorials.com\/author\/ranjith\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PCFG : Probabilistic Context Free Grammar Password Guess Generator","description":"This project uses machine learning to identify password creation habits of users. A PCFG model is generated by training on a list of disclosed","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kalilinuxtutorials.com\/pcfg\/","og_locale":"en_US","og_type":"article","og_title":"PCFG : Probabilistic Context Free Grammar Password Guess Generator","og_description":"This project uses machine learning to identify password creation habits of users. A PCFG model is generated by training on a list of disclosed","og_url":"https:\/\/kalilinuxtutorials.com\/pcfg\/","og_site_name":"Kali Linux Tutorials","article_published_time":"2020-02-07T14:14:51+00:00","og_image":[{"url":"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png","type":"","width":"","height":""}],"author":"R K","twitter_card":"summary_large_image","twitter_image":"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png","twitter_creator":"@CyberEdition","twitter_site":"@CyberEdition","twitter_misc":{"Written by":"R K","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kalilinuxtutorials.com\/pcfg\/#article","isPartOf":{"@id":"https:\/\/kalilinuxtutorials.com\/pcfg\/"},"author":{"name":"R K","@id":"https:\/\/kalilinuxtutorials.com\/#\/schema\/person\/69444b58b9e267a4cf08fceb34b6f6ad"},"headline":"PCFG Cracker : Probabilistic Context Free Grammar (PCFG) Password Guess Generator","datePublished":"2020-02-07T14:14:51+00:00","mainEntityOfPage":{"@id":"https:\/\/kalilinuxtutorials.com\/pcfg\/"},"wordCount":1543,"publisher":{"@id":"https:\/\/kalilinuxtutorials.com\/#organization"},"image":{"@id":"https:\/\/kalilinuxtutorials.com\/pcfg\/#primaryimage"},"thumbnailUrl":"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png","articleSection":["Kali Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/kalilinuxtutorials.com\/pcfg\/","url":"https:\/\/kalilinuxtutorials.com\/pcfg\/","name":"PCFG : Probabilistic Context Free Grammar Password Guess Generator","isPartOf":{"@id":"https:\/\/kalilinuxtutorials.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/kalilinuxtutorials.com\/pcfg\/#primaryimage"},"image":{"@id":"https:\/\/kalilinuxtutorials.com\/pcfg\/#primaryimage"},"thumbnailUrl":"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png","datePublished":"2020-02-07T14:14:51+00:00","description":"This project uses machine learning to identify password creation habits of users. A PCFG model is generated by training on a list of disclosed","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kalilinuxtutorials.com\/pcfg\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kalilinuxtutorials.com\/pcfg\/#primaryimage","url":"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png","contentUrl":"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png"},{"@type":"WebSite","@id":"https:\/\/kalilinuxtutorials.com\/#website","url":"https:\/\/kalilinuxtutorials.com\/","name":"Kali Linux Tutorials","description":"Kali Linux Tutorials","publisher":{"@id":"https:\/\/kalilinuxtutorials.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kalilinuxtutorials.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kalilinuxtutorials.com\/#organization","name":"Kali Linux Tutorials","url":"https:\/\/kalilinuxtutorials.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kalilinuxtutorials.com\/#\/schema\/logo\/image\/","url":"https:\/\/kalilinuxtutorials.com\/wp-content\/uploads\/2025\/07\/Kali.png","contentUrl":"https:\/\/kalilinuxtutorials.com\/wp-content\/uploads\/2025\/07\/Kali.png","width":272,"height":90,"caption":"Kali Linux Tutorials"},"image":{"@id":"https:\/\/kalilinuxtutorials.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/CyberEdition","https:\/\/www.threads.com\/@cybersecurityedition","https:\/\/www.linkedin.com\/company\/cyberedition","https:\/\/www.instagram.com\/cybersecurityedition\/"]},{"@type":"Person","@id":"https:\/\/kalilinuxtutorials.com\/#\/schema\/person\/69444b58b9e267a4cf08fceb34b6f6ad","name":"R K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kalilinuxtutorials.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d3937c9687f2da11bc0a716404ff91779fe19ca115208dbf66167ad353aca5aa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d3937c9687f2da11bc0a716404ff91779fe19ca115208dbf66167ad353aca5aa?s=96&d=mm&r=g","caption":"R K"},"url":"https:\/\/kalilinuxtutorials.com\/author\/ranjith\/"}]}},"jetpack_featured_media_url":"https:\/\/1.bp.blogspot.com\/-aUh2DTPaGfk\/XjxGrzokaRI\/AAAAAAAAEvg\/x6QvbOGdDCsJ2ClE6AsjRbsi-nC7aASJQCLcBGAsYHQ\/s1600\/Cracking%2BAlgorithm%25281%2529.png","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":9000,"url":"https:\/\/kalilinuxtutorials.com\/secraper\/","url_meta":{"origin":8876,"position":0},"title":"SEcraper : Search Engine Scraper Tool With BASH Script","author":"R K","date":"February 12, 2020","format":false,"excerpt":"SEcraper is a search engine scraper tool with BASH script. Dependency curl (cli) Available Search Engine Ask.comSearch.yahoo.comBing.com Also Read - PCFG Cracker : Probabilistic Context Free Grammar (PCFG) Password Guess Generator Installation git clone https:\/\/github.com\/zerobyte-id\/SEcraper.git cd SEcraper\/ Run bash secraper.bash \"QUERY\" Download","rel":"","context":"In &quot;Kali Linux&quot;","block_context":{"text":"Kali Linux","link":"https:\/\/kalilinuxtutorials.com\/category\/kali\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":9007,"url":"https:\/\/kalilinuxtutorials.com\/fockcache\/","url_meta":{"origin":8876,"position":1},"title":"FockCache : Minimalized Test Cache Poisoning","author":"R K","date":"February 13, 2020","format":false,"excerpt":"FockCache is a minimalized test cache poisoning. It tries to make cache poisoning by trying X-Forwarded-Host and X-Forwarded-Scheme headers on web pages. After successful result, it gives you a poisoned URL. To be added soon: Page Param CheckerRecursive Checking Installation Install with installer.sh chmod +x installer.sh.\/installer.sh Also Read - PCFG\u2026","rel":"","context":"In &quot;Kali Linux&quot;","block_context":{"text":"Kali Linux","link":"https:\/\/kalilinuxtutorials.com\/category\/kali\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":17773,"url":"https:\/\/kalilinuxtutorials.com\/pantagrule\/","url_meta":{"origin":8876,"position":2},"title":"Pantagrule : Large Hashcat Rulesets Generated From Real-World Compromised Passwords","author":"R K","date":"September 14, 2021","format":false,"excerpt":"Pantagrule is a series of rules for the\u00a0hashcat\u00a0password cracker generated from large amounts of real-world password compromise data. While Pantagrule rule files can be large, the rules are both tunable and perform better than many existing rule sets. Pantagrule was generated using\u00a0PACK's Levenshtein Reverse Path algorithm for automated rule generation\u2026","rel":"","context":"In &quot;Kali Linux&quot;","block_context":{"text":"Kali Linux","link":"https:\/\/kalilinuxtutorials.com\/category\/kali\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/1.bp.blogspot.com\/-JnlYPR8UtRY\/YTBO5PURDCI\/AAAAAAAAKo0\/0-mgMmxw1MUY8YkKOuczpByNXuWukMLugCLcBGAsYHQ\/s992\/download%2B%25281%2529.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/1.bp.blogspot.com\/-JnlYPR8UtRY\/YTBO5PURDCI\/AAAAAAAAKo0\/0-mgMmxw1MUY8YkKOuczpByNXuWukMLugCLcBGAsYHQ\/s992\/download%2B%25281%2529.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/1.bp.blogspot.com\/-JnlYPR8UtRY\/YTBO5PURDCI\/AAAAAAAAKo0\/0-mgMmxw1MUY8YkKOuczpByNXuWukMLugCLcBGAsYHQ\/s992\/download%2B%25281%2529.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/1.bp.blogspot.com\/-JnlYPR8UtRY\/YTBO5PURDCI\/AAAAAAAAKo0\/0-mgMmxw1MUY8YkKOuczpByNXuWukMLugCLcBGAsYHQ\/s992\/download%2B%25281%2529.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":8609,"url":"https:\/\/kalilinuxtutorials.com\/password-attacks\/","url_meta":{"origin":8876,"position":3},"title":"How to Protect Yourself Against Common Password Attacks","author":"Balaji N","date":"January 25, 2020","format":false,"excerpt":"To avoid password attacks, Authentication and access management may be evolving, but passwords are not going to disappear in the near future. Experts believe that the number of passwords in use will reach 300 billion in 2020.\u00a0 Although IT professionals understand the significance of secure passwords, almost 70% of employees\u2026","rel":"","context":"In &quot;Kali Linux&quot;","block_context":{"text":"Kali Linux","link":"https:\/\/kalilinuxtutorials.com\/category\/kali\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":29274,"url":"https:\/\/kalilinuxtutorials.com\/john-the-ripper-password-cracking\/","url_meta":{"origin":8876,"position":4},"title":"Unveiling the Power of John the Ripper: A Password Cracking Tool","author":"Varshini","date":"June 16, 2023","format":false,"excerpt":"Passwords are the first line of defense for most computer systems and online accounts. A strong, complex password can help thwart hackers and unauthorized access. However, many users choose weak, easy-to-guess passwords that provide little security. Password cracking tools, like John the Ripper, are designed to break into weak passwords.\u2026","rel":"","context":"In &quot;Kali Linux&quot;","block_context":{"text":"Kali Linux","link":"https:\/\/kalilinuxtutorials.com\/category\/kali\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh93Up0vJdN2tRrzXX9CuolheYK9gUA1KZx2ZJrhfKVro6nyma3_67gHzYMQLxeOlTYehfxf33q2amsnfBVJBJ3kXi_3_gRjwDv1JQqf6wIkJLN7-rpYciBApByHrz8xheP78ciC3oN38FiJ7y_m3JLmGYuB0i4KYrQ6srlFOz7HTRKwbD_PaF_ihmkfA\/s16000\/jtr1.webp?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh93Up0vJdN2tRrzXX9CuolheYK9gUA1KZx2ZJrhfKVro6nyma3_67gHzYMQLxeOlTYehfxf33q2amsnfBVJBJ3kXi_3_gRjwDv1JQqf6wIkJLN7-rpYciBApByHrz8xheP78ciC3oN38FiJ7y_m3JLmGYuB0i4KYrQ6srlFOz7HTRKwbD_PaF_ihmkfA\/s16000\/jtr1.webp?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh93Up0vJdN2tRrzXX9CuolheYK9gUA1KZx2ZJrhfKVro6nyma3_67gHzYMQLxeOlTYehfxf33q2amsnfBVJBJ3kXi_3_gRjwDv1JQqf6wIkJLN7-rpYciBApByHrz8xheP78ciC3oN38FiJ7y_m3JLmGYuB0i4KYrQ6srlFOz7HTRKwbD_PaF_ihmkfA\/s16000\/jtr1.webp?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh93Up0vJdN2tRrzXX9CuolheYK9gUA1KZx2ZJrhfKVro6nyma3_67gHzYMQLxeOlTYehfxf33q2amsnfBVJBJ3kXi_3_gRjwDv1JQqf6wIkJLN7-rpYciBApByHrz8xheP78ciC3oN38FiJ7y_m3JLmGYuB0i4KYrQ6srlFOz7HTRKwbD_PaF_ihmkfA\/s16000\/jtr1.webp?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":26772,"url":"https:\/\/kalilinuxtutorials.com\/awesome-password-cracking\/","url_meta":{"origin":8876,"position":5},"title":"Awesome-Password-Cracking :A Curated List Of Awesome Tools, Research, Papers And Other Projects","author":"R K","date":"September 8, 2022","format":false,"excerpt":"Awesome-Password-Cracking is a curated list of awesome tools, research, papers and other projects related to password cracking and password security. Read the\u00a0guidelines\u00a0before contributing! In short: List is alphabetically sortedIf in doubt, use\u00a0awesome-lintIf you think an item shouldn't be here\u00a0open an issue Books Hash Crack: Password Cracking Manual (v3)\u00a0- Password Cracking\u2026","rel":"","context":"In &quot;Kali Linux&quot;","block_context":{"text":"Kali Linux","link":"https:\/\/kalilinuxtutorials.com\/category\/kali\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjcndc-dWn5q9xnNUvXqJNZIzKAf38iWXe-fMC6uvUyizG5g4YhlAONhUCUPgzBz0NLC0nNRN88sll4vpOQxnqzZVDZzb47IRVRwLAMac2pAfJim6us_XDgSNPD-zjuQRIgx2CgcJfdwyaZ5sX2mBHeFOFk4Adp2fQ5CSvv2a_ppsQgGTHfszTsY73l\/s728\/password_cracking%20%282%29.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjcndc-dWn5q9xnNUvXqJNZIzKAf38iWXe-fMC6uvUyizG5g4YhlAONhUCUPgzBz0NLC0nNRN88sll4vpOQxnqzZVDZzb47IRVRwLAMac2pAfJim6us_XDgSNPD-zjuQRIgx2CgcJfdwyaZ5sX2mBHeFOFk4Adp2fQ5CSvv2a_ppsQgGTHfszTsY73l\/s728\/password_cracking%20%282%29.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjcndc-dWn5q9xnNUvXqJNZIzKAf38iWXe-fMC6uvUyizG5g4YhlAONhUCUPgzBz0NLC0nNRN88sll4vpOQxnqzZVDZzb47IRVRwLAMac2pAfJim6us_XDgSNPD-zjuQRIgx2CgcJfdwyaZ5sX2mBHeFOFk4Adp2fQ5CSvv2a_ppsQgGTHfszTsY73l\/s728\/password_cracking%20%282%29.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjcndc-dWn5q9xnNUvXqJNZIzKAf38iWXe-fMC6uvUyizG5g4YhlAONhUCUPgzBz0NLC0nNRN88sll4vpOQxnqzZVDZzb47IRVRwLAMac2pAfJim6us_XDgSNPD-zjuQRIgx2CgcJfdwyaZ5sX2mBHeFOFk4Adp2fQ5CSvv2a_ppsQgGTHfszTsY73l\/s728\/password_cracking%20%282%29.png?resize=700%2C400&ssl=1 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/posts\/8876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/comments?post=8876"}],"version-history":[{"count":0,"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/posts\/8876\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/media\/16085"}],"wp:attachment":[{"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/media?parent=8876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/categories?post=8876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kalilinuxtutorials.com\/wp-json\/wp\/v2\/tags?post=8876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}