0:00
–:––
React at 0:00
DEF CON 34

Throw Out the Alphabet: Token-Based Markov Chains for Password Cracking

When and where

Day
Sat 8 Aug 2026
Time
15:00 to 16:00 PDT
Room
LVCC - L1 - Exhibit Hall West 3 - 1006 (Main Track 1)

Speaker

  • Jon Gorenflo is the founder of ATTACKD, a cybersecurity consulting firm dedicated to helping organizations of all sizes think like attackers and proactively secure their environments. Whether you're a startup, a small business, or a global enterprise, Jon brings real-world offensive security insights that are practical, accessible, and actionable. He is also a Principal Instructor with the SANS Institute and the co-author of SEC560: Enterprise Penetration Testing, a leading course on advanced ethical hacking and red team operations. With more than 20 years of combined experience in IT, penetration testing, incident response, and security training, Jon has worked with a diverse range of organizations to uncover critical vulnerabilities and build resilient defenses. In addition, Jon serves as the executive director of Hackers Teaching Hackers (HTH), a grassroots cybersecurity conference that emphasizes hands-on learning and community connection. Jon is known for his clear communication, relatable style, and dedication to helping defenders build practical skills. He breaks down hacker tactics into understandable steps and helps teams of all sizes, from a solo IT admin to an enterprise SOC, apply those lessons to real-world defenses.

Abstract

Classical Markov password generators work over the character alphabet: hashcat's Markov masks, JtR's --markov, OMEN, even neural models like PassGPT. We change one thing: the alphabet. Train an n-gram Markov on RockYou, but segment with GPT-2's 50k BPE tokenizer instead of characters. The distribution stays RockYou-derived; only the units change. The vocabulary captures structure characters can't: name fragments, digit patterns, symbol clusters from web-scale text. Across 14 leak corpora (RockYou, LinkedIn, Yahoo, +11 more), token-Markov beats OMEN at fixed budgets on all 14, at 10^8 and 10^9, with best66 rules on both sides. On enterprise passwords (8+ chars, 3 of 4 classes), we recover ~6x more than OMEN: 6.3% vs 1.1% at 10^8, 12.3% vs 2.3% at 10^9; the lead holds ~2.8x with rules applied. tokenov hits 10^9 candidates in minutes on CPU; OMEN takes hours; PassGPT needs days. Why: the tokenizer bakes in mixed-case, digit, and symbol primitives, so multi-class compliance is modal, not rare. "Michael99" is two tokens, not eight transitions. We release tokenov: train an n-gram model with any tokenizer, or use include custom GTP-2 tokenizer. Pipe into hashcat, JtR, or write to disk. Use OSINT derived lists to seed generation customized to the target. No GPU needed: 1B candidates in under 2 minutes on an i9. - Narayanan & Shmatikov, "Fast dictionary attacks on passwords using time-space tradeoff," CCS 2005. (Markov password modeling, original.) - Weir et al., "Password cracking using probabilistic context-free grammars," IEEE S&P 2009. (PCFG, the natural rival to Markov.) - Durmuth et al., "OMEN: Faster password guessing using an ordered Markov enumerator," ESSoS 2015. (The level-ordered enumerator we benchmark against.) - Melicher et al., "Fast, lean, and accurate: Modeling password guessability using neural networks," USENIX Security 2016. (FLA, the neural baseline.) - Hitaj et al., "PassGAN: A deep learning approach for password guessing," ACNS 2019. - Rando et al., "PassGPT: Password modeling and (guided) generation with LLMs," ESORICS 2023. (Closest prior work; uses GPT-2 fine-tuned on RockYou. We outperform it.) - Cracken (https://github.com/shmuelamar/cracken). The proximate inspiration; uses BPE for password masks. We extend the BPE idea from masks to full Markov generation. - MAYA benchmark (S&P 2026). The 19-corpus evaluation framework we adopted.

What you'll get from it

Password guessers built on Markov models usually work one letter at a time. Jon Gorenflo feeds the model whole word-like chunks from a text tokeniser instead. Those chunks capture name fragments and runs of digits and symbols that letter-level models miss, so it recovers noticeably more passwords, especially the long mixed ones password policies ask for, and it runs quickly on an ordinary processor. The tool is being released. Useful if you work on password strength or run password audits.

Did you find what you came for?