XLSX および PPTX ファイルに対する繰り返し
このステップでは、office2john.py と John the Ripper が異なる Office ドキュメントタイプで同様に機能することを示すために、同じプロセスを XLSX (Excel) および PPTX (PowerPoint) ファイルに適用します。
まず、libreoffice-calc と libreoffice-impress をインストールします。
sudo apt install -y libreoffice-calc libreoffice-impress
パスワード保護された XLSX ファイルの作成:
- LibreOffice Calc を開きます。
libreoffice --calc &
- いくつかのテキストを入力します。例:「Spreadsheet data.」
- 「ファイル」->「名前を付けて保存...」に移動します。
/home/labex/project/ に移動します。
- ファイル名として
secret.xlsx を入力します。
- 「パスワードを付けて保存」にチェックを入れます。
- 「保存」をクリックします。
- パスワードを
password123 に設定し、確認します。
- 「OK」をクリックして LibreOffice Calc を閉じます。
XLSX からハッシュを抽出:
python3 /usr/share/john/office2john.py ~/project/secret.xlsx >> ~/project/hash.txt
パスワード保護された PPTX ファイルの作成:
- LibreOffice Impress を開きます。
libreoffice --impress &
- タイトルを追加します。例:「Presentation Title.」
- 「ファイル」->「名前を付けて保存...」に移動します。
/home/labex/project/ に移動します。
- ファイル名として
secret.pptx を入力します。
- 「パスワードを付けて保存」にチェックを入れます。
- 「保存」をクリックします。
- パスワードを
password123 に設定し、確認します。
- 「OK」をクリックして LibreOffice Impress を閉じます。
PPTX からハッシュを抽出:
python3 /usr/share/john/office2john.py ~/project/secret.pptx >> ~/project/hash.txt
すべてのハッシュをクラック:
次に、DOCX、XLSX、および PPTX のハッシュが含まれるようになった更新された hash.txt ファイルで John the Ripper を実行します。
john --wordlist=/usr/share/john/password.lst ~/project/hash.txt
Using default input encoding: UTF-8
Loaded 3 password hashes (Office, 2007/2010/2013/2016 [MD5/SHA1/SHA256/SHA512 RC4/AES])
Will run till all hashes are cracked, by default
Press 'q' or Ctrl-C to abort, almost any other key for status
password123 (secret.xlsx)
password123 (secret.pptx)
password123 (secret.docx)
3g 0:00:00:00 DONE (20XX-XX-XX XX:XX) 100.0g/s 100.0p/s 100.0c/s 100.0C/s password123
Session completed.
すべてのクラックされたパスワードを確認します。
john --show ~/project/hash.txt
secret.xlsx:password123
secret.pptx:password123
secret.docx:password123
3 password hashes cracked, 0 left