d4Rk's 1337 h4x0r guide
  • Introduction
  • Reconnaissance
    • Recon
    • OSINT
  • Enumeration
    • Network discovery
    • Port scanning
    • Webserver scanning
    • Exploit detection
    • Fuzzing
    • Process monitoring
  • Exploitation
    • Shells
      • Shells
      • TTY
    • Passwords
      • Hashcat
      • John the Ripper (JTR)
      • Hydra
      • Passwords & credentials
    • Web
      • SQL injection (SQLi)
      • Cross site scripting (XSS)
      • File inclusions (LFI, RFI)
      • Directory traversal
      • Cross site request forgery (CSRF)
      • XML external entity (XXE)
      • Cross origin resource sharing (CORS)
      • Server-side request forgery (SSRF)
      • Server-side template injection (SSTI)
      • Access control vulnerabilities
      • Authentication vulnerabilities
      • JWT attacks
      • File uploads
      • Host header attacks
      • Clickjacking
      • Logic flaws
      • OS command injection
      • HTTP Request smuggling
      • Insecure deserialization
      • DOM-based
      • WebSockets
      • Web cache poisoning
    • Buffer overflow
      • General
      • Linux
      • Windows
    • Misc
      • Evasion
      • SQSH
  • Privilege escalation
    • Linux
      • Overview
    • Windows
      • Overview
      • Mimikatz
      • PowerSploit
      • Juicy Potato, Rotten Potato (NG)
      • JAWS
      • Empire
      • SILENTTRINITY
  • Post exploitation
    • Loot
    • Pivoting
    • Standalone Tools
  • Services
    • TCP
      • TCP 21: FTP
      • TCP 22: SSH
      • TCP 23: Telnet
      • TCP 25, 587: SMTP
      • TCP 53: DNS
      • TCP 80, 443: HTTP(S)
      • TCP 88: Kerberos
      • TCP 110, 995: POP3(S)
      • TCP 111: rpcbind
      • TCP 135: MSRPC
      • TCP 139, 445: NetBIOS, SMB
      • TCP 143, 993: IMAP(S)
      • TCP 389, 636, 3268, 3269: LDAP
      • TCP 1433, UDP 1434: MSSQL Server
      • TCP 2049: NFS
      • TCP 3306: MySQL
      • TCP 3389: RDP
      • TCP 5985: WinRM
      • TCP 6379: Redis
      • TCP 27017: MongoDB
    • UDP
      • UDP 137, 138, TCP 139: NetBIOS
      • UDP 161: SNMP
    • Misc
      • Active Directoy
      • Apache Tomcat
      • Drupal
      • H2 Databases
      • IIS
      • IPsec
      • IRC
      • Java Applets
      • Java RMI
      • Jenkins
      • Joomla
      • Oracle
      • PHP
      • SharePoint
      • WordPress
  • File transfer
    • Overview
    • Wget
    • Pure-FTPd
    • TFTP
    • VBScript: Wget clone
  • Misc
    • Bash
    • Burp Suite
    • Crypto
    • Ebowla
    • Firefox extensions
    • Impacket
    • Memory forensics
    • Metasploit Framework (MSF)
    • MITM
    • Msfvenom
    • Pass the Hash (PTH)
    • PowerShell
    • PowerShell on Linux
    • Wireshark
    • Wordlists and dictionaries
  • Bug Bounty
    • Platforms
    • Tools
Powered by GitBook
On this page
  • Mutations
  • Hash attacks
  • Single Crack Mode
  • Rules
  • Archives
  • KeePass
  • SSH key encryption (passphrase)
  • unshadow
Edit on GitHub
  1. Exploitation
  2. Passwords

John the Ripper (JTR)

PreviousHashcatNextHydra

Last updated 3 years ago

John the Ripper is a free password cracking software tool. Originally developed for the Unix operating system, it can run on fifteen different platforms.

Mutations

Config file

/etc/john/john.conf

Modify the config file

# Add two numbers to the end of each password
$[0-9]$[0-9]
john --wordlist=megacorp-cewl.txt --rules --stdout > mutated.txt

Hash attacks

Brute force (all)

john <file-with-hashes>

Using wordlist

john --wordlist=/usr/share/wordlists/rockyou.txt <file-with-hashes>

Single Crack Mode

John will create it's own dictionary list based on additional information provided (e.g. username).

Fileformat (Gecos)

username:password
john --single <file-with-hashes>

Rules

Applying rules Word mangling rules are used to modify or "mangle" words producing other likely passwords

john --rules --wordlist=/usr/share/wordlists/rockyou.txt <file-with-hashes>
cAz "19[0-9][0-9]"
Az "19[0-9][0-9]"

Archives

Zip

zip2john <archive.zip> > archive-hash.txt

7z

/usr/share/john/7z2john.pl <archive.7z> > archive-hash.txt

Rar

rar2john <archive.rar> > archive-hash.txt

KeePass

Grab password hash

keepass2john <kdbx-file>

Grab keyfile hash

keepass2john -k <key-file> <kdbx-file>

SSH key encryption (passphrase)

ssh2john <keyfile> > <output>

In Kali:

/usr/share/john/ssh2john.py
./sshng2john.py <keyfile> > <output>

Crack it

john --wordlist=/usr/share/wordlists/rockyou.txt <output>

unshadow

Using /etc/passwd and /etc/shadow to gain password hashes and then crack them via john.

unshadow <passwd-file> <shadow-file> > passwords.txt
john passwords.txt

used a variety of custom rules to generate the passwords.

Convert to john readable format

GitHub - magnumripper/JohnTheRipper
Openwall
KoreLogic John the Ripper Rules
hashstack-server-plugin-jtr/sshng2john.py at master · stricture/hashstack-server-plugin-jtr · GitHub