Setting up John the Ripper (JtR) to hash RAR files on Ubuntu 22.04 LTS
John the Ripper (JtR) is a popular open-source password cracking tool that is used to test the strength of passwords. In this article, we will show you how to set up JtR to hash RAR files on Ubuntu 22.04 LTS, which has been installed via the snap run command.
Installing JtR on Ubuntu 22.04 LTS
To install JtR on Ubuntu 22.04 LTS, you can use the following command:
sudo apt-get install johnOnce JtR is installed, you can verify the installation by running the following command:
john --versionSetting up RAR support in JtR
To set up RAR support in JtR, you need to download the RAR format module for JtR. You can download it from the following link:
https://github.com/magnumripper/JohnTheRipper/blob/bleeding-jumbo/src/external/rar/john-rar.cOnce you have downloaded the module, you can compile it by running the following command:
gcc -c john-rar.cAfter compiling the module, you can copy it to the JtR plugins directory by running the following command:
sudo cp john-rar.o /usr/local/lib/john/john.externalSetting up an alias for RAR hashes
To make it easier to use JtR with RAR files, you can set up an alias for RAR hashes. To do this, you can add the following line to your ~/.bashrc file:
alias john2rar='rar p -p- -g hashes | john --stdin --format=rar'This alias will allow you to run JtR on RAR files by using the john2rar command, followed by the name of the RAR file. For example:
john2rar myfile.rarVerifying the setup
To verify that JtR is set up correctly to hash RAR files, you can create a test RAR file with a known password. For example:
rar a test.rar test testOnce the RAR file is created, you can generate a hash for it by running the following command:
rar p -p- -g hashes test.rarThe output of this command should be similar to the following:
Yes.rar:$RAR3$*1*cf58ea337ee6642c*This hash can then be used with JtR to crack the password. For example:
john --format=rar hashes- JtR is a popular open-source password cracking tool.
- To set up JtR to hash RAR files on Ubuntu 22.04 LTS, you need to install JtR and download the RAR format module.
- After downloading the module, you need to compile it and copy it to the JtR plugins directory.
- To make it easier to use JtR with RAR files, you can set up an alias for RAR hashes.
- Once JtR is set up correctly, you can verify it by creating a test RAR file with a known password and generating a hash for it.