seccubus / seccubus

Easy automated vulnerability scanning, reporting and analysis
www.seccubus.com
Apache License 2.0
693 stars 162 forks source link

Error with scans using the docker image #450

Closed adeleglise closed 7 years ago

adeleglise commented 7 years ago

Hi , Using the docker image provided, a scan with nessus scanner fails with this error :

Starting scan 'nessus' from workspace 'XXXXXX'
Sending notifications for scan start...
0 notification(s) sent
cmd: /opt/seccubus/scanners/Nessus6/scan --workspace 'XXXXX' --scan 'nessus' -s <server> --port 8834 -u <user> --policy <policy> --hosts /tmp/seccubus.hosts.1003 --pw 'XXXXXXX'  -v
sh: server: No such file or directory
Sending notifications for scan end...
0 notification(s) sent
cmd: /opt/seccubus/scanners/Nessus6/scan --workspace 'XXXXXX' --scan 'nessus' -s <server> --port 8834 -u <user> --policy <policy> --hosts /tmp/seccubus.hosts.1003 --pw 'XXXXXXX'  -v

Done

A scan with Openvas fail with this error :

Starting scan 'openvas' from workspace 'XXXXX'
Sending notifications for scan start...
0 notification(s) sent
cmd: /opt/seccubus/scanners/OpenVAS6/scan --workspace 'XXXX' --scan 'openvas' --server='<OpenVAS IP>' --user=<OpenVAS user> --password='********' --policy='Full and fast ultimate' --targetip='XXXXXX' --portlist='All TCP' --quiet -v
sh: OpenVAS: No such file or directory
Sending notifications for scan end...
0 notification(s) sent
cmd: /opt/seccubus/scanners/OpenVAS6/scan --workspace 'XXXXX' --scan 'openvas' --server='<OpenVAS IP>' --user=<OpenVAS user> --password='********' --policy='Full and fast ultimate' --targetip='XXXXXX' --portlist='All TCP' --quiet -v

A scan with skipfish fail with this error :

Starting scan 'skipfish' from workspace 'XXXX'
Sending notifications for scan start...
0 notification(s) sent
cmd: /opt/seccubus/scanners/Skipfish/scan --workspace 'XXXXX' --scan 'skipfish' -o "skipfish options" --hosts XXXXXX -v
Hosts file specified XXXXX
which: no skipfish in (/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/seccubus/.local/bin:/opt/seccubus/bin)
ls: cannot access /opt/skipfish/skipfish: No such file or directory
Skipfish found in /opt/skipfish/skipfish
Unable to execute at /opt/seccubus/SeccubusV2/SeccubusHelpers.pm line 304.
        SeccubusHelpers::run_cmd('/opt/skipfish/skipfish -h 2>&1', 0, undef) called at /opt/seccubus/scanners/Skipfish/scan line 191
        main::get_skipfish_version('/opt/skipfish/skipfish') called at /opt/seccubus/scanners/Skipfish/scan line 80
Sending notifications for scan end...
0 notification(s) sent
cmd: /opt/seccubus/scanners/Skipfish/scan --workspace 'XXXXXX' --scan 'skipfish' -o "skipfish options" --hosts XXXXXXX -v
Hosts file specified XXXXXXX
Skipfish found in /opt/skipfish/skipfish

Done

A scan with zap proxy fail with this error :

Starting scan 'zap' from workspace 'XXXXX'
Sending notifications for scan start...
0 notification(s) sent
cmd: /opt/seccubus/scanners/ZAP/scan --workspace 'XXXXXX' --scan 'zap' -o "<ZAP options>"  --hosts XXXXXX -v
Hosts file specified XXXXXXX
ls: cannot access /opt/zap/zap.jar: No such file or directory
ZAP found in 
ZAP options: -quickurl 'XXXXXXXX' -quickout '/tmp/seccubus.1103' <ZAP options> -cmd 
Timestamp = 20170428095535
Execuing cd ; java -Xmx512m -XX:PermSize=512M -jar zap.jar -quickurl 'XXXXXXX' -quickout '/tmp/seccubus.1103' <ZAP options> -cmd 
sh: ZAP: No such file or directory
Scanning done, converting .xml to ivil
You must specify the infile parameter
MrSeccubus commented 7 years ago

For the nessus and OpenVAS scanner you have not set the server parameter. The shell is interpreting as a directive to read from file server and write to file --port.

In order to do a Nessus or OpenVAS scan you need to have a computer with Nessus or OpenVAS running. This is not included in the Seccubus docker image. Using Nessus also requires a license.

A Nessus container can be obtained from docker hub: https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q=nessus&starCount=0 A OpenVAS container can be obtained from docker hub: https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q=openvas&starCount=0

I've also not installed ZAP or SkipFish in the container for now.

adeleglise commented 7 years ago

Ok my bad for Nessus and OpenVAS.

I have a running instance of OpenVAS in production, but it's OpenVAS 9. Will it run well ?

Regarding skipfish and ZAP, do you plan on adding it soon ?

Thanks

MrSeccubus commented 7 years ago

I need to look into it, but am on vacation next week. You can use the -r paramater to ssh into a box that has these tools installed as a workaround.

Since skipfish is a compiled tool, I'm a bit reluctant of the maintenance burden.

MrSeccubus commented 7 years ago

Will not add these to the docker container. Maintenance burden will be too high