Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal server error using speed benchmark for Slowhash with bigger rulefile #836

Closed
Oooooooooooooooooooooooooooops opened this issue Dec 5, 2022 · 8 comments · Fixed by #887
Assignees
Labels
bug Something isn't working

Comments

@Oooooooooooooooooooooooooooops

Hashtopolis: 0.13.0 commit d8a5eb7 branch master

python3[42552]: {'action': 'sendBenchmark', 'token': 'deleted', 'taskId': 128785, 'type': 'speed', 'result': '8028160:13293759.171428569'}
python3[42552]: Resetting dropped connection: 192.168.0.3
python3[42552]: http://192.168.0.3:80 "POST /api/server.php HTTP/1.1" 500 0
python3[42552]: Status code from server: 500

[php:error] [pid 77044] [client 192.168.0.2:49652] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function DBA\File::__construct(), 6 passed in /var/www/hashtopolis/src/inc/utils/TaskUtils.class.php on line 867 and exactly 7 expected in /var/www/hashtopolis/src/dba/models/File.class.php:14\nStack trace:\n#0 /var/www/hashtopolis/src/inc/utils/TaskUtils.class.php(867): DBA\File->__construct()\n#1 /var/www/hashtopolis/src/inc/api/APISendBenchmark.class.php(56): TaskUtils::splitByRules()\n#2 /var/www/hashtopolis/src/api/server.php(141): APISendBenchmark->execute()\n#3 {main}\n thrown in /var/www/hashtopolis/src/dba/models/File.class.php on line 14

@zyronix
Copy link
Member

zyronix commented Dec 7, 2022

Could you provide more information on how you are able to produce it? I guess based on the error message that you are doing something with rulesplitting? Could you give details on the task that you created?

@zyronix zyronix added the incomplete information Does not contain information to reproduce/work with label Dec 7, 2022
@Oooooooooooooooooooooooooooops
Copy link
Author

Oooooooooooooooooooooooooooops commented Dec 8, 2022

Client:
s3-python-0.7.0.2

CALL: './hashcat.bin' --keyspace --quiet '/home/files/All_Passwords.txt' -r '/home/files/rule.rule' --hash-type=26600 -w 4 -O
{'action': 'sendKeyspace', 'token': 'deleted', 'taskId': 128982, 'keyspace': 98029336}
......
Benchmark task...
CALL: './hashcat.bin' --machine-readable --quiet --progress-only --restore-disable --potfile-disable --session=hashtopolis -p " " '/home/hashlists/296' -a 0 '/home/files/All_Passwords.txt' -r '/home/files/rule.rule' --hash-type=26600 -w 4 -O -o '/home/hashlists/296.out'
{'action': 'sendBenchmark', 'token': 'deleted', 'taskId': 128982, 'type': 'speed', 'result': '8028160:188385950.75'}
Resetting dropped connection: 192.168.0.3
http://192.168.0.3:80 "POST /api/server.php HTTP/1.1" 500 0
Status code from server: 500
Failed to send benchmark!

But its work with Runtime Benchmark and i not received error

@zyronix
Copy link
Member

zyronix commented Dec 8, 2022

Thanks for your post, could you tell me how you created this task? What options did you click on the task create page?

@Oooooooooooooooooooooooooooops
Copy link
Author

image

@zyronix
Copy link
Member

zyronix commented Dec 9, 2022

Thanks, that helped. Could you tell me the line count of the rule file?

Issue is probably caused by a large rule file with a slowhash causing the task engine to splitting up the task into multiple subtasks.

Line 867 is missing the new lineCount parameter causing the exception. Fix is to implement the fileCount and pass the argument there.

$f = new File(null, $splitFile->getFilename() . "_p$taskId-$count", Util::filesize(dirname(__FILE__) . "/../../files/" . $splitFile->getFilename() . "_p$taskId-$count"), $splitFile->getIsSecret(), DFileType::TEMPORARY, $taskWrapper->getAccessGroupId());

@zyronix zyronix self-assigned this Dec 9, 2022
@zyronix zyronix added bug Something isn't working and removed incomplete information Does not contain information to reproduce/work with labels Dec 9, 2022
@Oooooooooooooooooooooooooooops
Copy link
Author

line count rule file: 50000

@zyronix zyronix changed the title Resetting dropped connection code 500 Internal server error using speed benchmark for Slowhash with bigger rulefile Dec 9, 2022
@Oooooooooooooooooooooooooooops
Copy link
Author

Oooooooooooooooooooooooooooops commented Dec 10, 2022

i tried also with rules lines of 500 , same error comes out
wordlist
86.57 GB, line count 6495026296

@n00btotal
Copy link

n00btotal commented Jan 4, 2023

Also having this problem. I have 5 diffrent machines (clients) on the same task. The clients have small differences, but all are Windows based.

Two of the clients are running a task (wordlist with large ruleset) - WORKING AS EXPECTED!

but three of them seems to get this problem - NOT RUNNING THE TASK!
The ones NOT running the task get this error (I replaced all the numbers):


 Benchmark task...
 CALL: "hashcat.exe" ...
 {'action': 'sendbenchmark', 'token': '1234567890', 'taskId': '123', 'type': 'speed', 'result': '1234567:1234567.123'}
 Resetting dropped connection: hashtopolis.local.lan
 http://hashtopolis.local.lan:80 "POST /api/server.php HTTP/1.1" 500 0
 Status code from server: 500
 Failed to send benchmark!

The apache-logs in the server is filled with the php-error that can be seen in the topic-starter post.

I'm running Hashtopolis 0.13.0 commit 645c03a. Running on Ubuntu 22.04 LTS. (5.15.0-27-generic)

EDIT::
Did some additional testing. With a rule-file that wasn't as big (best64, 77 lines, instead of d3ad0ne, 34099 lines), the benchmark was accepted.

EDIT2::
Using "Runtime benchmark" instead works fine.

I had to do some modifications to the client since the Windows clients have some issues with path and escape:ing.
#834

@zyronix zyronix moved this to 🏗 In progress in Development Plans Jan 27, 2023
zyronix added a commit that referenced this issue Mar 27, 2023
@zyronix zyronix moved this from 🏗 In progress to 👀 In review in Development Plans Mar 27, 2023
s3inlc pushed a commit that referenced this issue Mar 28, 2023
* Add test for rulesplit bug. WIP
* Add config for quickly debugging tests
* Fix selecting specific test in vscode debugging
* Fix config value couldn't be set to false through the userapi.
* Add detection of bug #836
* Add todo
* Adding fixed test
* Fix test
* Update changelog
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Development Plans Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants