Semantic Prince - PRINCE with logic in word order
-
Title: Semantic PRINCE - PRINCE with logic in word order
Author: quasarwatch
URL: https://github.com/quasarwatch/semantic-princeDescription:
Classic PRINCE is a good tool but not efficient for me - it glues words in blind dictionary order. I added some logic to the word order. Semantic PRINCE trains a bigram model on RockYou passwords and makes chains with logic - the combinations people really use come first.
Example: with dictionary
{i, love, you, cat, car, soup}old PRINCE givesilove,iyou,icat... in list order. Mine givesiloveyoufirst andsoupcarlast, because nobody pickssoupcar.Features
- struct - word + tail patterns like
sunshine2024,dragon!,qwerty123. The model knows which tails are common (years,!,123) and splits the budget across templates by their real frequency - pairs - word+word joins ordered by the bigram model. Same candidate space as classic PRINCE, but sorted by probability
- chains - three-word chains for long passphrases (
ilovemymomstyle), reaching lengths pairs cannot - targeted mode - feed it a person's known words (
--personal words.txt), a service name (--service linkedinadds linkedin/linked/lnkd/mylinkedin), or leet input (--deleetreadsp@ssw0rdaspasswordtoo). Everything gets ordered around those words - scoring tool -
spg evaluatemeasures your own candidate lists against a test set at 100K/1M/10M/100M checkpoints
Numbers
Model-only vs classic PRINCE (pp64, same top-5000 dictionary, fixed config). Clean cross-dump tests - the model never saw the target passwords:
- linkedin (4.36M): x1.61 at 100K, x3.08 at 1M, x1.57 at 10M guesses, final 199,602 cracked at 43M vs classic PRINCE 104,797 at 100M
- rockyou (validation): x2.24 at 100K, x3.24 at 1M, x1.63 at 10M, final 150,078 at 43M vs 72,484
- real stack test (replay dictionary first, then the generator), raw LinkedIn dump 5.09M: 809,052 cracked at ~54M guesses, classic PRINCE gets 705,256
Speed
About 1.8M candidates/sec/core on pairs (struct ~650K/s, chains ~40K/s). Built for slow hashes (wallet formats, scrypt, high-iteration PBKDF2) and big salted lists, where every guess costs time. For fast hashes at GPU speed, masks and rules still win on raw throughput.
Quick start
- Download the repo and the release asset (
sp-model-rockyou-v2.tar.gz, 61 MB) - the trained model is included, no training needed - Unpack the model next to the repo (it creates
data/) - Generate and crack:
c/spg struct data/pw_uni.tsv data/pw_bi.tsv data/struct_templates.tsv data/struct_digits.tsv data/struct_syms.tsv 10000 1000000 > short.txt c/spg pairs data/pw_uni.tsv data/pw_bi.tsv 10000 pwbi 5000000 >> short.txt hashcat -m 0 -a 0 hashes.txt short.txtOr pipe straight into hashcat:
spg pairs ... | hashcat -r best64.rule -m ... hashes.txtReal first output lines of the pairs layer (the model reflects RockYou-era habits):
hotmailcom,babyprincess,loveblue,sweetand,angelbaby,lovedaniel,lovegod,babyboy.Limits (honest)
- No leetspeak - use hashcat rules for that (measured: a leet layer adds under 1K hits)
- No Cyrillic or other non-ASCII unless it was in the training data
- Words it never saw need a
--personallist - Not a replacement for the rule engine - it is the ordering brain in front of it
I want your feedback on this tool and to hear if you see potential in it.
- struct - word + tail patterns like
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login