[GH-ISSUE #1414] false positives: openssl_enc_fmt #904

Closed
opened 2026-10-14 03:27:29 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @loverszhaokai on GitHub (Jun 8, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1414

This bug was found by fuzz.pl written by Solar.

openssl_enc_fmt_plug.c test vector

static struct fmt_tests openssl_tests[] = {
        {"$openssl$0$0$8$305cedc2a0521011$bf11609a01e78ec3f50f0cc483e636f9$1$0", "password"},
};

$ cat pwfile

$openssl$0$0$8$3059edc2a0521011$bf11609a01e78ec3f50f0cc483e636f9$1$0
$openssl$0$0$8$305cedc2a0521911$bf11609a01e78ec3f50f0cc483e636f9$1$0

The difference of pwfile in test vector in openssl_enc_fmt_plug.c is:
05ce -> 059e
2101 -> 2191

$ ./john pwfile

Using default input encoding: UTF-8
Loaded 2 password hashes with 2 different salts (openssl-enc, OpenSSL "enc" encryption [32/64])
Will run 8 OpenMP threads
Note: This format may emit false positives, so it will keep trying even after
finding a possible candidate.
Press 'q' or Ctrl-C to abort, almost any other key for status
dakota           (?)
murphy           (?)
bitch            (?)
jordan           (?)
goofy            (?)
beagle           (?)
charity          (?)
nguyen           (?)
santa            (?)
stinky           (?)
darryl           (?)
shaggy           (?)
maxmax           (?)
mission          (?)
texas            (?)
indian           (?)
young            (?)
123456a          (?)
andres           (?)
rosita           (?)
celeste          (?)
rain             (?)
olsen            (?)
color            (?)
liz              (?)
1214             (?)
1998             (?)
1952             (?)
god              (?)
jordan           (?)
Bigmac           (?)
Crystal          (?)
Aragorn          (?)
Arlene           (?)
Carnage          (?)
Carrot           (?)
Person           (?)
Zenith           (?)
Beanie           (?)
Daphne           (?)
Maiden           (?)
Mikael           (?)
Steph            (?)
Love12           (?)
Ashlee           (?)
Fletch           (?)
Fool             (?)
Dharma           (?)
Slip             (?)
Thelorax         (?)
kermits          (?)
wisdoms          (?)
moores           (?)
scarlets         (?)
polices          (?)
slackers         (?)
andres           (?)
sanjoses         (?)
targets          (?)
juleses          (?)
lloyds           (?)
manutds          (?)
sweetnesses      (?)
tazmanias        (?)
twilights        (?)
thes             (?)
laserjets        (?)
dillweeds        (?)
vedders          (?)
service1         (?)
70g 0:00:00:00 7.19% 2/3 (ETA: 20:12:54) 218.7g/s 30400p/s 62400c/s 62400C/s testers..marie1
Session aborted

John shouldn't have cracked any password, because the hash was modified such that it is likely infeasible to find a password that would match it.

Originally created by @loverszhaokai on GitHub (Jun 8, 2015). Original GitHub issue: https://github.com/openwall/john/issues/1414 This bug was found by fuzz.pl written by Solar. openssl_enc_fmt_plug.c test vector ``` C static struct fmt_tests openssl_tests[] = { {"$openssl$0$0$8$305cedc2a0521011$bf11609a01e78ec3f50f0cc483e636f9$1$0", "password"}, }; ``` $ cat pwfile ``` $openssl$0$0$8$3059edc2a0521011$bf11609a01e78ec3f50f0cc483e636f9$1$0 $openssl$0$0$8$305cedc2a0521911$bf11609a01e78ec3f50f0cc483e636f9$1$0 ``` The difference of pwfile in test vector in openssl_enc_fmt_plug.c is: 05ce -> 059e 2101 -> 2191 $ ./john pwfile ``` C Using default input encoding: UTF-8 Loaded 2 password hashes with 2 different salts (openssl-enc, OpenSSL "enc" encryption [32/64]) Will run 8 OpenMP threads Note: This format may emit false positives, so it will keep trying even after finding a possible candidate. Press 'q' or Ctrl-C to abort, almost any other key for status dakota (?) murphy (?) bitch (?) jordan (?) goofy (?) beagle (?) charity (?) nguyen (?) santa (?) stinky (?) darryl (?) shaggy (?) maxmax (?) mission (?) texas (?) indian (?) young (?) 123456a (?) andres (?) rosita (?) celeste (?) rain (?) olsen (?) color (?) liz (?) 1214 (?) 1998 (?) 1952 (?) god (?) jordan (?) Bigmac (?) Crystal (?) Aragorn (?) Arlene (?) Carnage (?) Carrot (?) Person (?) Zenith (?) Beanie (?) Daphne (?) Maiden (?) Mikael (?) Steph (?) Love12 (?) Ashlee (?) Fletch (?) Fool (?) Dharma (?) Slip (?) Thelorax (?) kermits (?) wisdoms (?) moores (?) scarlets (?) polices (?) slackers (?) andres (?) sanjoses (?) targets (?) juleses (?) lloyds (?) manutds (?) sweetnesses (?) tazmanias (?) twilights (?) thes (?) laserjets (?) dillweeds (?) vedders (?) service1 (?) 70g 0:00:00:00 7.19% 2/3 (ETA: 20:12:54) 218.7g/s 30400p/s 62400c/s 62400C/s testers..marie1 Session aborted ``` John shouldn't have cracked any password, because **the hash was modified** such that **it is likely infeasible to find a password that would match it**.
bsakaguchi 2026-10-14 03:27:29 +07:00
  • closed this issue
  • added the
    invalid
    label
Author
Owner

@jfoug commented on GitHub (Jun 8, 2015):

This IS a 'false positive' format. Getting false positives even on a modified hash is just how it works.

<!-- gh-comment-id:110018857 --> @jfoug commented on GitHub (Jun 8, 2015): This IS a 'false positive' format. Getting false positives even on a modified hash is just how it works.
Author
Owner

@frank-dittrich commented on GitHub (Jun 8, 2015):

@loverszhaokai you can exclude formats which are expected to produce false positives by looking at the --list=format-all-details output.

(bleeding-jumbo)run $ ./john --list=format-all-details --format=openssl-enc 
Format label                         openssl-enc
 Disabled in configuration file      no
Min. password length in bytes        0
Max. password length in bytes        125
Min. keys per crypt                  64
Max. keys per crypt                  512
Flags
 Case sensitive                      yes
 Supports 8-bit characters           yes
 Converts 8859-1 to UTF-16/UCS-2     no
 Honours --encoding=NAME             no
 False positives possible            yes
 Uses a bitslice implementation      no
 The split() method unifies case     no
 A $dynamic$ format                  no
 A dynamic sized salt                no
 Parallelized with OpenMP            yes
  Poor OpenMP scalability            no
Number of test vectors               6
Algorithm name                       32/64
Format name                          OpenSSL "enc" encryption
Benchmark comment                    
Benchmark length                     -1
Binary size                          0
Salt size                            584
Tunable cost parameters              
Example ciphertext                   $openssl$1$0$8$a1a5e529c8d92da5$8de763bf61377d365243993137ad9729$1$0

Here, False positives possible yes means that the format has the FMT_NOT_EXACT flag set.

<!-- gh-comment-id:110022418 --> @frank-dittrich commented on GitHub (Jun 8, 2015): @loverszhaokai you can exclude formats which are expected to produce false positives by looking at the `--list=format-all-details output`. ``` (bleeding-jumbo)run $ ./john --list=format-all-details --format=openssl-enc Format label openssl-enc Disabled in configuration file no Min. password length in bytes 0 Max. password length in bytes 125 Min. keys per crypt 64 Max. keys per crypt 512 Flags Case sensitive yes Supports 8-bit characters yes Converts 8859-1 to UTF-16/UCS-2 no Honours --encoding=NAME no False positives possible yes Uses a bitslice implementation no The split() method unifies case no A $dynamic$ format no A dynamic sized salt no Parallelized with OpenMP yes Poor OpenMP scalability no Number of test vectors 6 Algorithm name 32/64 Format name OpenSSL "enc" encryption Benchmark comment Benchmark length -1 Binary size 0 Salt size 584 Tunable cost parameters Example ciphertext $openssl$1$0$8$a1a5e529c8d92da5$8de763bf61377d365243993137ad9729$1$0 ``` Here, `False positives possible yes` means that the format has the FMT_NOT_EXACT flag set.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#904
No description provided.