Adding PCFG to slow_candidates
#1
Reviving the discussion started in this thread: https://hashcat.net/forum/thread-7936.html

BLUF: I'm starting to write a PCFG guesser implementation in C with the eventual goal of getting it included as  a slow candidate mode in Hashcat. 

Current Python PCFG code: https://github.com/lakiw/pcfg_cracker

I will be starting a new repo shortly for the C only version of the guess generator. I plan on both versions using the Python training program to generate rulesets/grammars.

Question:
1) Are there templates for the five functions for sc mode? I'm going to quote Atom below on those five functions

The five functions in general are the following:
  • sc_pcfg_init - A function which resets all internal structures of the generator as it would be started freshly from the commandline. It will also provide the mandatory and optional parameters a user can specify in a struct. It will return a context to work with. The context enables multi threading functionality.

  • sc_pcfg_keyspace - A function which simply returns the total number of candidates which the generator will create based on the parameter configuration. If the total number is unknown this has some disadvantages. For instance, the ETA can not be computed or it may not be possible to distribute it via hashtopolis. In this case return (u64) -1 and hashcat will assume the generator will give a negative returncode in the seek/next function (explained next).

  • sc_pcfg_seek - Seek to a specific candidate position. This is mandatory, the parameter will be just a number. Will also have a returncode if there's no such position

  • sc_pcfg_next - Output the next password candidate (based on the context)

  • sc_pcfg_shutdown - A cleanup function
Note: Based on other discussions, seek and keyspace may not be practical to implement with the current next algorithm that the PCFG code uses.
Reply


Messages In This Thread
Adding PCFG to slow_candidates - by lakiw - 08-17-2019, 01:40 AM
RE: Adding PCFG to slow_candidates - by atom - 08-22-2019, 11:34 AM
RE: Adding PCFG to slow_candidates - by lakiw - 08-22-2019, 10:46 PM
RE: Adding PCFG to slow_candidates - by dizcza - 06-26-2020, 10:21 PM
RE: Adding PCFG to slow_candidates - by lakiw - 09-22-2019, 07:05 AM
RE: Adding PCFG to slow_candidates - by lakiw - 09-22-2019, 07:09 AM
RE: Adding PCFG to slow_candidates - by lakiw - 09-23-2019, 04:15 AM