Hashcat brain "too many clients"
#1
Hi all,

Looking for some advice, i have 4 machines and 5 instances of hashcat doing mask attacks on a hash all started with:
--brain-client --brain-password <password> --brain-client-features 2 --brain-host <host.ip>

They send the attack info back to hashcat brain server running on a single The-Distribution-Which-Does-Not-Handle-OpenCL-Well (Kali) linux machine on the local network.  It works fine for a week or so then one of the hashcat instances will start spitting out

"brain_recv: Bad file descriptor"

and on the brain

" -1 Too many clients".

I checkpoint/kill the offending instance and the brain shows ~30 disconnect messages and keeps happily sending and receiving from the others

The brain machine isn't the best speced, x86. 8 gb of ram,  AMD 4300 Quad-Core. 

The hashing machines vary from GTX2080 ti's, to GTX 970's. 

I'm leaning towards some form of networking problem with the "Bad file descriptor" message.  My next step is to packet capture the traffic next time it happens to see what is going on there.

But if anyone has seen this before and can save me some time i'm open to all advice.

Cheers.
Reply
#2
Interesting - haven't seen this myself yet. How fast is the hash?
~
Reply
#3
9400, the fastest I see is about 280 Kh/s
Reply
#4
Managed to chase it down with some logging and simplification.

In short if the machine you are running the brain server on runs out of available memory and you have a slow swap drive it will start throwing these errors.

By making more memory available the issue has gone (and can be reproduced by removing the extra ram again).
Reply
#5
Resource limitations was hiding the real issue.

Hashcat running in brain client mode is not closing off the brain connections until the whole mask file is processed when running on the windows 10 command line.

Work around using powershell

Set-Location -Path '<hashcat folder path>'
$file_data = Get-Content <mask file path>
foreach($line in [System.IO.File]::ReadLines("<mask file path>"))
{
.\hashcat.exe -m 9400 hash.txt -a 3 $line -O -w 3 -S --opencl-device-types 1,2 -O -z --brain-client-feature 2 --brain-password password --brain-host <brain ip addr>
$lines = [System.IO.File]::ReadAllLines("<mask file path>").length
Write-Host $i "/" $lines
$i = $i+1
}
Read-Host -Prompt "Press Enter to exit"
Reply