This post covers setting up OpenVAS9 Greenbone Security Assistant.
OpenVAS (Open Vulnerability Assessment System) is an opensource tool that can be used to discover security vulnerabilities on your network.
OpenVAS uses NVTs (Network Vulnerability Tests) to actively scan your hosts by default.
Keep in mind that an Active Scan can cause an application or service to break. Therefore run in isolated non-production systems.
Installing OpenVAS is not covered in this post.
Information around installation of OpenVAS can be found here:
In this post we are going to look into these areas in a high-level overview:
- Adjust Global My Settings (Optional)
- Create Credentials for Authenticated Scans (Optional – but recommended)
- Create Schedules (Optional)
- Create Alerts (Optional)
- Create Custom Scan Config (Optional)
- Create Targets
- Create Scan Tasks
- Troubleshooting OpenVAS
In this post I am using Ubuntu Server 16.04 as OS Platform with following specifications:
50 GB Disk
OpenVAS install on Kali
OpenVAS can also easily be installed on Kali with APT.
apt install openvas
Change TimeZone to reflect your zone and change default report file names to a better naming convention :
%T – for type (this case Report)
%D – for date
%t – for time
%N – name of the Scan Task
Create Credentials for Authenticated Scans
Authenticated scans provides most valuable information on a given host.
Go to Configuration>Credentials and click the “star” icon in the left corner to create a new set of credentials for authenticated scan.
Set up scheduling to scan targets on a periodically basis.
Create Schedule from the Configuration Tab.
Above will run a weekly scan every week at wednesday 23.00.
In order to activate this schedule, it must be attached to a Scan Task.
OpenVAS Alerts can be used to Send out an email whenever a Scan Task completes, together with attaching the scan report to the mail.
Several options exist here for alerting methods (Alerts are found under Configuration Tab) :
Configure SendMail on Ubuntu
Follow below steps to setup sendmail with OpenVAS.
apt-get install sendmail mailutils sendmail-bin
mkdir -m 700 /etc/mail/authinfo/
create an auth file with a following content. File can have any name, in this example the name is gmail-auth:
AuthInfo: “U:root” “I:YOUR GMAIL EMAIL ADDRESS” “P:YOUR PASSWORD”
we will need to create a hash map for the above authentication file:
makemap hash gmail-auth < gmail-auth
Put bellow lines into your sendmail.mc configuration file right above first “MAILER” definition line:
RELAY_MAILER_ARGS',TCP $h 587′)dnldefine(
ESMTP_MAILER_ARGS',TCP $h 587′)dnldefine(
EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnldefine(confAUTH_MECHANISMS’,
EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnlFEATURE(authinfo’,`hash -o /etc/mail/authinfo/gmail-auth.db’)dnl
In the next step we will need to re-build sendmail’s configuration. To do that execute:
make -C /etc/mail
Create a single target or a given subnet in CIDR format.
Create Scan Task
OpenVAS Scan Configs
These are default Scan Configs, its possible to adjust and create own based on what specific active tests are carried out.
These scan configs are referenced in the Scan Task, when creating a scan job.
tail -f /var/log/openvas/openvassd.messages
tail -f /var/log/openvas/openvasmd.log