"John the Ripper"는 비밀번호 해독 및 해시 크래킹을 위한 유명한 보안 도구 중 하나입니다. 이 도구는 다양한 해시 알고리즘 및 암호 형식을 해독하고 암호를 크래킹하는 데 사용됩니다. John the Ripper는 오픈 소스 소프트웨어로서, 다양한 운영 체제에서 사용할 수 있으며, 주로 보안 전문가, 해커, 시스템 관리자 및 보안 전문가들이 사용합니다.
사전파일로는 주로 rockyou.txt가 대표적임.
설치는 MAC기반으로 설명합니다.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install john
# 설치완료
Created directory: /Users/sangsoon.park/.john
John the Ripper password cracker, version 1.9.0
Copyright (c) 1996-2019 by Solar Designer
Homepage: http://www.openwall.com/john/
Usage: john [OPTIONS] [PASSWORD-FILES]
--single "single crack" mode
--wordlist=FILE --stdin wordlist mode, read words from FILE or stdin
--rules enable word mangling rules for wordlist mode
--incremental[=MODE] "incremental" mode [using section MODE]
--external=MODE external mode or word filter
--stdout[=LENGTH] just output candidate passwords [cut at LENGTH]
--restore[=NAME] restore an interrupted session [called NAME]
--session=NAME give a new session the NAME
--status[=NAME] print status of a session [called NAME]
--make-charset=FILE make a charset, FILE will be overwritten
--show show cracked passwords
--test[=TIME] run tests and benchmarks for TIME seconds each
--users=[-]LOGIN|UID[,..] [do not] load this (these) user(s) only
--groups=[-]GID[,..] load users [not] of this (these) group(s) only
--shells=[-]SHELL[,..] load users with[out] this (these) shell(s) only
--salts=[-]N load salts with[out] at least N passwords only
--save-memory=LEVEL enable memory saving, at LEVEL 1..3
--node=MIN[-MAX]/TOTAL this node's number range out of TOTAL count
--fork=N fork N processes
--format=NAME force hash type NAME: descrypt/bsdicrypt/md5crypt/
bcrypt/LM/AFS/tripcode/dummy
사전파일 설치(rockyou.txt)
https://github.com/brannondorsey/naive-hashcat/releases/download/data/rockyou.txt
패스워드 등 크랙을 위한 데이터를 특정 txt파일에 저장하여 실행하면됨.
john --wordlist=[ wordlist ][ hash file ]
패스워드 크랙 시도
예제 : secu.txt (2a$10SpKYdHLB0FOaT7n3x72wtuS0yR8uqqbNNpIPjUb2MZib3H9kVO8dm)
john --wordlist=../../wordlist/rockyou.txt secu.txt
Loaded 2 password hashes with 2 different salts (bcrypt [Blowfish 32/64 X3])
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:05 0% 0g/s 21.10p/s 42.21c/s 42.21C/s 555555..carolina
0g 0:00:00:10 0% 0g/s 21.09p/s 42.19c/s 42.19C/s harley..iloveyou1
속도가 느린건,,, 감당해야함. 만약 크랙에 성공하면 아래와 같이 표시됨
Loaded 2 password hashes with 2 different salts (bcrypt [Blowfish 32/64 X3])
Press 'q' or Ctrl-C to abort, almost any other key for status
0g 0:00:00:05 0% 0g/s 21.10p/s 42.21c/s 42.21C/s 555555..carolina
0g 0:00:00:10 0% 0g/s 21.09p/s 42.19c/s 42.19C/s harley..iloveyou1
0g 0:00:00:54 0% 0g/s 21.06p/s 42.13c/s 42.13C/s junjun..cheer
## 크랙성공
manchesterunited (?)