Free tech learning for everyone, from basics to pro

Cyber Security LabsLabsIntermediate

Lab: vulnerability scanning your lab with OpenVAS/Greenbone

In short: OpenVAS, now part of the Greenbone Community Edition, is a free vulnerability scanner. In this lab you install it, scan a deliberately vulnerable VM on an isolated network, compare unauthenticated and authenticated results, and write up the top risks.

Aim and what you need

The aim is to run a vulnerability scan the way a security team would: with a written scope, an up-to-date test feed, and a report that someone could act on. Vulnerability scanning checks systems for known weaknesses such as missing patches, weak settings and old protocols. It does not exploit anything, but it does send a lot of traffic and can crash fragile devices, so it is only done with permission.

  • A Kali Linux VM with at least 4 GB RAM (8 GB is better) and 40 GB free disk, address 192.168.56.50.
  • A target: a deliberately vulnerable VM such as Metasploitable 2 at 192.168.56.60, on a host-only or internal network with no internet route.
  • Internet access for Kali during install and feed sync only. Allow two hours, mostly waiting for the feed.

Warning: never scan networks you do not own or have written permission to test, including your employer's or school's network. Unauthorised scanning can break computer misuse laws.

Scan workflowScopewritten, ownlabFeed synclatest testsTargethosts andportsScanunauth thenauthTriageseverity, fix
Figure 1. A scan is only one step; scoping first and triage afterwards are what make the results useful.

Steps

  1. Write a one-line scope: "Scan 192.168.56.60 only, in my own lab, on this date."
  2. Update Kali, install the gvm package and run the setup script. It downloads the feeds and prints an admin password at the end.
  3. Check the setup, start the services and open the web interface at https://127.0.0.1:9392.
  4. Under Configuration, Targets, create a target for 192.168.56.60 with the "All IANA assigned TCP" port list.
  5. Under Scans, Tasks, create a task with the "Full and fast" scan configuration and start it.
  6. Create a Credential (username and password for a test account on the target), add it to a copy of the target as SSH credentials and run a second, authenticated scan.
  7. Export both reports as PDF or CSV.
sudo apt update && sudo apt full-upgrade -y
sudo apt install -y gvm
sudo gvm-setup
sudo gvm-check-setup
sudo gvm-start
sudo greenbone-feed-sync
sudo runuser -u _gvm -- gvmd --user=admin --new-password='<new-strong-password>'
sudo gvm-stop
Unauthenticated versus authenticated scanUnauthenticatedSees only exposed servicesLike an outside attackerFewer findingsBanner guesses can misleadAuthenticatedLogs in with SSH or SMBReads installed packagesMany more accurate findingsNeeds a dedicated account
Figure 2. Logging in lets the scanner check real package versions instead of guessing from service banners.

How to verify and read the results

The scan worked if the report lists the target host with dozens of findings, each with a severity based on CVSS (Common Vulnerability Scoring System), a description, and a solution. Metasploitable is meant to be badly broken, so expect high-severity items such as outdated services and weak default credentials. The authenticated scan should show noticeably more findings, because the scanner can read installed package versions. For your report, do not just copy the list. Group the findings, pick the five most serious, and for each write the risk in one sentence, the evidence, and the fix (patch, disable the service or change the setting). Check whether a finding appears on the CISA Known Exploited Vulnerabilities list, as that raises its priority. Look out for false positives where a version banner was guessed, and mark them as such.

Troubleshooting and clean-up

  • gvm-check-setup reports errors: it usually prints the exact fix command. Feed sync can take a long time on the first run; let it finish.
  • Scan finishes instantly with no results: the target is down, unreachable, or the feed is still loading. Ping the target and check that the scan configurations list is populated.
  • Web UI will not load: confirm services with sudo gvm-check-setup and use 127.0.0.1, not localhost, if the certificate complains.

Clean up by stopping the services, shutting down the vulnerable VM, and keeping it on its isolated network. Never bridge Metasploitable to your home network or the internet. Keep your two reports and a short write-up for your portfolio.

Practice

Why does an authenticated scan find more than an unauthenticated one?
It logs in and reads real package and configuration details, instead of guessing from the services visible on the network.
What must you have before scanning any network?
Ownership of it, or explicit written permission and an agreed scope.
Why should Metasploitable stay on a host-only network?
It is deliberately vulnerable; exposing it could let others compromise it and use it against your network.

Key takeaways

  • Scan only systems you own or have written permission to test.
  • Keep the feed up to date; old tests miss new vulnerabilities.
  • Authenticated scans are more complete and more accurate.
  • Triage results: group, prioritise, and flag false positives.
  • Keep vulnerable target VMs on an isolated network.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.