LoginSignup
2
5

John the Ripper使い方(zipファイルパスワード総当たり)

Posted at

zipファイルのパスワードを総当たりで解析

現在の状態

image.png

John the Ripperインストール

下記からインストール

赤枠で囲ったとこをクリック(1.9.0のwindows binaries zip)
image.png

インストールしたらデスクトップへ移動

名前をjohn-1.9.0-jumbo-1-win64からjohnに変更

パスワードを解析したいzipフォルダをjohn>runにコピー

今回はcredentials.zipでやる

image.png

Windowsのコマンドプロンプトを起動 (credentalsのとこは自分のzipフォルダ名に置き換えてね!)

コマンドプロンプトに以下のコマンドを入力

john>runに移動

john>runディレクトリに移動 ホームディレクトリにいる前提

cd ./desktop/john/run

ZIPフォルダのハッシュを定義

run内のzip2john.exeを実行
よくわからんけどzipのハッシュファイルができる

zip2john.exe credentials.zip >credentials.hash

実行結果
image.png

is not encrypted!と書いてあるがjohn>run内のファイルをみると

image.png

発見!
中は…

image.png

今回はPKZIP2というフォーマットが利用されている。
なんかそれっぽいのが入っとる

パスワードの解析(パスワードリストと比較)

run内に入っているpassword.listと比較する

john.exe --pot=credentials.pot --wordlist=password.lst credentials.hash

実行結果
image.png

何もわからないままDONEになってしまう。
password.listに該当するものがなかったっぽい?

パスワードの解析(辞書を使わず、総当たり)

今度はパスワードリストを使わず、すべてを総当たりで調べる

john.exe --pot=credentials.pot --incremental=ASCII credentials.hash

実行結果
image.png

実行結果が出るまでちょっと時間かかるよ
赤枠で囲った部分がzipフォルダのパスワードになる

パスワード入力!!!

zipを展開するからパスワードを入力

image.png

わーい!できた~~!!!
長かった…

参考にしたサイト3つ

2
5
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
5