Deepin 20 安装 GVM (openvas)

 

## 切换root 账户,添加 Kali 源
vim /etc/apt/sources.list

## 官方Kali 源
deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib

##阿里Kali 源
deb http://mirrors.aliyun.com/kali kali-rolling main non-free contrib
deb-src http://mirrors.aliyun.com/kali kali-rolling main non-free contrib

## 如果出现问题
# The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
## 切换root 账户,执行
wget -q -O - https://archive.kali.org/archive-key.asc | apt-key add

## 执行 更新
apt-get update -y
 
## 执行安装
sudo apt-get install gvm -y
 
## 执行设置
sudo gvm-setup
# openvas 9 : sudo openvas-setup
## 检查安装过程
 
sudo gvm-check-setup
# openvas9 : openvas-check-setup
 
## 修改登录用户密码,注意 -- gvmd中间有空格
sudo runuser -u _gvm -- gvmd --user=admin --new-password=admin
# openvas 9使用:          sudo openvasmd --user=admin --new-password=admin
 
## 更新特征库
sudo gvm-feed-update
  # openvas 9使用 : sudo openvas-feed-update 
  

# 同步 greenbone-nvt-sync
sudo runuser -u _gvm -- greenbone-nvt-sync

# 同步 greenbone-scap-data-sync
sudo runuser -u _gvm -- greenbone-scapdata-sync

# 同步 greenbone-nvt-sync
sudo runuser -u _gvm -- greenbone-certdata-sync

or

greenbone-feed-sync --type GVMD_DATA
greenbone-feed-sync --type SCAP
greenbone-feed-sync --type CERT

 

  

 

## 修改服务端口127.0.0.1 到 0.0.0.0 (可选)
 
## 启动oepnvas服务
sudo gvm-start
# openvas 9 使用: sudo openvas-start
 
## 防火墙设置

firewall-cmd --zone=public --add-port=9392/tcp --permanent
firewall-cmd --reload


## 进程查看,正常应该为三个Active: active (running)
## 进程查看:
systemctl status gvmd # manager
systemctl status openvas-scanner # scanner
systemctl status gsad # web ui

 

## 强制覆盖安装

sudo dpkg -i --force-overwrite /var/cache/apt/archives/grilo-plugins-0.3_0.3.14-1_amd64.deb

 
 
问题记录
错误 1:
  Delete database at /var/lib/openvas/mgr/tasks.db and rebuild it
解决方案:
  sudo openvas-nvt-sync --wget
  sudo /etc/init.d/openvas-scanner stop
  sudo /etc/init.d/openvas-manager stop
  sudo openvassd
  sudo rm /var/lib/openvas/mgr/tasks.db
  sudo openvasmd --progress --rebuild -v
 
 问题2: 
  find: ‘/run/user/1000/gvfs’: Permission denied
解决方案:
  sudo umount /run/user/1000/gvfs
  sudo rm -rf /run/user/1000/gvfs
  

问题 3 : 

  同步目录,根据同步目录,可以手动更新目录下的文件

 

greenbone-nvt-sync  /var/lib/openvas/plugins
greenbone-scapdata-sync   /var/lib/openvas/scap-data  
greenbone-certdata-sync  /var/lib/openvas/cert-data
   
  
    

test@test-PC:/var/lib/openvas$ ls -l
total 240
drwxr-xr-x 2 root root 4096 Jan 9 01:14 CA
drwxr-xr-x 2 root root 4096 Jan 9 09:59 cert-data
drwxr-xr-x 2 root root 4096 Jan 9 09:59 mgr
drwxr-xr-x 4 root root 4096 Jan 9 01:14 openvasmd
drwxr-xr-x 24 root root 217088 Jan 7 18:44 plugins
drwxr-xr-x 3 root root 4096 Jan 9 01:14 private
drwxr-xr-x 3 root root 4096 Jan 9 09:59 scap-data
drwxr-xr-x 2 root root 4096 Jul 6 2018 users
test@test-PC:/var/lib/openvas$

 

 

 
 
posted @ 2022-01-08 15:06  Areas  阅读(723)  评论(0编辑  收藏  举报