Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't locate SeccubusV2.pm in @INC #430

Closed
kiksilog opened this issue Apr 3, 2017 · 6 comments
Closed

Can't locate SeccubusV2.pm in @INC #430

kiksilog opened this issue Apr 3, 2017 · 6 comments

Comments

@kiksilog
Copy link

kiksilog commented Apr 3, 2017

I'm using this docker command to run a seccubus container

# docker run -it --restart=always --name seccubus -p 80:80 -e "STACK=full" -e "SMTPFROM=****@gmail.com" -e "SMTPSERVER=xx.xx.xx" -v /root/volume/seccubus:/var/lib/mysql seccubus/seccubus /bin/bash
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
170403 11:00:53 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
170403 11:00:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Starting cron in background

and then I try to run a the test scan using the default workspace

# /opt/seccubus/bin/do-scan –-workspace Example -–scan ssllabs -v
Can't locate SeccubusV2.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /opt/seccubus/bin/do-scan line 20.
BEGIN failed--compilation aborted at /opt/seccubus/bin/do-scan line 20.
@MrSeccubus
Copy link
Member

This should solve it. Either su to the seccubu users first

$ docker run -ti seccubus/seccubus:latest /bin/bash
170413 12:33:11 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
170413 12:33:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
# su - seccubus
$ bin/do-scan -w bla -s bla
Workspace 'bla' does not exist at bin/do-scan line 58.
$

or cd to /opt/seccubus and run bin/do-scan

$ docker run -ti seccubus/seccubus:latest /bin/bash
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
170413 12:34:30 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
170413 12:34:30 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
# cd /opt/seccubus
# bin/do-scan -w bla -s bla
Workspace 'bla' does not exist at bin/do-scan line 58.
#

Third option: use the entrypoint

$ docker run -ti seccubus/seccubus:latest scan bla_ws bla_scan
170413 12:36:50 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
170413 12:36:50 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Workspace 'bla_ws' does not exist at bin/do-scan line 58.
$

I will look into adding the correct directories to the path tough.

@adeleglise
Copy link

Hi
Same error here.

When I su to user succubus and try to lauch the scan again I got this :

/opt/seccubus/bin/do-scan --workspace Example -scan nikto -v
Starting scan 'nikto' from workspace 'Example'
Sending notifications for scan start...
0 notification(s) sent
cmd: /opt/seccubus/scanners/Nikto/scan --workspace 'Example' --scan 'nikto' -o "" --hosts /tmp/seccubus.hosts.474 -v
Hosts file specified /tmp/seccubus.hosts.474
which: no nikto in (/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/seccubus/.local/bin:/opt/seccubus/bin)
which: no nikto.pl in (/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/seccubus/.local/bin:/opt/seccubus/bin)
ls: cannot access /opt/nikto/nikto.pl: No such file or directory
Nikto found in 
Unable to execute at /opt/seccubus/SeccubusV2/SeccubusHelpers.pm line 304.
        SeccubusHelpers::run_cmd(' -Version 2>&1', 0, undef) called at /opt/seccubus/scanners/Nikto/scan line 200
        main::get_nikto_version(undef) called at /opt/seccubus/scanners/Nikto/scan line 83
Sending notifications for scan end...
0 notification(s) sent
cmd: /opt/seccubus/scanners/Nikto/scan --workspace 'Example' --scan 'nikto' -o "" --hosts /tmp/seccubus.hosts.474 -v
Hosts file specified /tmp/seccubus.hosts.474
Nikto found in 

Done

@MrSeccubus
Copy link
Member

@adeleglise are you using the Docker container too?
The error you are getting is a different error then the error reported by @kiksilog but should nevertheless not happen...

@MrSeccubus
Copy link
Member

I just tested this with the latest docker image and it indeed produces the samen error 😢

I should have tested this better.

Here is a workaround, edit the nikto scan and add the --nikto_path parameter linke this:
image

MrSeccubus added a commit that referenced this issue Apr 28, 2017
@adeleglise
Copy link

I confirm that :

  • su to user succubus
  • adding the path to nikto in the options

Solve this problem.

Thanks.

@MrSeccubus
Copy link
Member

I've also updated the master branch so that these paths are set by default now.
If you pull seccubus/seccubus:latest from docker the error should be resolved now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants