openwall / openwall/john

ZTEX: support empty salt for md5crypt, sha256crypt, sha512crypt

Open
#3,721 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

I tried md5crypt, sha256crypt and sha512crypt with empty salts and -ztex formats fail with error.

After error, same format is loaded well, but the error happens again. Switching format fails. But rerunning fixes it.

Aborting with Control-C causes john to print Wait..., but then error message is printed again. Next Control-C exits immediately.

@Apingis, can drupal7 have empty salt?

@solardiz, can phpass or bcrypt have empty salt?

$ cat pw-empty-salt
$1$$RmyPVMlhpXjJj8iv4w.Ul.
$5$$ak6faDK9fe20oKsZ7bjHwjN3gWFkUl7Jh1kXkAJFoo3
$6$$.Q5TOqNNyRzKTE5ZY02dsLIOQwkwN0bWooBHB4loBoSN7E68SH7dHJ6SZRyzHvdF0/ybpEO82nrjBd5oI1f3g0

$ john pw-empty-salt --format=md5crypt-ztex
[...]
SN [...] FPGA #1 error: pkt_comm_status=0x80, debug=0x0000
SN [...] error -1 doing r/w of FPGAs (LIBUSB_ERROR_IO)
Found 1 device(s) ZTEX 1.15y
SN: [...] productId: 10.15.0.0 "inouttraffic JtR 1.8.x" busnum:4 devnum:4 
SN [...] FPGA #1 error: pkt_comm_status=0x80, debug=0x0000
SN [...] error -1 doing r/w of FPGAs (LIBUSB_ERROR_IO)
^C
Session aborted

$ john pw-empty-salt --format=sha256crypt-ztex
SN [...]: uploading bitstreams.. ok
SN [...]: device_list_check_bitstreams(): no bitstream or wrong type
no valid ZTEX devices found

$ john pw-empty-salt --format=sha256crypt-ztex
SN [...]: uploading bitstreams.. ok
ZTEX [...] bus:4 dev:4 Frequency:175 175 175 175 
[...]
SN [...] FPGA #1 error: pkt_comm_status=0x80, debug=0x0000
SN [...] error -1 doing r/w of FPGAs (LIBUSB_ERROR_IO)

[...]
$ john pw-empty-salt --format=sha512crypt-ztex
[...]
SN [...] FPGA #1 error: pkt_comm_status=0x80, debug=0x0000
SN [...] error -1 doing r/w of FPGAs (LIBUSB_ERROR_IO)

$ john pw-empty-salt --format=md5crypt
[...]
123456           (?)
[...]
$ john pw-empty-salt --format=sha256crypt
[...]
123456           (?)
[...]
$ john pw-empty-salt --format=sha512crypt
[...]
123456           (?)
[...]
$ john --list=build-info
Version: 1.8.0.16-jumbo-1-bleeding-e9f0f93 2019-03-29 20:46:07 +0200
[...]

$ ldd JohnTheRipper/run/john
[...]
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0
[...]
$ apt-file search /lib/x86_64-linux-gnu/libusb-1.0.so.0
libusb-1.0-0: /lib/x86_64-linux-gnu/libusb-1.0.so.0
[...]

$ apt-cache show libusb-1.0-0
Package: libusb-1.0-0
Source: libusb-1.0
Version: 2:1.0.19-1
[...]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the provided pw-empty-salt hashes and the md5crypt-ztex, sha256crypt-ztex, and sha512crypt-ztex formats. Trace the ZTEX format handling and compare it with the working CPU formats; done means empty-salt hashes work reliably without repeated device or USB errors.

Written by the indexing model from the issue text.

Assessment

Domain
cryptography, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.