Experience sharing of hashcat using GPU acceleration to improve d

2024-12-24 20:19:23

After some attempts, I have recorded some of my experiences as follows.

First of all, we know that GUP accelerates in hashcat, and two conditions need to be met: 1. a graphics card (GPU) that can be accelerated, and 2. a cuda installed.

My computer win10 system, n card 3060

1. Summary of failures

At first, I wanted to do hashcat acceleration in Kali Linux, but the graphics card in the virtual machine is algorithmically generated and cannot be used for acceleration. When I saw that the N card can be directly connected to the virtual machine, I looked around with hope, but I did not find a suitable KALI Linux graphics card through tutorial, and only the Linux host on the Internet can directly access the Windows virtual machine, which is the opposite of what I want to go through from the Windows system to Linux, so I have no suitable way to complete this step. And even if it's done, you have to switch the graphics card back and forth, and I mainly use the win10 system, if you have the ability, you can write a program to switch the graphics card, but it's not suitable for me at the moment, it's over, I hope this step can be improved in the future.

2. Host compromise

Therefore, I chose to complete the hashcat acceleration on the host, and the default graphics card of the host is 3060, so as long as cuda and hashcat are installed, the GPU acceleration can be used normally. CUDA download and install directly, you can install it in the next step (link), hashcat should pay attention to it slightly, hashcat recommends downloading the official website binary file (link) directly, you can use it by unzipping, note that hashcat is a command-line application, double-click to open hashcat.exe will flashback, to use the command line to open in the system terminal cmd.

3. Avoidable problems

(msys2 install hashcat issue: CUDA SDK toolkit not installed or incorrectly installed)

I have some issues with the hashcat installed using the installation instructions on github (CUDA SDK toolkit not installed or incorrectly installed).

This problem can be seen that CUDA cannot be detected, but CUDA I have installed, because CUDA was not found, the system defaulted the API to OpenCL, I personally don't know where the problem is, I visited some English websites, tried some operations, but it didn't work, and gave up. But at the same time, because I downloaded the binary hashcat, I tried it, but it worked, I don't know why.

The hashcat installed with msys2 above will have the same problem in both the msys2 shell and the system shell

Opening the binary hashcat for direct download with the system shell does not have this problem

The API automatically detects the CUDA and does not report an error.

Fourth, the summary of hashcat

Through hashcat -b, we can know the speed of hashcat hitting various hashes, some are fast, some are not fast, different types of hashes, the difference in the number of hashes per second is very large. By comparing with and without GPU acceleration, hashcat is 60 times faster than non-GPU acceleration.

Previous:Hashcat tutorial on cracking mode parameter settings
Next:Hashcat claims to be the world's fastest password cracking tool.