Arachni / arachni

Web Application Security Scanner Framework
http://www.arachni-scanner.com
Other
3.78k stars 764 forks source link

Problem installing under Ubuntu 14 #690

Closed imapangolin closed 8 years ago

imapangolin commented 8 years ago

I had an initial error and then installed ruby-dev using sudo get-apt install ruby-dev then when I try to build using:

gem install arachni

I get the following in the make.out as it fails:

/usr/bin/ruby1.9.1 extconf.rb
checking for libkern/OSAtomic.h... no
creating Makefile

make
compiling atomic_reference.c
compiling rb_concurrent.c
compiling atomic_boolean.c
In file included from atomic_boolean.c:5:0:
ruby_193_compatible.h: In function ‘rb_error_arity’:
ruby_193_compatible.h:20:3: warning: passing argument 2 of ‘rb_raise’ makes poi$
   rb_raise(rb_eTypeError, err_mess);
   ^
In file included from /usr/include/ruby-1.9.1/ruby.h:32:0,
                 from atomic_boolean.c:1:
/usr/include/ruby-1.9.1/ruby/ruby.h:1172:27: note: expected ‘const char *’ but $
 PRINTF_ARGS(NORETURN(void rb_raise(VALUE, const char*, ...)), 2, 3);

/usr/include/ruby-1.9.1/ruby/ruby.h:42:3: note: in definition of macro ‘PRINTF_$
   decl __attribute__((format(printf, string_index, first_to_check)))
   ^
/usr/include/ruby-1.9.1/ruby/ruby.h:1172:13: note: in expansion of macro ‘NORET$
 PRINTF_ARGS(NORETURN(void rb_raise(VALUE, const char*, ...)), 2, 3);
             ^
In file included from atomic_boolean.c:5:0:
ruby_193_compatible.h:20:3: error: format not a string literal and no format ar$
   rb_raise(rb_eTypeError, err_mess);
   ^
cc1: some warnings being treated as errors

make: *** [atomic_boolean.o] Error 1

So I'm kind of stuck here without any idea what to do about this.

Thanks for any help.

Zapotek commented 8 years ago

Hello,

Is there a reason why you're not using the official packages?

Cheers

imapangolin commented 8 years ago

I was following some install instructions and this was they.

I did try the official install package however, but I can't seem to create a proper symbolic link to execute it from within OpenVAS. That's the quandry I find myself in.

Extracting the tar.gz file puts it in this folder:

/home/ubuntu/arachni-1.4-0.5.10/

So I tried adding the link as follows:

ln -s /home/ubuntu/arachni-1.4-0.5.10/bin/arachni* /usr/bin/

And though /usr/bin/ is in the path I can't get a good run from the command line.

So I'm open to suggestions.
I did add /home/ubuntu/arachni-1.4-0.5.10/bin to the path as well - without any better results.

Zapotek commented 8 years ago

Unfortunately I can't help with OpenVAS nor the setup of your environment, so long as the executables in the package work that's where my responsibilities end. If I'm not mistaken though the OpenVAS plugin you are referring to is has been abandoned for years and I doubt that it'll work with Arachni now.

imapangolin commented 8 years ago

Interesting on the Arachni plugin mention - because there's a ton of people talking about it with openvas 8 and it does try to use it on deep scans. I tried the instructions here:

http://serenity-networks.com/how-to-install-arachni-nikto-and-wapiti-for-openvas-on-ubuntu-14-04-lts/

Which makes use of the standard installation - but requires the gem to be built and that's where I'm stuck stuck stuck. Thanks.

Zapotek commented 8 years ago

Those instructions are insane and nowhere are they listed on the official site in that way. That person has basically taken all possible installation procedures and blindly executed them in series, you only need one of them and unless you really know what you're doing (and not even then tbh) you should be using the official, self-contained packages.

You only need to download the official package and use the executables under bin/, so long as your PATH is setup correctly you'll be able to call Arachni from anywhere.

About OpenVAS, it may be a different plugin, I can't be sure about that, I only know of the ancient and broken one.

imapangolin commented 8 years ago

I'm going to try the official distribution and adding the path to the system path.

imapangolin commented 8 years ago

I did the above - but I can't run still. So here's what I see - any idea what I'm doing wrong? I extract the standard install and then I add the bin folder to the path - which you can see - but it won't run.

Last login: Wed Mar 23 18:21:12 2016 from ip-10-0-1-184.ec2.internal ubuntu@ip-10-0-0-8:~$ echo $PATH /home/ubuntu/.rbenv/plugins/ruby-build/bin:/home/ubuntu/.rbenv/shims:/home/ubuntu/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/ubuntu/arachni-1.4-0.5.10/bin ubuntu@ip-10-0-0-8:~$ arachni /usr/bin/arachni: line 3: /usr/bin/readlink_f.sh: No such file or directory /usr/bin/arachni: line 4: readlink_f: command not found /usr/bin/arachni: line 4: ./../system/setenv: No such file or directory ruby: No such file or directory -- /arachni-ui-web/bin/arachni (LoadError) ubuntu@ip-10-0-0-8:~$

Zapotek commented 8 years ago

I just tried it and couldn't reproduce, do the executables under bin work when run directly?