how to use hashcat md5

How To Install Hashcat On Ubuntu In 2024

Hashcat is an important tool to have in your tool belt (on your computer at least ^^). I already wrote several tutorials on how to use Hashcat, but today we’ll stay focus on the installation, especially on a Linux distribution like Ubuntu.

The easiest way to install Hashcat on Ubuntu is to use the package manager (APT), as Hashcat is now available in the default repositories. The installation command would be: sudo apt install hashcat.

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

Install Hashcat on Ubuntu via APT

Start by updating your system

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.

New updates are released every day on Ubuntu, and to avoid conflicts, it’s always a good idea to start by updating your system, to make sure you are using the latest version available for each package.

You can either use the “Ubuntu Software” app, or simply open a terminal and type the following commands:
sudo apt update
sudo apt upgrade

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.

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

If, like on my screenshot, you have plenty of new packages to be upgraded, it’s probably a good idea to restart your system before going further.
sudo reboot

Install hashcat

Once your system up-to-date, you can simply install Hashcat with apt.
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, for now, just install the main package with:
sudo apt install hashcat

This should install all the dependencies (something like 60 other packages on a fresh Ubuntu installation).
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 Ubuntu

Hashcat is now installed on your Ubuntu system. You can use the command directly in a terminal:

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

I’m testing this procedure on a virtual machine for you, which is not optimized at all, but you get the idea. If you get any error doing this test, you probably need to install additional drivers for your GPU, or just use the CPU which should work natively (it’s generally slower though).

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

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

AMD GPUs on Linux require “RadeonOpenCompute (ROCm)” Software Platform (3.1 or later)
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 Ubuntu, it should be a problem as you can easily get them. It might be more difficult on Debian or other systems, as the manufacturers are often not supporting all Linux distributions.

From there, I recommend reading this article to learn how to use hashcat on Ubuntu (or any other system). 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.

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.

Install Hashcat on Ubuntu with the binaries files

If for any reason you prefer to install Hashcat manually on Ubuntu, 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:
    Don’t forget to change the file version with the latest one available on the website.
  • Extract the file from your file explorer (right-click > 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.5/
  • 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 case, the easiest way to fix this was to use apt to install these two 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 Ubuntu.
You should now be ready to experiment cool things with this tool, check 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 *