Introduction
Vuls is an open-source vulnerability scanner for Linux/Unix systems that helps to identify vulnerabilities from various sources. This guide will show you how to install and use Vuls on Debian 12.
Prerequisites
- A server running Debian 12
- Root access or a user with
sudo
privileges - Go installed on your system (optional: for compiling from source)
Step 1: Update the System
Start by updating your package list and upgrading your installed packages:
sudo apt update
sudo apt upgrade -y
Step 2: Install Vuls Dependencies
Vuls requires several dependencies to function properly. Install the following packages:
sudo apt install -y git curl make gcc build-essential
Step 3: Install Go Language (if not already installed)
Vuls is developed in Go. If Go is not installed, follow these instructions:
sudo apt install -y golang
Step 4: Install Vuls
You can install Vuls directly from GitHub using the following commands:
git clone https://github.com/future-architect/vuls.git
cd vuls
go build -o vuls main.go
You can move the compiled binary to a directory in your PATH, such as /usr/local/bin:
sudo mv vuls /usr/local/bin/
Step 5: Configure Vuls
Create a configuration file for Vuls:
mkdir -p ~/.vuls
nano ~/.vuls/config.toml
Paste the following configuration template into the file (modify according to your environment):
[vuls]
db_type = "sqlite3"
report_dir = "/var/log/vuls"
[[targets]]
name = "example"
hosts = ["localhost"]
[[dbs]]
type = "sqlite3"
Save and exit the editor.
Step 6: Run Vuls Scan
To run a scan, use the following command:
vuls scan
This command will scan the specified targets for vulnerabilities.
Step 7: View Scan Results
The scan results will be saved in the directory you specified in the configuration file (default: /var/log/vuls
). You can view the results with:
cat /var/log/vuls/vuls_report.md
Step 8: Automate Scans (Optional)
If you want to automate the scanning process, you can create a cron job. Open the crontab editor:
sudo crontab -e
Then add a line to run Vuls daily at midnight:
0 0 * * * /usr/local/bin/vuls scan
Save and exit the editor.
Conclusion
You have successfully installed and configured the Vuls vulnerability scanner on Debian 12. Regularly scan your systems to ensure they are secure against known vulnerabilities.