{"id":493,"date":"2018-08-29T05:58:58","date_gmt":"2018-08-29T02:58:58","guid":{"rendered":"http:\/\/kifarunix.com\/?p=493"},"modified":"2024-03-10T16:29:57","modified_gmt":"2024-03-10T13:29:57","slug":"how-to-install-and-setup-openvas-9-vulnerability-scanner-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-install-and-setup-openvas-9-vulnerability-scanner-on-ubuntu-18-04\/","title":{"rendered":"Install and Setup OpenVAS 9 Vulnerability Scanner on Ubuntu 18.04"},"content":{"rendered":"\n<p>Hello there. In this guide, we will be learning about how to install and setup OpenVAS 9 Vulnerability Scanner on Ubuntu 18.04.<\/p>\n\n\n\n<p>This post is dated. Check how to current versions install GVM;<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/?s=gvm\" target=\"_blank\" rel=\"noopener\">Install Greenbone Vulnerability Manager<\/a><\/p>\n\n\n\n<p>OpenVAS is the world&#8217;s most advanced Open Source vulnerability scanner and manager. It is a software framework of several services and tools offering a comprehensive and powerful vulnerability scanning and vulnerability management solution. It executes the actual Network Vulnerability Tests (NVTs) which are served via the <a href=\"http:\/\/www.openvas.org\/openvas-nvt-feed.html\" target=\"_blank\" rel=\"noopener\"> OpenVAS NVT Feed<\/a> or via a commercial feed service.<\/p>\n\n\n\n<p>Before we dive into installing and setting up OpenVAS on Ubuntu 18.04, let us first have an overview of the basic functionality and the various components that make up OpenVAS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Architecture Overview<\/strong><\/h3>\n\n\n\n<p>The illustration below shows the logical architecture of the OpenVAS framework:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2018\/08\/openvas-arch-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"838\" height=\"442\" src=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2018\/08\/openvas-arch-1.png\" alt=\"Install and Setup OpenVAS 9 Vulnerability Scanner on Ubuntu 18.04\" class=\"wp-image-2299\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/08\/openvas-arch-1.png 838w, https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/08\/openvas-arch-1-768x405.png 768w\" sizes=\"(max-width: 838px) 100vw, 838px\" \/><\/a><\/figure>\n\n\n\n<p>The description of major components of OpenVAS is briefly outlined below.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Greenbone Security Assistant<\/strong> (GSA) which provides a web-based user interface for the administration and management of OpenVAS scans, reports&#8230;<\/li>\n\n\n\n<li><strong>OpenVAS CLI<\/strong> which provides the command line interface for the administration OpenVAS for instance you can perform scanning, manage reports.<\/li>\n\n\n\n<li><strong>Greenbone Desktop Security<\/strong> which provides a graphical user interface desktop application for the complete management of OpenVAS.<\/li>\n\n\n\n<li><strong>OpenVAS Manager<\/strong> which is the main artery of the OpenVAS. It receives various tasks\/instructions from the administrator through the client components, WEB\/GUI\/CLI, and uses these instructions to control the OpenVAS Scanner which does the actual vulnerability assessment. It also controls a SQL database where all configuration and scan result data is centrally stored. Finally, it also handles user management including access control with groups and roles.<\/li>\n\n\n\n<li><strong>OpenVAS Scanner<\/strong> is the component that performs actual vulnerability assessment against specified targets.<\/li>\n\n\n\n<li><strong>OpenVAS Administration<\/strong> is another component that allows admins to create users and assign various privileges as well and manage the NVTs Feed updates.<\/li>\n\n\n\n<li><strong>Scan Targets<\/strong> are the endpoints which are being assessed of any vulnerabilities.<\/li>\n<\/ul>\n\n\n\n<p>Without much theory, let us dive into installing and setting up OpenVAS on Ubuntu 18.04. But wait, you might also be interested in checking our previous articles on Nessus, Nikto, WPScan, Lynis, RKHunter, ClamAV, Free Sophos AntiVirus by following the links below;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a title=\"How to Install and Configure Nessus Scanner on Ubuntu 18.04\/CentOS 7\" href=\"https:\/\/kifarunix.com\/how-to-install-configure-and-use-nessus-vulnerability-scanner-on-ubuntu-18-04\/\" rel=\"bookmark\">How to Install and Configure Nessus Scanner on Ubuntu 18.04\/CentOS 7<\/a><\/li>\n\n\n\n<li><a title=\"How to Install and Use WPScan WordPress Vulnerability Scanner Ubuntu 18.04\" href=\"https:\/\/kifarunix.com\/install-use-wpscan-wordpress-vulnerability-scanner-ubuntu-18-04\/\" rel=\"bookmark\">How to Install and Use WPScan WordPress Vulnerability Scanner Ubuntu 18.04<\/a><\/li>\n\n\n\n<li><a title=\"How to Install and Use Nikto Web Scanner on Ubuntu 18.04\" href=\"https:\/\/kifarunix.com\/how-to-install-and-use-nikto-web-scanner-on-ubuntu-18-04\/\" rel=\"bookmark\">How to Install and Use Nikto Web Scanner on Ubuntu 18.04<\/a><\/li>\n\n\n\n<li><a title=\"How to Install and Use ClamAV Antivirus on Ubuntu 18.04\" href=\"https:\/\/kifarunix.com\/how-to-install-and-use-clamav-antivirus-on-ubuntu-18-04\/\" rel=\"bookmark\">How to Install and Use ClamAV Antivirus on Ubuntu 18.04<\/a><\/li>\n\n\n\n<li><a title=\"How to Perform System Security Auditing with Lynis on Ubuntu 18.04\" href=\"https:\/\/kifarunix.com\/how-to-perform-system-security-auditing-with-lynis-on-ubuntu-18-04\/\" rel=\"bookmark\">How to Perform System Security Auditing with Lynis on Ubuntu 18.04<\/a><\/li>\n\n\n\n<li><a title=\"How to Install RKHunter (RootKit Hunter) On Ubuntu 18.04\" href=\"https:\/\/kifarunix.com\/how-to-install-rkhunter-rootkit-hunter-on-ubuntu-18-04\/\" rel=\"bookmark\">How to Install RKHunter (RootKit Hunter) On Ubuntu 18.04<\/a><\/li>\n\n\n\n<li><a title=\"How to Install Sophos AntiVirus on Ubuntu 18.04\" href=\"https:\/\/kifarunix.com\/how-to-install-sophos-antivirus-on-ubuntu-18-04\/\" rel=\"bookmark\">How to Install Sophos AntiVirus on Ubuntu 18.04<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Install and Setup OpenVAS 9 Vulnerability Scanner on Ubuntu<\/h2>\n\n\n\n<p>Before you can proceed with installation and setup of OpenVAS 9 on Ubuntu 18.04, you have to create&nbsp;OpenVAS PPA repository using the <code>add-apt-repository<\/code> command as shown below. When you run the above command, a summary of how to go about installation and set up is given. To add the ppa repo, press ENTER.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>add-apt-repository ppa:mrazavi\/openvas<\/code><\/pre>\n\n\n\n<p>After adding the ppa repo, update your system and install the required packages; <code>sqlite3<\/code> which provides SQL DB for OpenVAS manager, <code>openvas9<\/code> package fot openvas 9.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt update -y\napt upgrade -y\napt install sqlite3 openvas9 -y<\/code><\/pre>\n\n\n\n<p>Want to use PostgreSQL database with OpenVAS 9 instead of the default SQLite? See the link below on how to configure OpenVAS 9 to use PostgreSQL.<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-openvas-9-with-postgresql-in-ubuntu-18-04\/\" target=\"_blank\" rel=\"noopener noreferrer\">Install OpenVAS 9 with PostgreSQL in Ubuntu 18.04<\/a><\/p>\n\n\n\n<p>During installation, you may be prompted to update the redis conf file to enable redis unix socket. Enable the socket and proceed with installation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>Configuring openvas9-scanner\n----------------------------\n\nOpenvas scanner require redis database to store data. It will connect to the database with a unix socket\nat \/var\/run\/redis\/redis.sock.\n\n\nIf you agree, the installation process will enable redis unix socket at this address automatically, by\nupdating \/etc\/redis\/redis.conf.\n\nOtherwise, you have to manually update your \/etc\/redis\/redis.conf.\n\n<strong>Do you want to enable redis unix socket in \/etc\/redis\/redis.conf? [yes\/no] yes<\/strong><\/code><\/pre>\n\n\n\n<p>In order to obtain PDF reports with nice fonts for every scanning, some packages need to be installed.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install texlive-latex-extra --no-install-recommends -y\napt install texlive-fonts-recommended --no-install-recommends -y<\/code><\/pre>\n\n\n\n<p>To run OpenVAS NASL scripts against a target, or troubleshoot and check NASL scripts for errors, you need the openvas-nasl utility which is provided by the <code>libopenvas9-dev<\/code> package. To install libopenvas9-dev, run the following command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>apt install libopenvas9-dev<\/code><\/pre>\n\n\n\n<p>After that, update the network vulnerability tests database by syncing it with&nbsp;<a href=\"http:\/\/www.openvas.org\/openvas-nvt-feed.html\" target=\"_blank\" rel=\"noopener\">feeds<\/a> using the the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>greenbone-nvt-sync\ngreenbone-scapdata-sync\ngreenbone-certdata-sync<\/code><\/pre>\n\n\n\n<p>Once the update is done, restart the OpenVAS scanner, manager and security assistant.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl restart openvas-scanner\nsystemctl restart openvas-manager\nsystemctl restart openvas-gsa<\/code><\/pre>\n\n\n\n<p>You can also enable the services to run on system reboot.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>systemctl enable openvas-scanner\nsystemctl enable openvas-manager\nsystemctl enable openvas-gsa<\/code><\/pre>\n\n\n\n<p>Run the following command to confirm that the openvas processes are running.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ps aux | grep openvas<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>root&nbsp;&nbsp;&nbsp; 18390&nbsp;&nbsp;&nbsp; 0.0&nbsp;&nbsp;&nbsp; 0.3&nbsp;&nbsp;&nbsp; 146072&nbsp;&nbsp; 3500 ?&nbsp;&nbsp;&nbsp; Ss&nbsp; 10:59&nbsp;&nbsp; 0:02&nbsp; <strong>openvassd: Waiting for incoming connections<\/strong>\nroot&nbsp;&nbsp;&nbsp; 18418&nbsp;&nbsp;&nbsp; 0.0&nbsp;&nbsp;&nbsp; 0.0&nbsp;&nbsp;&nbsp; &nbsp;93312&nbsp;&nbsp;&nbsp; 536 ?&nbsp;&nbsp;&nbsp; Ss&nbsp; 10:59&nbsp;&nbsp; 0:00&nbsp; gpg-agent --homedir \/var\/lib\/openvas\/openvasmd\/gnupg --use-standard-socket --daemon\nroot&nbsp;&nbsp;&nbsp; 18521&nbsp;&nbsp;&nbsp; 0.0&nbsp;&nbsp;&nbsp; 0.6&nbsp;&nbsp;&nbsp; 202844&nbsp;&nbsp; 6172 ?&nbsp;&nbsp;&nbsp; SL&nbsp; 10:59&nbsp;&nbsp; 0:00&nbsp; <strong>openvasmd<\/strong><\/code><\/pre>\n\n\n\n<p>Now, Before we can run any tests, we need to rebuild the NVTs cache so that the feeds we synced above are loaded&nbsp; to the OpenVAS manager.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>openvasmd --rebuild --progress --verbose\nRebuilding NVT cache... done.<\/code><\/pre>\n\n\n\n<p>There are some additional tools that can be installed for instance <code>openvas-check-setup<\/code> tool for checking the state of OpenVAS installation. It can also show other requirements for OpenVAS functionality.<\/p>\n\n\n\n<p>To install <code>openvas-check-setup<\/code>, download it to your PATH, make it executable.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>wget --no-check-certificate https:\/\/svn.wald.intevation.org\/svn\/openvas\/branches\/tools-attic\/openvas-check-setup -P \/usr\/local\/bin\/\nchmod +x \/usr\/local\/bin\/openvas-check-setup<\/code><\/pre>\n\n\n\n<p>Now, run the command to verify your installation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>openvas-check-setup --v9<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>openvas-check-setup 2.3.7\nTest completeness and readiness of OpenVAS-9\n\nPlease report us any non-detected problems and\nhelp us to improve this check routine:\nhttp:\/\/lists.wald.intevation.org\/mailman\/listinfo\/openvas-discuss\n\nSend us the log-file (\/tmp\/openvas-check-setup.log) to help analyze the problem.\n\nUse the parameter --server to skip checks for client tools\nlike GSD and OpenVAS-CLI.\n\nStep 1: Checking OpenVAS Scanner ...\n<strong>...<\/strong>\nStep 10: Checking presence of optional tools ...\nOK: pdflatex found.\nOK: PDF generation successful. The PDF report format is likely to work.\nOK: ssh-keygen found, LSC credential generation for GNU\/Linux targets is likely to work.\nWARNING: Could not find rpm binary, LSC credential package generation for RPM and DEB based targets will not work.\nSUGGEST: Install rpm.\nWARNING: Could not find makensis binary, LSC credential package generation for Microsoft Windows targets will not work.\nSUGGEST: Install nsis.\n\nIt seems like your OpenVAS-9 installation is OK.<\/code><\/pre>\n\n\n\n<p>Oh well, it seems like everything is okay.<\/p>\n\n\n\n<p>Now we can proceed to access our OpenVAS via web browser. Remember the default port number of the web interface is <strong>4000<\/strong>. So, to access the web interface, go to <strong>https:\/\/IP_address_of_server:4000.&nbsp;<\/strong>The default login credentials are: &#8220;<strong>admin<\/strong>&#8221; as username and password.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2018\/08\/greenbone-dash-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1438\" height=\"672\" src=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2018\/08\/greenbone-dash-1.png\" alt=\"Install and Setup OpenVAS 9 Vulnerability Scanner on Ubuntu 18.04\" class=\"wp-image-2297\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/08\/greenbone-dash-1.png 1438w, https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/08\/greenbone-dash-1-768x359.png 768w\" sizes=\"(max-width: 1438px) 100vw, 1438px\" \/><\/a><\/figure>\n\n\n\n<p>When you login, the default dashboard for OpenVAS looks like as shown below;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2018\/08\/greenbonee_dash-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1905\" height=\"925\" src=\"http:\/\/kifarunix.com\/wp-content\/uploads\/2018\/08\/greenbonee_dash-1.png\" alt=\"Install and Setup OpenVAS 9 Vulnerability Scanner on Ubuntu 18.04\" class=\"wp-image-2298\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/08\/greenbonee_dash-1.png 1905w, https:\/\/kifarunix.com\/wp-content\/uploads\/2018\/08\/greenbonee_dash-1-768x373.png 768w\" sizes=\"(max-width: 1905px) 100vw, 1905px\" \/><\/a><\/figure>\n\n\n\n<p>You have successfully set up a fully functional OpenVAS Scanner on Ubuntu 18.04 and you should now be able to run vulnerability scans against your hosts.<\/p>\n\n\n\n<p>See how to add and scan a target for vulnerabilities by following the link below.<\/p>\n\n\n\n<p><a title=\"How to Add and Scan a Target for Vulnerabilities on OpenVAS Scanner\" href=\"https:\/\/kifarunix.com\/how-to-add-and-scan-a-target-for-vulnerabilities-on-openvas\/\" target=\"_blank\" rel=\"bookmark noopener noreferrer\">How to Add and Scan a Target for Vulnerabilities on OpenVAS Scanner<\/a><\/p>\n\n\n\n<p>Thank you for reading. Enjoy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello there. In this guide, we will be learning about how to install and setup OpenVAS 9 Vulnerability Scanner on Ubuntu 18.04. This post is<\/p>\n","protected":false},"author":1,"featured_media":2299,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[34,370,150],"tags":[100,67,101],"class_list":["post-493","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security","category-openvas","category-vulnerability-scanners","tag-openvas","tag-ubuntu-18-04","tag-vulnerability-assessement","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/493"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=493"}],"version-history":[{"count":13,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/493\/revisions"}],"predecessor-version":[{"id":20944,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/493\/revisions\/20944"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/2299"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=493"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=493"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=493"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}