Install OpenVAS for Broad Vulnerability Assessment « Null Byte :: WonderHowTo

OpenVASis a powerful vulnerability assessment tool. Forked fromNessusafter Nessus became a proprietary product, OpenVAS stepped in to fill the niche. OpenVAS really shines for information gathering in large networks where manual scanning to establish a foothold can be time-consuming. OpenVAS is also helpful for administrators who need to identify potential security issues on a network.In this article, I will demonstrate the configuration and installation of OpenVAS, or Open Vulnerability Assessment System, in Kali Linux.Step 1: We're Going to Need a Shell for ThisThe first step is to open your favorite terminal emulator and become root by typingsudo su. In my case, I am using SSH to connect to my headless Kali box. While this will work on most machines running Kali Linux, you can set up your own Kali Linux hacking computeron the $35 Raspberry Pi. From here on out, I will be assuming that you are running as root.Don't Miss:How to Set Up a Headless Raspberry Pi Hacking Platform Running Kali LinuxKali is a rolling distro. We want to be sure we have the most up-to-date package lists and the most up-to-date packages installed. So be sure to run the command:apt update && apt upgradeIn the screenshot above, it looks like I have some packages that are no longer required. If you encounter the same message, you can safely remove the unnecessary packages with:apt autoremove && apt cleanThis helps maintain a leaner system which is important in situations where disk space is tight. To clear out unused packages, useapt autoremove. To clear out .deb packages left over in your /var/cache/apt/archives directory, useapt clean.Step 2: Install the OpenVAS PackageLike most mainstream security tools, OpenVAS is available from the Kali repositories. To install it, simply issue the command:apt install openvasIf the proposed changes to your system look acceptable, press theenterkey. If not, hitnon your keyboard and pressenter. These changes look acceptable to me. It may be important to note the size of OpenVAS. It clocks in around a gigabyte, which may be too heavy for systems with smaller disks.Step 3: Set Up OpenVASUnlike many packages in Kali Linux which can simply be installed and then run, OpenVAS requires some additional user interaction. Luckily, this process is, for the most part, automated.We will be running the command:openvas-setupBut before we do, let's have a look at the setup script itself. I usually like to read through shell scripts just to get some insight into what will be done to my system. The easiest way to read the file is by issuing the command:cat `which openvas-setup` | lessLet's break this command down a little bit more. Thecatutility will print files to standard output. In order to save on typing, I have enclosedwhich openvas-setupin back ticks. Bash will evaluate the command in the back ticks first giving me the path of the OpenVAS setup script. I then pipe it intoless(my preferred pager) so that I can read through it.Looking over scripts before running them as root is almost always a good idea. While detailing the entirety of what this script does is beyond the scope of this article, if it is confusing, I recommend doing some reading on Bash scripting.More Information:Bash (Shell) Scripting for BeginnersSince we're satisfied that script isn't going to harm our machine, we'll execute it with the command:openvas-setupThis setup may take awhile. Once the setup has completed, you will be presented with a password to log into the Greenbone Security Assistant (GSA), a web-based interface for managing OpenVAS. It's important to keep this password since we will use it to sign in later.Step 4: Configure Remote Access to the GSA (Optional)OpenVAS should now be configured and operating on your system. If you are running Kali in a VM or on the metal, go ahead and skip to the next step.Since I'm running headless, I want to be able to access the Greenbone Security Assistant from my local network. In previous versions of Kali, this was done by editing files located in /etc/default. Now, we need to work with systemd. First, we create the GSA configuration folder:mkdir /etc/systemd/system/greenbone-security-assistant.service.d/Next, type the following:vim /etc/systemd/system/greenbone-security-assistant.service.d/local.confThis file should contain:[Service]ExecStart=ExecStart=/usr/sbin/gsad --foreground --listen=0.0.0.0 --port=9392 --mlisten=0.0.0.0 --mport=9390This is telling the GSA daemon to listen on all interfaces. Now we need to get the OpenVAS manager working with the GSA. So we will create a new directory:mkdir /etc/systemd/system/openvas-manager.service.dNext, we create the local configuration:vim /etc/systemd/system/openvas-manager.service.d/local.confThis file should contain:[Service]ExecStart=ExecStart=/usr/sbin/openvasmd --listen=0.0.0.0 --port=9390 --database=/var/lib/openvas/mgr/tasks.dbThis binds the openvasmd to all interfaces. Next we run:openvas-stopsystemctal daemon-reloadopenvas-startIf you encounter any issues, you can useopenvas-check-setupto check for configuration errors. You can also ensure that systemd is loading your modified service files viasystemctl. To ensure that everything is bound properly, just run a quicknetstat -antup.Don't Miss:How to Scan for Vulnerabilities with NessusStep 5: Access GSAYou can now access GSA with your favorite browser, either at https://localhost, or, if you followed along in the previous step, across the network. GSA will, by default, take port 443 for connections, if that port is available. If it isn't, you can access GSA at https://localhost:9392, or across the network if you followed the steps above. When you connect, you will be presented with a warning about an insecure connection.You will need to add an exception for this certificate, which will vary depending on the browser you're using, but is usually found under the "advanced" tab. Once you have added the exception, you will be greeted by the GSA login page. The credentials are the admin and password which was generated during setup. Once you are logged in, you will see the following GSA interface.Stick Around for MoreNow that OpenVAS is installed and configured to our liking, we can proceed to use GSA to conduct vulnerability scanning. In the next article, I will be discussing the GSA interface, configuring scans with GSA, and more. Stay tuned.Next Up:Perform a Large-Scale Network Security Audit with OpenVAS's GSAFollow Null Byte onTwitterandGoogle+Follow WonderHowTo onFacebook,Twitter,Pinterest, andGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseCover image and screenshots by Barrow/Null ByteRelatedHow To:Perform a Large-Scale Network Security Audit with OpenVAS's GSAHow To:Get OpenVas Working Properly in KaliHow To:Use NMAP 7 to Discover Vulnerabilities, Launch DoS Attacks and More!Hack Like a Pro:How to Hack Web Apps, Part 5 (Finding Vulnerable WordPress Websites)Hack Like a Pro:Using Nexpose to Scan for Network & System VulnerabilitiesHack Like a Pro:How to Hack Web Apps, Part 6 (Using OWASP ZAP to Find Vulnerabilities)How To:The Definitive Guide to Android MalwareAndroid for Hackers:How to Scan Websites for Vulnerabilities Using an Android Phone Without RootHow To:Easily Detect CVEs with Nmap ScriptsHow To:Scan for Vulnerabilities on Any Website Using NiktoHack Like a Pro:How to Scan for Vulnerabilities with NessusHack Like a Pro:How to Scan the Internet for Heartbleed VulnerabilitiesHack Like a Pro:How to Find Almost Every Known Vulnerability & Exploit Out ThereHack Like a Pro:How to Find the Latest Exploits and Vulnerabilities—Directly from MicrosoftHow To:Complete a bedside assessment in nursingNews:Intel Confirmed Critical Escalation of Privilege Vulnerability — Now What?How To:Probe Websites for Vulnerabilities More Easily with the TIDoS FrameworkNews:eBay Vulnerability Allows Scammers to Attack Android & iOS with Malicious ProgramsHow To:Find Your Computer's Vulnerability Using LynisHow To:Perform an OB fundus assessment in nursingHow To:Stop the New Java 7 Exploit from Installing Malware on Your Mac or PCNews:Samsung Keyboard Vulnerability Exposes 600M Mobile Devices!How to Hack Like a Pro:Getting Started with MetasploitIPsec Tools of the Trade:Don't Bring a Knife to a GunfightNews:Sports Injury SolutionsNews:Was Pixar's Up a Rip-off?News:Flaw in Facebook & Google Allows Phishing, Spam & MoreOpen Borders:Fast and Furious: Infowars Exclusive (HQ)News:Monster.comNews:Queens City Councilman Peter Vallone Jr. Wants to Ban Fat CapsNews:Economic Reform in the CommunityHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesNews:Half a Million Macs Affected by Flashback Trojan! Eradicate It Before It's Too LateNews:Lesson Plan #1News:Bugzilla Cross Site Request ForgeryNews:Lots of WordPress plugin vulnerabilitiesScrabble Bingo of the Day:EURYOKYHow To:Tips On How To Find The Best Affiliate Marketing ProgramsHow To:Mac OS X Hit Again! How to Find and Delete the New SabPub MalwareHow To:Hack Coin-Operated Laudromat Machines for Free Wash & Dry Cycles