Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS: Test more modes #12

Open
magnumripper opened this issue Jul 24, 2014 · 8 comments
Open

TS: Test more modes #12

magnumripper opened this issue Jul 24, 2014 · 8 comments

Comments

@magnumripper
Copy link
Member

We currently only test wordlist mode, without rules.

We should test variants of the wordlist mode (rules, loopback, --min/max-length, dupe suppression, --mem=1, pipe and stdin) as well as other modes (incremental, markov, mask, perhaps some external mode). These tests can be performed using just a few, or even one single format (descrypt and NT would be a good choice because they include 7-bit, Unicode and short length).

Example:

  1. (on the fly) produce a dictionary using --incremental --stdout. Pick all the first 500 words and then 1000 more out of eg. 150000 (randomly distributed but using a fixed random seed - so reproducible!).
  2. (on the fly) produce NT hashes from the dict
  3. run JtR on the NT hashes, using --incremental
  4. delete the generated files

If the above is cleverly implemented, the same function can be used with markov or other modes instead of incremental.

@frank-dittrich
Copy link
Collaborator

descrypt and dummy would also be a good choice:
Both are core formats, stable, well tested.
One of them is salted, the other isn't.

@magnumripper
Copy link
Member Author

Actually we could be smarter than saying "500", "1500" and "150000". We could use eg. 2xMKPC, 48xMKPC and 48,000xMPKC so for NT (mkpc=32) we'd pick the first 64 words plus 1536 more, out of 1,5 million words.

This would mean we auto-adjust to eg. OpenCL formats with huge batches.

@magnumripper
Copy link
Member Author

I prefer NT over dummy because it lets us verify thread-safety in Unicode functions too. But for testing core we could use dummy.

EDIT NT has its own Unicode functions... so we may want to support some other format as well.

@jfoug
Copy link
Collaborator

jfoug commented Jul 24, 2014

There was Inc at one time, but the char files changed. The script does an msg of the chr file and will not continue if it does not match. Since they changed the script no longer uses them.

@magnumripper
Copy link
Member Author

That why I propose to create the test files on the fly. For these few formats, jtrts.dat can include the necessary functions to create the hashes. There's no point in testing incremental with all 300 formats. It would just take a lot of time.

@jfoug
Copy link
Collaborator

jfoug commented Jul 25, 2014

But if the process being tested is producing the test cases, does that not scream invalid?

@magnumripper
Copy link
Member Author

That's true, in many cases. I was mostly thinking about fork/mpi/node tests. The test file should be produced with neither of those options. We'd also test many things in cracker.c and loader.c that is not really used in the --inc --stdout that produces the files. BTW we could also test --resume this way (perhaps starting with --max-runtime).

But yes, maybe we should keep the thing you have in there, but update it with 1.8.0 incremental too.

@magnumripper
Copy link
Member Author

#56 added resume tests, which includes basic mode tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants