If you don’t know how to run hashcat on Windows Subsystem for Linux, meaning that you want to use the Linux bash command line interpreter directly on your Windows desktop, there is a possibility to get the full potential out of hashcat and the OpenCL acceleration of your GPU (nVidia, AMD) .
This tutorial assumes that you already have the Windows Subsystem for Linux installed on your Windows 10 system.
If you don’t have it, just do the following:
- Click the Windows 10 start button
- Search for “turn Windows features on or off”. Open it.
- Locate “Windows subsytem for Linux”. Check it.
- Click, OK/Apply
- Go to the Windows Store and search for Ubuntu, Kali Linux or any other Linux distro you find there.
- Install it!
- You are ready to continue.
Now, truth be told, there are simpler ways to run hashcat: directly on a Linux or Windows host.
So, if you just like to over-complicate things or you need something to work on (like me), just follow along.
The first step that I did, as any normal Linux user would, I installed hashcat and the nVidia drivers directly from the bash shell:
sudo apt install hashcat nvidia-384
The installation went smoothly, but hashcat would not recognize the GPU and this was not acceptable to me because the GPU (GTX 1060 M) is 10 times faster than my Intel i9 CPU.
So what I ended up doing was to download the latest hashcat release directly to my Windows Desktop. Unpack the archive (using 7zip).
And now comes the weird part. Did you know that the Windows Subsystem for Linux can run Windows binaries out of the box? I didn’t. Until now.
So what I ended up doing was to run the Windows hashcat binary directly from bash. Confusing, isn’t it?
Here’s me navigating to the Windows hashcat binary folder and running the crack session:
./hashcat64.exe -a 0 -m 5100 C:/Users/nixware/Desktop/hashcat-5.1.0/test.hash d:/wordlists/wordlist.txt -w 3 --status
As you can see, you will find your C: or D: drives in /mnt directory of the Windows Subsystem for Linux.
As for the cracking speed of the GPU via the subsytem and bash, I can confirm that there is no difference between running directly on a Linux/Windows guest system and the Windows Subsystem for Linux.
If you receive an “Token length exception” error, please check this article.
And that is it. Happy cracking session