how to use hashcat md5
|

Getting Started with Hashcat on Kali Linux (Installation guide)

Hashcat is an important tool to have in your toolbelt (at least on your computer ^^). I’ve already written several tutorials on how to use Hashcat, but today we’ll focus on the installation and first steps, especially on Kali Linux, which is often used for it.

On Kali Linux, Hashcat comes pre-installed with most versions, so you can use it right out of the box. If it’s not available on your system, it’s in the standard repository and can be installed using APT (the package manager).

If you are used to Linux, you know that it’s rarely that simple, so let’s take a look at each step to install hashcat on your computer.

Master Linux Commands
Your essential Linux handbook
Want to level up your Linux skills? Here is the perfect solution to become efficient on Linux. 20% off today!

Download now

How to install Hashcat on Kali Linux (main repository)

Here are a few prerequisites and checks you can do to see if Hashcat is installed, and install it if needed:

  • Keep your system up-to-date before anything else.
  • List the installed packages and look for hashcat.
  • Run a benchmark to make sure it’s working.
Master your cyber security skills:
Secure your spot in the Accelerator Program, with early access to exclusive resources.
Get 1000+ classes, unlimited mentorship, and more.

Let’s do this in this order.

Update your system

New updates are released on a daily basis. To avoid conflicts and make sure you’re installing the latest versions, it’s always a good idea to update your system first.

The easiest way to do this is simply to open a terminal and type the following commands:
sudo apt update
sudo apt upgrade

Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!

Press “Y” to confirm the upgrade of all the listed packages, and wait a few minutes to get them downloaded and installed on your computer.

If, like in my screenshot, you have a lot of new packages to upgrade, it’s probably a good idea to reboot your system before proceeding.
sudo reboot

Install Hashcat package

As mentioned earlier, in most cases, Hashcat is already installed on Kali Linux if you use a recent version with all the default applications.

Once your system up-to-date, you can use APT to do a search, and see if it’s installed:
apt search hashcat

In my case, the version available in the repository is the same as on the website directly. So, there is no need to install it manually at this point. At least, you should give it a try, and switch to the manual procedure I give later if you experience any issue doing this.

Anyway, if you don’t have the mention “installed” near the package name in the previous command, you can install the main package with:
sudo apt install hashcat

This should install all the dependencies (something like 60 other packages on a fresh Linux system).
Type your user password and press “Y” to confirm the installation.

Note: If you have an NVIDIA GPU on your computer, you should also install the corresponding package for better performances:
sudo apt install hashcat-nvidia

Use Hashcat on Kali Linux

Whether you installed it or it was already there, Hashcat is now available on your system.
You can use the command directly in a terminal:
hashcat

You can, for example, run a benchmark to make sure everything is working properly:
hashcat -b

I’m testing this on a virtual machine for you, which is not optimized at all, but you get the idea.

Your Go-To Linux Command Reference!
Download your exclusive free PDF containing the most useful Linux commands to elevate your skills!

If you get an error during this test, you probably need to install additional drivers for your GPU, or just use the CPU, which should work natively (but is generally slower).

As stated on the hashcat website, each GPU requires different prerequisites:

  • AMD GPUs on Linux require “AMDGPU” (21.50 or later) and “ROCm” (5.0 or later)
  • AMD GPUs on Windows require “AMD Adrenalin Edition” (Adrenalin 22.5.1 exactly)
  • Intel CPUs require “OpenCL Runtime for Intel Core and Intel Xeon Processors” (16.1.1 or later)
  • NVIDIA GPUs require “NVIDIA Driver” (440.64 or later) and “CUDA Toolkit” (9.0 or later)
Source: Hashcat

On Linux, it can be difficult to get them, as the vendors often do not support all Linux distributions. But you don’t necessarily need the latest version, so try to get them if possible.

Hide your IP address and location with a free VPN:
Try it for free now, with advanced security features.
2900+ servers in 65 countries. It's free. Forever.

From there, I recommend reading this article to learn how to use hashcat. I explain the different attack modes, and take an example with some MD5 hashes. But the idea is the same with any algorithm once you understand the basics.

Install Hashcat on Kali Linux (with the binaries files)

If for any reason you prefer to install Hashcat manually on Kali Linux, here is the procedure you can follow instead of using APT:

  • Go to the Hashcat website, and get the link to the binaries file.

    You can either download it directly from your web browser, or use the command line:
    wget https://hashcat.net/files/hashcat-6.2.6.7z
    Don’t forget to replace the file version with the latest one available on the website.
  • Extract the file from your file explorer (right-click on the downloaded file > extract here):

    Or do it from a terminal with:
    7z <filename>
    You may need to install 7zip first, with:
    sudo apt install p7zip-full
  • Then, open a terminal, and move to the new folder.
    Probably something like:
    cd Downloads/hashcat-6.2.6/
  • And run the hashcat benchmark with:
    ./hashcat.bin -b

At this point, you’ll likely get an error, as some CPU or GPU runtime will be missing:

The previous installation method with APT will do this for you, but in this case you have to install the missing requirements manually.

In my example, the easiest way to fix this was to use apt to install these two missing packages:
sudo apt install ocl-icd-libopencl1 pocl-opencl-icd
But the solution will be different if you have an NVIDIA or AMD GPU.
Check this page for more details for each scenario.

Anyway, I hope this tutorial was useful, and helped you to get started with Hashcat on Kali Linux.
You should now be ready to do cool things with this tool, check out my other tutorials for more details:

Whenever you’re ready for more security, here are things you should think about:

- Break free from Gmail: You should be able to choose what happens to your data. With Proton, only you can read your emails. Get private email.

- Protect yourself online: Use a high-speed Swiss VPN that safeguards your privacy. Open-source, no activity logs. Get Proton VPN risk-free.

- Master Linux commands: A sure method to learn (and remember) Linux commands. Useful ones only, one at a time, with clear explanations. Download the e-book.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *