downside os speeding up hashcat with VirtualBox
#1
Some months ago I realized that hashcat runs faster if an VirtualBox machine is running at the same time on the host. I do not mean running hashcat in a VM. The VM runs on the same host as hashcat itself. So different tests were done with different hashes/containers and it was true all the time, with hashcat 3.6.0 and 4.1.0 and different version of VirtualBox. It is not necessary that there is a real guest in the VM, an empty VM will do the trick either. Of cause I asked other people to verify it, too. Just be realistic, increasing the number of tasks for the same resources should speed things up? That sounds crazy. Thus I thought I did something wrong. Other people, different hardware, Windows 7 and Windows 10, it worked everywhere. No tests were done for linux or another VM software.

To make it more clear I did some tests to post them here. Because of the rules there will be no hash, although they where created in bash with:
Code:
echo -n "..." | [md5|sha256|sha512]sum

As you can see the tests where done for md5, sha256 and sha512. The mask for the search were chosen in a way that hashcat runs minutes before finding the right word. hashcat 4.1.0 was used and it was tested without any additional option -- represented as "()" -- and with "-O -w 4".
Here are the results:
Code:
time      | ()             | () with VM     | -O -w4         | -O -w4 with VM
----------|----------------|----------------|----------------|----------------
md4       | 3:55 (235 s)   | 2:32 (152 s)   | 1:02 ( 62 s)   | 0:59 ( 59 s)   
sha256    | 4:56 (296 s)   | 4:33 (273 s)   | 4:23 (263 s)   | 4:06 (246 s)   
sha512    | 8:16 (496 s)   | 8:16 (496 s)   | 4:55 (295 s)   | 4:33 (273 s)   

speed     | ()             | () with VM     | -O -w4         | -O -w4 with VM
----------|----------------|----------------|----------------|----------------
md4       |  2679.7 MH/s   |  4158.9 MH/s   | 10627.0 MH/s   | 11369.7 MH/s   
sha256    | 54614.4 kH/s   | 60334.3 kH/s   | 65521.1 kH/s   | 67639.4 kH/s   
sha512    | 32861.6 kH/s   | 32919.5 kH/s   | 54614.5 kH/s   | 60846.9 kH/s   

As you can see the speed up is nothing constant, it depends on the used algorithm and configuration (e.g. number of iterations). In most cases (I seen) the difference between "-O -w 4" with and without VM is about 0-10%, mostly around 3-5%. Up to now I never saw a real slowdown higher than normal fluctuation. Without the optimization the difference between with and without VM is about 0-100%.
Maybe it is worth to mention that I also saw one example with higher values -- the "Util" value of hashcat was around 13%/49% without and 93%/97% with VM and if I remember correctly "() with VM" was faster than "-O -w4". But this was a spike I only see in one test.


Now to my question.
What are the downsides of speeding up hashcat with an (empty) VirtualBox machine?

In most cases with a running VM, hashcat seems to use the gpu more efficient and the the average "Util" value is higher. Of course the higher usage consumes more energy and the gpus getting hotter. Thus you can may run into thermal problems, especially if you use more than one gpu. Additionally you need a better power supply and running it for an hour costs more money.
This is all clear. But you don't get anything for nothing. I cannot belief that there aren't more disadvantages. In every test hashcat found the password with VM, but only faster. But maybe I never run a test where hashcat would not find the password as a result of calculation errors. I do not know. Thus I ask here.

I searched on the internet an on this forum but I found nothing about this phenomenon, mostly was about running hashcat in VirtualBox.

Thank you for your replays in advanced.


Messages In This Thread
downside os speeding up hashcat with VirtualBox - by BotPass - 05-13-2018, 06:09 PM