Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 18 Apr 2015 23:10:12 +0800
From: Kai Zhao <loverszhao@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: Advice on proposal: John the Ripper jumbo robustness

I am glad to show you that I have got 1200~1500 exec/s! It seems that
my computer is faster than yours, since my run time is always less than
yours when we have the same operations.

Below are my experiments:

1. Fully instrumented build

$ ./configure CC=afl-gcc && make
$ echo garbage > test.pw
$ time ../john --format=7z test.pw
No password hashes loaded (see FAQ)

real    0m0.202s
user    0m0.199s
sys     0m0.003s

2. Instrumenting only necessary minimum (5x)

$ ./configure && make && rm 7z_fmt_plug.o john.o && make CC=afl-gcc
$ echo garbage > test.pw
$ time ../john --format=7z test.pw
No password hashes loaded (see FAQ)

real    0m0.041s
user    0m0.038s
sys     0m0.003s

3. Change config file (5x)

$ echo '[Options]' > local.conf
$ echo garbage > test.pw
$ time ../john --format=7z --config=local.conf test.pw
No password hashes loaded (see FAQ)

real    0m0.008s
user    0m0.006s
sys     0m0.003s

4. Change source code (3x)

4.1 git diff
---------------------------------------------------------------------------
diff --git a/src/john.c b/src/john.c
index 0c730ff..6dc7fe8 100644
--- a/src/john.c
+++ b/src/john.c
@@ -270,7 +270,8 @@ static void john_register_all(void)
        // to dynamic.
        // Since gen(27) and gen(28) are MD5 and MD5a formats, we build the
        // generic format first
-       cnt = dynamic_Register_formats(&selfs);
+       // cnt = dynamic_Register_formats(&selfs);
+       cnt = 0;

        john_register_one(&fmt_DES);
        john_register_one(&fmt_BSDI);
@@ -1673,6 +1674,7 @@ int main(int argc, char **argv)
        }
 #endif
        john_init(name, argc, argv);
+       return 0;

        /* Placed here to disregard load time. */
 #if OS_TIMER
---------------------------------------------------------------------------

4.2 run

$ time ../john --format=7z --config=local.conf test.pw
No password hashes loaded (see FAQ)

real    0m0.003s
user    0m0.001s
sys     0m0.002s

4.3 fuzz

$ ls test_cases
test.pw
$ afl-fuzz -m none -t 100 -i test_cases/ -o out ../john @@ --nolog
--max-run-time=1  --skip-self-test --format=7z --config=local.conf

exec speed: 1200~1500 /sec


Thanks,

Kai

Content of type "text/html" skipped

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ