Password Cracking with hashcat

hashcatを使ったパスワードのクラッキング

2026/4/21

Tags: Security , CTF


Install via Homebrew

brew install hashcat

Basic Syntax

hashcat -m [hash-type] -a [attack-mode] [hash-file] [wordlist/mask]

Hash Types (-m)

ValueType
0MD5
100SHA1
1800SHA-512 (Unix)
3200bcrypt
1000NTLM (Windows)

Attack Modes (-a)

Run hashcat --help for the full list.

ValueMode
0Dictionary attack
1Combination attack
3Brute-force (mask attack)
6Wordlist + mask
7Mask + wordlist (reverse of mode 6)
9Association

Dictionary Attack (MD5)

hashcat -m 0 -a 0 hashes.txt wordlist.txt

You can also replace hashes.txt with the raw hash value directly.

Hybrid Attack

hashcat -a 6 -m 0 13445cbc17a1400afce3589e9a969264 rockyou.txt "@?d?d?d"

This combines the rockyou.txt wordlist with a mask that appends @ followed by three digits. In this example, the target password was xxterrixx@420.

hashcatをbrewでインストール

brew install hashcat

基本的な構文

hashcat -m [ハッシュタイプ] -a [攻撃モード] [ハッシュファイル] [辞書/マスク]

-m(ハッシュタイプ)の主な値

コマンド種類
0MD5
100SHA1
1800SHA-512(Unix)
3200bcrypt
1000NTLM(Windows)

-a(攻撃モード)の主な値

hashcat --help より参照。

コマンド種類
0辞書攻撃
1組み合わせ攻撃
3ブルートフォース(マスク攻撃)
6ワードリスト+マスク
7マスク+ワードリスト(6と逆順で試す)
9Association

辞書攻撃(MD5)

hashcat -m 0 -a 0 hashes.txt wordlist.txt

hashes.txt の部分はそのままハッシュ値に置き換えても良い。

ハイブリッドアタック

hashcat -a 6 -m 0 13445cbc17a1400afce3589e9a969264 rockyou.txt "@?d?d?d"

rockyou.txt の辞書に加えて、@????d は任意の数字)を試すマスクを追加している。今回の例では xxterrixx@420 というパスワードを解読した。

← Back to blog ← 記事一覧へ