Skip to content

CodingChatRoom/john-cheatsheet-saqlain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

John the Ripper Advanced Usage Guide

This README provides detailed explanations with examples and use-cases for advanced John the Ripper (JtR) options.
By the end, you’ll have a complete handbook for mastering wordlist, rules, PRINCE, Markov, Subsets, Incremental, comparisons, and more.


👨‍💻 Author Introduction

Hello! I am Muhammad Saqlain Shoukat also known as Dark Wolf founder and developer of Coding Chat Room, a passionate learner and creator in the field of Cybersecurity, Programming, and DevSecOps.

🔹 My mission is to make complex technical concepts simple and easy so that students and professionals can learn without confusion.
🔹 On my platforms, I share tutorials, study notes, and practical tips about Linux, Ethical Hacking, Development, Programming and Cybersecurity.
🔹 I believe in learning by sharing — the more we teach, the more we grow.


🔑 Basic Syntax

john [options] [password-hash-file]

1. Wordlist Mode (--wordlist)

Use a dictionary file to try possible passwords.

Example:

john --wordlist=rockyou.txt password.txt

Use Case:

Useful when you already have a list of leaked or common passwords to try.


2. Rules (--rules)

Rules modify words from a wordlist (adding numbers, symbols, uppercase, etc).

Example:

john --wordlist=mylist.txt --rules password.txt

Use Case:

If your list has wolf, rules will also test Wolf123, wolf@, WOLF.


3. Custom Rule File (--rules=custom.rule)

You can create your own rules file.

custom.rule:

$@123

This appends @123 to every word.

Command:

john --wordlist=mylist.txt --rules=custom.rule password.txt

Use Case:

To generate company-specific password patterns like Password@2025.


4. PRINCE Mode (--prince)

PRINCE recombines words from your wordlist into new combinations.

Example:

john --prince=rockyou.txt password.txt

Use Case:

If your list has wolf and queen, PRINCE will try wolfqueen, queenwolf, wolfwolfqueen, etc.


5. PRINCE Options

  • --prince-limit=N → Limit generated candidates
  • --prince-elem-cnt-min=N → Minimum words per password
  • --prince-elem-cnt-max=N → Maximum words per password

Example:

john --prince=rockyou.txt --prince-elem-cnt-max=3 password.txt

Use Case:

Control complexity when targeting long but structured passwords like darkwolfqueen.


6. Markov Mode (--markov)

Markov chains generate passwords based on probability of character sequences.

Example:

john --markov password.txt

Use Case:

Prioritizes likely passwords (wolf123) instead of random ones (xq7&z9).


7. Markov Options

  • --markov=range → Defines complexity
  • --markov-threshold=N → Only test passwords above a probability threshold

Example:

john --markov=200 password.txt

Use Case:

Efficient for guessing natural-looking passwords instead of wasting time.


8. Subsets Mode (--subsets)

Tests all possible combinations of a given character set.

Example:

john --subsets=digits password.txt

Use Case:

Perfect for numeric-only passwords like PINs (1234, 9876).


9. Incremental Mode (--incremental)

The most powerful mode — brute force with patterns.

Example:

john --incremental=All password.txt

Use Case:

Exhaustive brute-force when all else fails.


10. Incremental Options

  • --incremental=Alpha → only letters
  • --incremental=Digits → only numbers
  • --incremental=All → all characters

Example:

john --incremental=Digits password.txt

Use Case:

To crack PINs or numeric-only passwords.


11. External Mode (--external)

Custom cracking rules with scripts.

Example:

john --external=filter_ascii password.txt

Use Case:

Apply custom filters (like forcing lowercase or skipping symbols).


12. Mask Mode (--mask)

Define patterns manually.

Example:

john --mask=?d?d?d?d password.txt

(?d = digit, so this tries all 4-digit PINs)

Use Case:

Targeted brute force when you know password format.


13. Hybrid Attacks

Combine wordlist + mask.

Example:

john --wordlist=mylist.txt --mask=?d?d password.txt

If wolf is in your list, it will try wolf12, wolf99.

Use Case:

When you know people append years or digits.


14. Comparisons (--show & --test)

  • --show → Show cracked passwords
  • --test → Benchmark performance

Example:

john --show password.txt
john --test

Use Case:

Check results and measure hash cracking speed.


15. Session Management

Pause/resume attacks.

Example:

john --session=myattack --wordlist=rockyou.txt password.txt
john --restore=myattack

Use Case:

Run long attacks without losing progress.


16. Pot File

JtR saves cracked hashes in a pot file (john.pot).

Example:

cat ~/.john/john.pot

Use Case:

To re-use already cracked hashes in future runs.


17. Cracking Specific Hashes

john --format=sha512crypt hash.txt

Use Case:

Faster cracking by targeting specific algorithms.


18. Benchmarking Algorithms

john --test --format=md5

Use Case:

See how fast your system cracks a specific algorithm.


19. Debugging Rules

john --wordlist=mylist.txt --rules --stdout | head

Use Case:

Preview transformed passwords before running full attack.


20. Examples of Use-Cases

  • Wi-Fi Cracking: Use wordlist + rules for WPA handshakes
  • CTFs: Use Markov to guess natural passwords
  • Company Audit: Custom rules like Company@2025
  • PINs: Use subsets or masks for 4-6 digit PINs
  • Exhaustive Attack: Incremental mode when nothing else works

⚡ Summary

  • Wordlist + Rules: Real-world common passwords
  • PRINCE: Recombination of words
  • Markov: Smart probability-based guesses
  • Subsets: Digits-only or limited set
  • Incremental: Full brute force
  • Mask: Custom patterns
  • Sessions: Save & restore progress

🎯 Pro Tip

Always start with wordlist + rules, then escalate to PRINCE/Markov, and use Incremental only as a last resort.


📚 More Learning & Connect with Me

If you found this helpful and want to learn more about hacking resources, cybersecurity, and coding, follow me here and Star this Resporatory:

💡 I share tutorials, tips, and resources to make learning cybersecurity and coding easier.
Don’t forget to subscribe & follow for more updates and Star this Resporatory 🚀

About

This README provides detailed explanations with examples and use-cases for advanced John the Ripper (JtR) options. By the end, you’ll have a complete handbook for mastering wordlist, rules, PRINCE, Markov, Subsets, Incremental, comparisons, and more.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors