In computer science and linguistics, a probabilistic context-free grammar (PCFG) is a type of formal grammar that is used to generate and recognize strings of symbols. It is a variant of a context-free grammar (CFG) in which the rules of the grammar are associated with probabilities, allowing the grammar to generate strings of symbols with certain probability distributions.
A PCFG consists of a set of terminal symbols, which are the basic symbols that can appear in the generated strings, and a set of nonterminal symbols, which represent structures or patterns that can be expanded into sequences of terminal and nonterminal symbols. The grammar also includes a set of production rules, which specify how the nonterminal symbols can be expanded into sequences of terminal and nonterminal symbols. Each production rule is associated with a probability, which indicates the likelihood that the rule will be used to expand a nonterminal symbol.
PCFGs are used in a variety of applications, including natural language processing, speech recognition, and machine translation, where they can be used to model the structure and probability distribution of the strings of symbols being generated or recognized. They are also used in computational biology to model the structure of DNA and protein sequences.
A Probabilistic Context Free Grammar (PCFG) consists of terminal and nonterminal variables. Each feature to be modeled has a production rule that is assigned a probability, estimated from a training set of RNA structures. Production rules are recursively applied until only terminal residues are left.The notion supporting PCFGs is that passwords are constructed with template structures and terminals that fit into those structures. For example, the password candidate 'password123!' is 8 letters, 3 digits, 1 special and would be noted as 'L8D3 51 ' . A password's probability of occurring is the probability of its structure, multiplied by those of its underlying terminals.
## Resources
Password Cracking Using Probabilistic Context-Free Grammars
https://sites.google.com/site/reusablesec/Home/password-crackingtools/probablistic_cracker
Next Gen [[PCFG - Pretty Cool Fuzzy Guesser]]
https://github.com/lakiw/pcfg_cracker
[[Home]]
#concepts #advanced