hashtopolis / server

Hashtopolis - distributed password cracking with Hashcat
GNU General Public License v3.0
1.42k stars 212 forks source link

[BUG]: Running Health Check fails on Windows 11 agent #1019

Open Doridian opened 10 months ago

Doridian commented 10 months ago

Version Information

backend 0.14.1, agent 0.7.1.2

Hashcat

6.2.6

Description

The UI shows the error message

[
    "''\"hashcat.exe\"'' is not recognized as an internal or external command,",
    "operable program or batch file.",
    "Faild to retrieve one successful cracker state, most likely due to failing."
]

Running the agent with --debug shows the following logs:

{'action': 'getHealthCheck', 'token': '[SNIP]'}
https://htpl.foxden.network:443 "POST /api/server.php HTTP/1.1" 200 164
b'{"action":"getHealthCheck","response":"SUCCESS","attack":" --hash-type=3200 #HL# -a 3 ?l?l?l ","crackerBinaryId":1,"hashes":[""],"checkId":3,"hashlistAlias":"#HL#"}'
{'action': 'downloadBinary', 'token': '[SNIP]', 'type': 'cracker', 'binaryVersionId': 1}
https://htpl.foxden.network:443 "POST /api/server.php HTTP/1.1" 200 147
b'{"action":"downloadBinary","response":"SUCCESS","url":"https:\\/\\/hashcat.net\\/files\\/hashcat-6.2.6.7z","name":"hashcat","executable":"hashcat.exe"}'
Starting check ID 3
CALL: C:\hashtopolis\crackers\1\hashcat.exe --version
CALL: '"hashcat.exe"' --machine-readable --quiet --restore-disable --potfile-disable --session=health  --hash-type=3200 'C:\hashtopolis\hashlists\health_check.txt' -a 3 ?l?l?l  -o 'C:\hashtopolis\hashlists\health_check.out'
Started health check attack
{'action': 'sendHealthCheck', 'token': '[SNIP]', 'numCracked': -1, 'start': 1698365126, 'end': 1698365126, 'numGpus': 0, 'errors': ['\'\'"hashcat.exe"\'\' is not recognized as an internal or external command,', 'operable program or batch file.', 'Faild to retrieve one successful cracker state, most likely due to failing.'], 'checkId': 3}
https://htpl.foxden.network:443 "POST /api/server.php HTTP/1.1" 200 44
b'{"action":"sendHealthCheck","response":"OK"}'
Health check completed successfully!
{'action': 'getTask', 'token': '[SNIP]'}

I tried my own hand at fixing it yesterday via https://github.com/hashtopolis/agent-python/compare/master...Doridian:hashtopolis-agent-python:main however that only changed the error, and did not resolve it, so I am unsure if my fix was even the right approach here.

I should note: