Overview of Password Cracking Techniques

Sep 2, 2024

Password Cracking Overview

Penetration Testing and Password Cracking

  • Common tasks include cracking various types of passwords (login, file, etc.)

John the Ripper (JnR)

  • A well-known password cracking tool for Windows, Unix, and Mac systems.
  • Features:
    • Automatically detects encryption types for common formats.
    • Saves time in finding the right tool to crack specific hashes.
    • Utilizes a dictionary-based approach.
  • Common Password List:
    • Rockyou.txt is frequently used.
    • JnR includes its own word lists with thousands of common passwords.

Modes of Operation

  1. Single Crack Mode
    • Generates variations of a given string to create potential passwords.
    • Example: Variations like 'Top Gun', 'top gun123', etc.
  2. Wordlist Mode
    • Requires a list of passwords from which JnR generates hashes.
    • Effective for common/easily guessable passwords.
  3. Incremental Mode
    • Most powerful but time-consuming.
    • Tests all possible character combinations.
    • Use as a last resort for long/complex passwords.

Hash Types and Cracking Examples

  • Windows Passwords:
    • Stored in the SAM database using LM/NLM hash format.
    • Command example: john --format=LM wind.txt
  • Linux Passwords:
    • Stored in /etc/passwd and /etc/shadow.
    • Use the unshadow command to combine files into one for JnR to process.
    • Example output file: output.DB
  • ZIP File Passwords:
    • Use the zip2john utility to extract password hash from ZIP files.
    • Followed by cracking with JnR.

Best Practices for Password Security

  • Use strong, long, and complex passwords.
  • Avoid password reuse across multiple sites.
  • Utilize a password manager to generate/store passwords securely.

Conclusion

  • Use John the Ripper responsibly to enhance security and protect against password attacks.
  • Support causes like raising funds for children with cancer.