2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Pythonハッシュ解析ツール

Last updated at Posted at 2025-06-13

主な機能

  • ユーザーが入力したハッシュの形式を判別
  • John the Ripperとrockyou.txtを使用してクラック

前提条件

  • Python 3.6+
  • John the Ripper (johnコマンドが使用可能なこと)
  • ワードリストを用意すること(デフォルトでは/usr/share/wordlists/rockyou.txt(.gz)を参照

使用方法

python3 hash_cracker.py

使用例

> python3 hash_cracker.py

Mode:
1: Analyze hash type
2: Analyze hash type and Crack it
> 2

Enter a hash:
> 5f4dcc3b5aa765d61d8327deb882cf99

[*] Cracking hash using format: raw-md5
==================================================
5f4dcc3b5aa765d61d8327deb882cf99:password
==================================================
[+] Password found: password

対応しているハッシュ形式

ハッシュ形式 判定正規表現 JohnのFormat名
MD5 32文字16進数 raw-md5
NTLM 32文字16進数 nt
SHA-1 40文字16進数 raw-sha1
SHA-256 64文字16進数 raw-sha256
SHA-512 128文字16進数 raw-sha512
MD5crypt $1$ で始まる形式 md5crypt
bcrypt $2a$$2b$ で始まる bcrypt
SHA-256crypt $5$ で始まる sha256crypt
SHA-512crypt $6$ で始まる sha512crypt
NetNTLMv1 : 区切りの32文字×2 netntlm
NetNTLMv2 : 区切りの3〜4項目(MS-CHAPv2) netntlmv2
Kerberos 5 TGS $krb5tgs$ で始まる krb5tgs

補足

rockyou.txt が .gz のままだと解凍を促します。

Please extract rockyou.txt.gz at /usr/share/wordlists/rockyou.txt.gz

GitHub

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?