openvas-scanner
This docker container is a remote scanning node and must be used with our GVM docker image.
2.1K

Visit our Website: https://www.netizen.net
This docker container is designed for use with our GVM docker image located here: GVM-Docker. The remote scanner doesn't contain any web front. It has been designed as a remote scanner that is controlled by a Master GVM Docker Container. The image uses the latest version of OpenVAS and GVM. Netizen continues to make improvements to the software for the stability and functionality of the suite. This container supports AMD 64-bit and ARM 64-bit Linux-based operating systems and Docker Desktop for Windows using WSL 2
If one of the first two requirements above is missing, you will need to follow the installation instructions in the GVM-Docker to enable remote scanner management. To get your IP address on the Master Scanner, type "ip addr" in the command line or terminal.
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common docker.io docker-compose-v2
mkdir /home/$USER/docker/gvm-docker
cd /home/$USER/docker/gvm-docker
wget https://raw.githubusercontent.com/NetizenCorp/OpenVAS-Docker/main/docker-compose.yml
nano docker-compose.yml
services:
gvm:
image: netizensoc/openvas-scanner:[latest|dev|dev-arm] # PICK A VERSION AND REMOVE BRACKETS BEFORE COMPOSING. Latest is the stable image. Dev is the development image for AMD64 Systems. Dev-Arm is the development image for ARM64 Systems.
volumes:
- scanner:/data # DO NOT MODIFY unless establishing the external docker drive
environment:
- MASTER_ADDRESS=[Enter IP] # IP or Hostname of the GVM Master container. REMOVE BRACKETS BEFORE COMPOSING.
- MASTER_PORT=2222 # SSH server port from the GVM container. Make sure the port matches the GVM master port that was configured.
restart: unless-stopped # Remove if you're using it for penetration testing or one-time scans. Only use if using for production/continuous scanning
hostname: ospd-openvas.local
cap_add:
- NET_ADMIN # for capturing packages in promiscuous mode
- NET_RAW # for raw sockets e.g. used for the boreas alive detection
security_opt:
- seccomp=unconfined
- apparmor=unconfined
logging:
driver: "json-file"
options:
max-size: "1k"
max-file: "3"
volumes:
scanner:
sudo docker compose up -d # The -d option is for a detached docker image
sudo docker container ls # Lists the current containers running on the system. Look under the Names column for the container name. Ex: gvm-docker_gvm_1
sudo docker logs -f [OpenVAS container name]
Example output:
-------------------------------------------------------
Scanner id: df5tt4csny
Public key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPbE8p5zxOoPFPDiE9BCxcRd1jCVaRfOO92BO5hIfdqi df5cy5csnp
Master host key (Check that it matches the public key from the master): [192.168.1.150]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5A55AIMHHl4neiOBuBfCPQtJp/WQuyb6xVIrgmVp3U/A7qmev
-------------------------------------------------------
docker exec -it [GVM Container Name] /add-scanner.sh
This will prompt you for your scanner name, "Scanner id", and Public Key
Scanner Name: This can be anything you want
Scanner ID: generated id from remote openvas scanner Scanner
public key: private key from scanner
You will receive a confirmation that the scanner has been added
Login to the GVM server web interface and navigate to Configuration -> Scanners to see the scanner you just added.
You can click the shield icon next to the scanner to verify the scanner connectivity. If it says Scanner Unavailable, restart the OpenVAS remote docker container with the following command:
sudo docker container restart [OpenVAS container name]
Install Docker Desktop for Windows and the required packages for docker, docker-compose, and WSL 2 on your Windows system. You can download the application at https://www.docker.com/products/docker-desktop/
Follow the usual installation instructions to install Docker Desktop. Depending on which version of Windows you are using, Docker Desktop may prompt you to turn on WSL 2 during installation. Read the information displayed on the screen and turn on the WSL 2 feature to continue.
After installing Docker Desktop and before activating WSL2, you must create a .wslconfig file under your C:\Users<Username>\ directory or modify the existing file with the text below. Please configure the file based on your system specs or VM requirements.
# Settings apply across all Linux distros running on WSL 2
[wsl2]
# Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB
memory=4GB
# Sets the VM to use two virtual processors
processors=2
# Network Setting
networkingMode=mirrored
# Specify a custom Linux kernel to use with your installed distros. The default kernel used can be found at https://github.com/microsoft/WSL2-Linux-Kernel
# kernel=C:\\temp\\myCustomKernel
# Sets additional kernel parameters, in this case enabling older Linux base images such as Centos 6
# kernelCommandLine = vsyscall=emulate
# Sets amount of swap storage space to 8GB, default is 25% of available RAM
swap=8GB
# Sets swapfile path location, default is %USERPROFILE%\AppData\Local\Temp\swap.vhdx
swapfile=C:\\temp\\wsl-swap.vhdx
# Disable page reporting so WSL retains all allocated memory claimed from Windows and releases none back when free
pageReporting=false
# Turn on default connection to bind WSL 2 localhost to Windows localhost. Setting is ignored when networkingMode=mirrored
localhostforwarding=true
# Disables nested virtualization
nestedVirtualization=false
# Turns on output console showing contents of dmesg when opening a WSL 2 distro for debugging
debugConsole=true
# Enable experimental features
[experimental]
sparseVhd=true
Start Docker Desktop from the Windows Start menu.
Navigate to Settings.
From the General tab, select Use WSL 2 based engine..
If you have installed Docker Desktop on a system that supports WSL 2, this option is turned on by default.
Select Apply & Restart.
Create a directory under your Documents folder and name it whatever you like.
Navigate to https://github.com/NetizenCorp/OpenVAS-Docker/blob/main/docker-compose.yml and download the docker-compose.yml raw file from GitHub. After downloading it, copy it into the directory you created in the Documents folder.
Next, you will modify the docker-compose.yml file using your preferred editor (NotePad, NotePad++, etc).
Edit and save the yml file with your preferences. NOTE: Netizen is not responsible for any breach if the user fails to change the default username and passwords. Make sure to store your passwords in a secure password manager.
services:
gvm:
image: netizensoc/openvas-scanner:[latest|dev|dev-arm] # PICK A VERSION AND REMOVE BRACKETS BEFORE COMPOSING. Latest is the stable image. Dev is the development image for AMD64 Systems. Dev-Arm is the development image for ARM64 Systems.
volumes:
- scanner:/data # DO NOT MODIFY unless establishing the external docker drive
environment:
- MASTER_ADDRESS=[Enter IP] # IP or Hostname of the GVM Master container. REMOVE BRACKETS BEFORE COMPOSING.
- MASTER_PORT=2222 # SSH server port from the GVM container. Make sure the port matches the GVM master port that was configured.
restart: unless-stopped # Remove if you're using it for penetration testing or one-time scans. Only use if using for production/continuous scanning
hostname: ospd-openvas.local
cap_add:
- NET_ADMIN # for capturing packages in promiscuous mode
- NET_RAW # for raw sockets e.g. used for the boreas alive detection
security_opt:
- seccomp=unconfined
- apparmor=unconfined
logging:
driver: "json-file"
options:
max-size: "1k"
max-file: "3"
volumes:
scanner:
docker compose up -d # The -d option is for a detached docker image
docker container ls # Lists the current containers running on the system. Look under the Names column for the container name. Ex: gvm-docker_gvm_1
docker logs -f [OpenVAS container name]
Example output:
-------------------------------------------------------
Scanner id: df5tt4csny
Public key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPbE8p5zxOoPFPDiE9BCxcRd1jCVaRfOO92BO5hIfdqi df5cy5csnp
Master host key (Check that it matches the public key from the master): [192.168.1.150]:2222 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5A55AIMHHl4neiOBuBfCPQtJp/WQuyb6xVIrgmVp3U/A7qmev
-------------------------------------------------------
docker exec -it [GVM container name] /add-scanner.sh
This will prompt you for your scanner name, "Scanner id", and Public Key
Scanner Name: This can be anything you want
Scanner ID: generated id from remote openvas scanner Scanner
public key: private key from scanner
You will receive a confirmation that the scanner has been added
Login to the GVM server web interface and navigate to Configuration -> Scanners to see the scanner you just added.
You can click the shield icon next to the scanner to verify the scanner connectivity. If it says Scanner Unavailable, restart the OpenVAS remote docker container with the following command:
docker container restart [OpenVAS container name]
sudo docker exec -it [container name] bash
mkdir /data/ssh/
cp -R /var/lib/gvm/.ssh/* /data/ssh/
cp /var/lib/gvm/.scannerid /data/scannerid
sudo docker-compose stop
OR (if using docker compose V2)
sudo docker compose stop
cp docker-compose.yml docker-compose.yml.bk
wget https://raw.githubusercontent.com/NetizenCorp/OpenVAS-Docker/main/docker-compose.yml
nano docker-compose.yml
sudo docker pull netizensoc/openvas-scanner:latest
sudo docker volume ls
Copy the volume name that is outputted and put it into the YAML file in each location the volume is referenced
DRIVER VOLUME NAME
local scanner
### Update this section at the bottom of the file. Ensure that you updated the volume name near the top of the yaml file.
volumes:
scanner:
name: scanner # ADD THIS LINE
external: true # ADD THIS LINE
sudo docker compose up -d
| Tag | Description |
|---|---|
| latest | Latest stable version |
| dev | Latest development build for AMD64 Based Systems |
| dev-arm | Latest development build for ARM64 Based Systems |
| Hosts | CPU Cores | Memory | Disk Space |
|---|---|---|---|
| 512 active IPs | 4@2GHz cores | 8 GB RAM | 100 GB |
| 2,500 active IPs | 6@2GHz cores | 12 GB RAM | 100 GB |
| 10,000 active IPs | 8@3GHz cores | 16 GB RAM | 100 GB |
| 25,000 active IPs | 16@3GHz cores | 32 GB RAM | 100 GB |
| 100,000 active IPs | 32@3GHz cores | 64 GB RAM | 100 GB |
Any Issues or Suggestions for the Project can be communicated via the issues. Thanks.
Content type
Image
Digest
sha256:bb594fb98…
Size
1.5 GB
Last updated
7 months ago
docker pull netizensoc/openvas-scanner