Introduction
In this lab, you will explore how to optimize the performance of hashcat, a powerful password recovery tool, using its workload profiles. The workload profile setting allows you to fine-tune hashcat's resource consumption, striking a balance between raw cracking speed and overall system responsiveness. This is crucial when you need to perform a long-running cracking task on a machine that is also used for other activities.
You will learn to:
- Understand the different workload profiles available in
hashcat. - Establish a baseline performance benchmark.
- Test and compare the "Low Power" and "High Performance" profiles.
- Apply this knowledge to a practical cracking scenario.
Understand the Purpose of Workload Profiles with -w
In this step, you will learn about the -w (or --workload-profile) option in hashcat. This option controls the internal workload management of hashcat, affecting how much stress it puts on your CPU and GPU.
There are four main profiles:
-w 1(Low Power): Minimizes resource usage. The system remains very responsive, but cracking speed is significantly reduced. Ideal for running in the background on a workstation.-w 2(Default): A balanced profile that offers good performance while keeping the system reasonably usable.-w 3(High Performance): Maximizes cracking speed by using more system resources. The system may become sluggish.-w 4(Nightmare): For dedicated, highly-tuned cracking rigs. It pushes hardware to its absolute limits and may cause system instability or crashes on standard machines.
Let's start by viewing the help information for this specific option. This is a good practice to understand any command-line tool's features.
Execute the following command in your terminal to find the description of the workload profile option in hashcat's help menu:
hashcat --help | grep "workload-profile"
You should see output that describes the -w option and its available levels.
-w, --workload-profile | ## | Enable a specific workload profile. See below. | -w 3
Workload Profiles:
==================
## | Profile | Performance | Memory | Unattended | Base Tuning
-+-----------+-------------+--------+------------+-------------
1 | Low-Power | 10 % | 1/4 | No | -n 1 -u 1024
2 | Default | 90 % | 1/2 | No | -n 8 -u 256
3 | High-Perf | 100 % | Full | No | -n 64 -u 64
4 | Nightmare | 100 % | Full | Yes | -n 512 -u 32
This confirms the different profiles and gives a hint about their impact on performance and system tuning.
Run a Benchmark to Establish a Baseline
In this step, you will establish a performance baseline. A baseline is a standard measurement that you can use as a reference point for comparison. We will run hashcat's built-in benchmark mode with its default settings (equivalent to -w 2).
The benchmark mode (-b) allows hashcat to measure its performance on various hashing algorithms without needing any input hash files. We will specifically test the MD5 algorithm, which is designated by the mode number 0 (-m 0).
Run the following command to start the benchmark for MD5:
hashcat -b -m 0
hashcat will start and test the performance of your system for the MD5 hash type. Pay close attention to the output. After a few moments, it will display a table of results. You are interested in the Speed column.
hashcat (v6.2.6) starting in benchmark mode
...
Hashtype: 0 - MD5
Speed.#1.........: 299.4 MH/s (46.38ms) @ Accel:128 Loops:256 Thr:64 Vec:1
...
Note: The speed you see (e.g., 299.4 MH/s) will vary depending on the virtual machine's resources. The important thing is to make a mental note of this number. This is your baseline performance with the default workload profile.
Test the Low Power Profile with -w 1
In this step, you will test the "Low Power" workload profile. As the name suggests, this profile is designed to be gentle on your system's resources. It's the ideal choice when you need to run hashcat for an extended period without impacting your ability to use the computer for other tasks.
We will run the same benchmark as in the previous step, but this time we will add the -w 1 flag to explicitly select the low power profile.
Execute the following command:
hashcat -b -m 0 -w 1
Once again, hashcat will run its benchmark for the MD5 algorithm. Observe the output and find the Speed value.
hashcat (v6.2.6) starting in benchmark mode
...
Hashtype: 0 - MD5
Speed.#1.........: 37.8 MH/s (48.13ms) @ Accel:1 Loops:1024 Thr:1 Vec:1
...
Compare this new speed with the baseline you recorded in Step 2. You should notice that the speed is significantly lower. This demonstrates the trade-off: you sacrifice raw performance for better system responsiveness.
Test the High Performance Profile with -w 3
In this step, you will test the "High Performance" workload profile. This profile does the opposite of the low power one: it instructs hashcat to use as many system resources as possible to achieve the maximum cracking speed. This is the profile you would use on a dedicated machine where performance is the only priority.
Let's run the benchmark again, this time using the -w 3 flag.
Execute the command below:
hashcat -b -m 0 -w 3
hashcat will perform the MD5 benchmark using the high-performance settings. Check the Speed value in the output.
hashcat (v6.2.6) starting in benchmark mode
...
Hashtype: 0 - MD5
Speed.#1.........: 315.1 MH/s (43.80ms) @ Accel:64 Loops:64 Thr:64 Vec:1
...
Compare this speed to both the baseline (Step 2) and the low power result (Step 3). You should see that this is the fastest speed yet, likely even faster than the default profile. This confirms that -w 3 successfully prioritizes speed over system responsiveness.
Compare Performance and System Responsiveness
In this final step, you will consolidate your findings and apply them to a practical (though simple) cracking task.
So far, you have observed the following relationship:
- Speed (
-w 1) < Speed (Default) < Speed (-w 3)
This clearly illustrates the trade-off managed by the workload profiles. Now, let's use the high-performance profile to crack the sample hash that was prepared for you at the beginning of the lab. The ~/project directory contains a hash file sample.hash and a dictionary file wordlist.txt.
We will use the following command:
-m 0: Specifies the MD5 hash type.-a 0: Selects a straight dictionary attack.sample.hash: The file containing the hash to crack.wordlist.txt: The file containing potential passwords.-w 3: The high-performance profile to get the result as quickly as possible.
Run the command to start the cracking process:
hashcat -m 0 -a 0 sample.hash wordlist.txt -w 3
Because the password is in our small wordlist, hashcat will find it almost instantly. The output will show the cracked hash and the corresponding password.
...
Dictionary cache built:
* Filename..: wordlist.txt
* Passwords.: 4
* Bytes.....: 29
* Keyspace..: 4
81d38d4b393528b4c444097c69141559:labex
Session..........: hashcat
Status...........: Cracked
Hash.Name........: MD5
Hash.Target......: 81d38d4b393528b4c444097c69141559
Time.Started.....: ...
Time.Estimated...: 0 secs
Guess.Base.......: File (wordlist.txt)
Guess.Queue......: 1/1 (100.00%)
Speed.#1.........: 268.2 MH/s (0.01ms) @ Accel:64 Loops:64 Thr:64 Vec:1
Recovered........: 1/1 (100.00%) Digests
Progress.........: 4/4 (100.00%)
Rejected.........: 0/4 (0.00%)
Restore.Point....: 3/4 (75.00%)
Restore.Sub.#1...: Salt:0 Amplifier:0-1 Iteration:0-1
Candidates.#1....: 123456 -> labex
Hardware.Mon.#1..: Temp: 48c Util: 98% Core:1800MHz Mem:3500MHz Bus:16
Started: ...
Stopped: ...
The key line is 81d38d4b393528b4c444097c69141559:labex, which shows the original hash followed by the recovered password, labex. You have successfully used a workload profile to optimize a cracking task.
Summary
Congratulations on completing this lab! You have successfully learned how to use hashcat's workload profiles to manage performance and system resources.
In this lab, you:
- Learned the purpose of the
-woption and its different profiles (-w 1,-w 2,-w 3). - Used the benchmark mode (
-b) to establish a baseline and measure performance under different profiles. - Observed the direct trade-off between cracking speed and system responsiveness.
- Applied the high-performance profile to a practical password cracking task.
Understanding how to tune your tools is a key skill for any technical professional. You can now apply this knowledge to choose the appropriate hashcat settings for any situation, whether you need maximum speed on a dedicated machine or a quiet background task on your personal workstation.


