kali上安装 OpenVas (避坑版)

       目   录

一、前期准备

二、开始安装OpenVas

三、OpenVas使用


一、前期准备

1、修改yum源

vim /etc/apt/sources.list
# kali官方源 
deb http://http.kali.org/ moto main non-free contrib 
deb-src http://http.kali.org/ moto main non-free contrib
deb http://security.kali.org/ moto/updates main contrib non-free 
deb-src http://security.kali.org/ moto/updates main contrib non-free


#中科大kali源 
deb http://mirrors.ustc.edu.cn/kali kali main non-free contrib 
deb-src http://mirrors.ustc.edu.cn/kali kali main non-free contrib 
deb http://mirrors.ustc.edu.cn/kali-security kali/updates main contrib non-free


#新加坡kali源
deb http://mirror.nus.edu.sg/kali/kali/ kali main non-free contrib 
deb-src http://mirror.nus.edu.sg/kali/kali/ kali main non-free contrib 
deb http://security.kali.org/kali-security kali/updates main contrib non-free 
deb http://mirror.nus.edu.sg/kali/kali-security kali/updates main contrib non-free 
deb-src http://mirror.nus.edu.sg/kali/kali-security kali/updates main contrib non-free


#阿里云kali源 
deb http://mirrors.aliyun.com/kali kali main non-free contrib 
deb-src http://mirrors.aliyun.com/kali kali main non-free contrib 
deb http://mirrors.aliyun.com/kali-security kali/updates main contrib non-free


#163 Kali源 
deb http://mirrors.163.com/debian wheezy main non-free contrib 
deb-src http://mirrors.163.com/debian wheezy main non-free contrib 
deb http://mirrors.163.com/debian wheezy-proposed-updates main non-free contrib 
deb-src http://mirrors.163.com/debian wheezy-proposed-updates main non-free contrib 
deb-src http://mirrors.163.com/debian-security wheezy/updates main non-free contrib 
deb http://mirrors.163.com/debian-security wheezy/updates main non-free contrib 

#中科大 
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib 
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib

 2、确保能够安装成功,首先升级了一遍系统,通过如下命令: 

apt-get update 

apt-get upgrade

apt-get dist-upgrade

apt-get clean

3、 查看postgres数据库端口

端口 5432 改为 5433 。(我的是postgres 14  总之改成5433就对了)

vim /etc/postgresql/(版本号)/main/postgresql.conf

重启服务

systemctl start postgresql

二、开始安装OpenVas

1、下载

apt-get install openvas  

2、安装

openvas-setup

报错:openvas-setup: command not found 

原因:openvas官方在新版本中改名gvm

解决办法:执行下面命令(1-3小时)

#安装
gvm-setup

#启动
gvm-start

#检查
gvm-check-setup 

执行gvm-check-setup报错:

Job for ospd-openvas.service failed because the control process exited with error code.
See “systemctl status ospd-openvas.service” and “journalctl -xe” for details.
解决办法(想骂人了,是一个日志日志没权限给我报代码错误无法启动,就离谱):

chmod 666 /var/log/gvm/openvas.log

三、OpenVas使用

1、升级特征库(第一次安装后,不用升级,但后期使用记得经常升级特征库哦)

gvm-feed-update

2、修改密码

gvmd --user=admin --new-password=admin

runuser -u _gvm -- gvmd --user=admin --new-password=admin

3、登录控制台

https://localhost:9392

可能会说页面不安全,直接信任就行。

4、输入用户名、密码

4、快速扫描

 kali上安装 OpenVas (避坑版)_第1张图片

 

你可能感兴趣的:(kali,安全,linux,web安全)