日々のいろいろ

John the ripper をWSL2(Ubuntu)インストール

投稿日: 2025/7/16

参考

https://github.com/openwall/john/blob/bleeding-jumbo/doc/INSTALL-UBUNTU

環境

Ubuntu 24.04.1 LTS (GNU/Linux 5.15.167.4-microsoft-standard-WSL2 x86_64)

必要なツールをインストール

mkdir -p ~/src

sudo apt-get -y install git build-essential libssl-dev zlib1g-dev

sudo apt-get -y install yasm pkg-config libgmp-dev libpcap-dev libbz2-dev

下記によると搭載しているGPUによっては最適なインストールができるのですが、UbuntuであれどWSL2は特殊というかそもそもインストールマニュアルにも記載がないので通常のCPU使用のインストール方法を採用します。

==== If you have NVIDIA GPU(s) (OpenCL support)

    sudo apt-get -y install nvidia-opencl-dev

    The above should be sufficient to build JtR with OpenCL support, but to
    actually use it you also need to install CUDA along with the proprietary
    NVIDIA driver (a suitable revision of which is bundled with CUDA), see:

    https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

==== If you have AMD GPU(s) (OpenCL support)

    sudo apt-get -y install ocl-icd-opencl-dev opencl-headers

    The above should be sufficient to build JtR with OpenCL support, but to
    actually use it you also need to install one of the proprietary drivers:

    - If you have a recent GPU card and Ubuntu Xenial 16.04 LTS or above,
      the amdgpu-pro graphics stack should be used:

      https://www.amd.com/en/support/kb/release-notes/rn-radpro-lin-16-40#faq-AMD-Product-Compatibility
      https://www.amd.com/en/support/kb/release-notes/AMDGPU-INSTALLATION

    - If you have an older GPU card and Ubuntu up to and including 15.10,
      the old fglrx driver should be used:

      sudo apt-get -y install ocl-icd-opencl-dev opencl-headers fglrx-dev

==== If you (also) want a CPU device for OpenCL (OpenCL support)

    sudo apt-get -y install ocl-icd-opencl-dev opencl-headers pocl-opencl-icd

    We don't recommend using CPUs via OpenCL since JtR is usually far more

    efficient at using them directly, but you do have this weird option.
    Instead of or in addition to POCL, you may (also) install Intel's
    proprietary OpenCL runtime, which is generally more reliable and faster.

クローンとビルド

cd ~/src

git clone https://github.com/openwall/john -b bleeding-jumbo john

cd ~/src/john/src

./configure && make -s clean && make -sj4

テスト

cd ~/src/john/run

./john --test=0

ベンチマークテスト

./john --test

コメント

0

まだコメントがありません

コメントするMarkdown不要
0 / 1500 文字