bartavelle / rulesfinder

[deprecated] see README
41 stars 2 forks source link

Fails to compile on Amazon Linux AMI #1

Open dstaley opened 10 years ago

dstaley commented 10 years ago

I spun up an EC2 instance since I don't have access to a machine with 16GB of RAM (and I had difficultly installing libavl on OS X), cloned the repo, installed a libavl RPM (since it's not part of the package manager), and then ran make. This was the result:

[rulesfinder]$ make
cat john.conf.skel rules/d0s3.rule > conf/d0s3.conf
gcc -Wall -g2 -O2 -o rf rf.c -lavl
gcc -Wall -g2 -O2 -o removeknown removeknown.c
removeknown.c: In function ‘main’:
removeknown.c:145:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  if(r = readwords(wordmap, dstats.st_size, hashmap))
  ^
./removeknown ~/dict_dup < ~/password.lst > cleanpass
~/JohnTheRipper/run/john -w:~/dict_dup -sess:d0s3 -rules:xxx --config:conf/d0s3.conf -stdout | ./rf - cleanpass "`cat rules/d0s3.rule`" 4 | gzip -1 > output/d0s3.out
/bin/sh: output/d0s3.out: No such file or directory
./rf: error while loading shared libraries: libavl.so.1: cannot open shared object file: No such file or directory
fopen: ~/dict_dup: No such file or directory
make: *** [output/d0s3.out] Error 1

This is the output of ldd when run on the rf binary:

[rulesfinder]$ ldd rf
    linux-vdso.so.1 =>  (0x00007fff0ebfe000)
    libavl.so.1 => not found
    libc.so.6 => /lib64/libc.so.6 (0x00007f841d685000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f841da34000)
[rulesfinder]$ sudo find / -name "libavl*"
/usr/lib64/libavl.so.1.5
/usr/lib64/libavl.so

Alright, I feel really dirty about this, but I simply copied libavl.so.1.5 to libavl.so.1, which fixed that error.

There were several nonexistant files that it complained about, but simply creating the directory and touching the files seemed to fix that.

Currently it's running John with different configurations. Hopefully that means it's working!

bartavelle commented 10 years ago

Good to hear ! The fact that you had to rename the libavl file is really strange ...

dstaley commented 10 years ago

I think it's because libavl is a pretty obscure library. The repos didn't have it, so I had to pilfer an RPM from OpenSUSE.

I managed to make it to this:

clean/X930.rule loaded [0]
clean/X940.rule loaded [0]
clean/X990.rule loaded [0]
clean/X950.rule loaded [0]
clean/X960.rule loaded [0]
[3] EXITS
[5] EXITS
[2] EXITS
clean/X970.rule loaded [0]
[4] EXITS
[0] EXITS
clean/X980.rule loaded [0]
[1] EXITS
start crunching

What's the next step?

Hmm, looks like it just failed silently? It might be that I'm using an incompatible version of John, or that the libavl I have isn't functioning properly. Do you happen to remember what your system configuration looked like the last time you were able to run this successfully?

Edit: Okay, looks like it's definitely not compatible with John 1.8.0, which removed the -config flag. I've compiled 1.7.9-jumbo5 and am giving it a go.

dstaley commented 10 years ago

Alright, I think I've made some good progress.

I archived my working directory, which you can download here. It includes all the files created by running make.

Also, you can find a log of the build output here. There's also a copy of this file in the archive.

bartavelle commented 10 years ago

The threshold is probably too high. Reduce the value in the "limit" file and try again.