vuls安装记录
第一步安装go环境
apt-get install golang-go
(显示出错,go版本apt安装太低,apt-get purge golang-go卸载后手动安装,必须1.8.3以上)
还需将/usr/local/目录中的go目录删除 rm -rf go
wget https://dl.google.com/go/go1.10.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.10.1.linux-amd64.tar.gz
mkdir $HOME/go //设置工作目录
vi /etc/profile.d/goenv.sh
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
source /etc/profile.d/goenv.sh //环境变量设置为当前shell
第二步部署go-cve-dictionary,CVE样本库
sudo mkdir /var/log/vuls //创建目录设置权限,如果是root可以不设置
sudo chown root /var/log/vuls
sudo chmod 700 /var/log/vuls
//sudo chmod 777 -R xxx (更改文件夹及其子文件夹权限为777)
//sudo chmod 600 ××× (只有所有者有读和写的权限)
//sudo chmod 644 ××× (所有者有读和写的权限,组用户只有读的权限)
//sudo chmod 700 ××× (只有所有者有读和写以及执行的权限)
//sudo chmod 666 ××× (每个人都有读和写的权限)
//sudo chmod 777 ××× (每个人都有读和写以及执行的权限
mkdir -p $GOPATH/src/github.com/kotakanbe //递归创建目录
cd $GOPATH/src/github.com/kotakanbe
git clone https://github.com/kotakanbe/go-cve-dictionary.git
cd go-cve-dictionary
make install
第三步获取漏洞数据
部署go-cve-dictionary
cd $HOME
for i in `seq 2002 $(date +"%Y")`; do go-cve-dictionary fetchnvd -years $i; done
//bash循环从2002年开始的数据
//下载完成后会存在一个数据库
ls -alh cve.sqlite3 //查看数据库容量
部署goval-dictionary
mkdir -p $GOPATH/src/github.com/kotakanbe
cd $GOPATH/src/github.com/kotakanbe
git clone https://github.com/kotakanbe/goval-dictionary.git
cd goval-dictionary
make install
//然后,由于要扫描的服务器是Ubuntu,因此要获取ubuntu的数据
二进制文件生成在$GOPATH/bin目录中
cd $HOME
goval-dictionary fetch-ubuntu 12 14 16 //获取所有版本数据
第四步部署Vuls
mkdir -p $GOPATH/src/github.com/future-architect
cd $GOPATH/src/github.com/future-architect
git clone https://github.com/future-architect/vuls.git
cd vuls
make install //报了错误GNUmakefile:42: recipe for target 'lint' failed
手动克隆存储库来解决此问题
mkdir -p $GOPATH/src/golang.org/x \
&& git clone https://github.com/golang/lint.git $GOPATH/src/golang.org/x/lint \
&& go get -u golang.org/x/lint/golint
以上为安装过程
1.下面开始本地扫描模式
组态
cd $HOME
touch config.toml
cat config.toml
[servers]
[servers.localhost]
host = "localhost"
port = "local"
vuls configtest //扫描前检查配置
开始扫描
vuls scan
查看单行摘要
vuls report -format-one-line-text
查看简要摘要
vuls report -format-short-text
查看完整报告
vuls report -format-full-text | less
Vuls有基于终端的用户界面来显示扫描结果
vuls tui //查看报告
扫描结果保存在results目录中
2.远程扫描模式
本地主机创建秘钥
ssh-keygen -t rsa
~/.ssh/id_rsa.pub //复制公钥内容
#/root/.ssh/id_rsa. <== 私钥
#/root/.ssh/id_rsa.pub
进入远程主机
mkdir ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
vi ~/.ssh/authorized_keys //复制公钥在其中
设置 SSH,打开密钥登录功能
编辑 /etc/ssh/sshd_config 文件,进行如下设置:
RSAAuthentication yes
PubkeyAuthentication yes
另外,请留意 root 用户能否通过 SSH 登录:
PermitRootLogin yes
最后,重启 SSH 服务:
[root@host .ssh]$ service sshd restart
然后试试本地远程连接ssh通过私钥连接
ssh root@120.203.13.112 -p 2228 -i ~/.ssh/id_rsa
连接成功后输入exit退出ssh
cd $HOME
修改配置config.toml
把对象改为目标远程主机
[servers]
[servers.centos]
host = "120.203.13.112"
port = "2228"
user = "root"
keyPath = "/root/.ssh/id_rsa"
vuls configtest centos //检测服务器配置
vuls scan centos //开始扫描
vuls tui //查看报告
扫描结果保存在results目录中
使用WEB界面查看报告
VulsRepo
vuls report -format-json //创建一个json报告
cd $HOME
git clone https://github.com/usiusi360/vulsrepo.git //安装
cd $HOME/vulsrepo/server
cp vulsrepo-config.toml.sample vulsrepo-config.toml //复制配置文件
配置
vi vulsrepo-config.toml
根据自己目录而定
[Server]
rootPath = "/root/vulsrepo"
resultsPath = "/root/results"
serverPort = "9998"
serverIP = "0.0.0.0"
配置完后运行
./vulsrepo-server
vuls安装记录的更多相关文章
- 分布式监控系统Zabbix-3.0.3-完整安装记录(7)-使用percona监控MySQL
前面已经介绍了分布式监控系统Zabbix-3.0.3-完整安装记录(2)-添加mysql监控,但是没有提供可以直接使用的Key,太过简陋,监控效果不佳.要想更加仔细的监控Mysql,业内同学们都会选择 ...
- 关于node.js和npm,cnpm的安装记录以及gulp自动构建工具的使用
关于node.js和npm,cnpm的安装记录以及gulp自动构建工具的使用 工作环境:window下 在一切的最开始,安装node.js (中文站,更新比较慢http://nodejs.cn/) ...
- sourceinsight安装记录
sourceinsight安装记录 此文章为本人使用sourceinsight一个星期之后的相关设置步骤记录和经验记录,以备以后查验,网上的相关资料都也较为完善,但是对于新手还是有一定困难的,所以在这 ...
- openerp安装记录及postgresql数据库问题解决
ubuntu-14.04下openerp安装记录1.安装PostgreSQL 数据库 a.安装 sudo apt-get install postgresql 安装后ubu ...
- Matlab安装记录 - LED Control Activex控件安装
Matlab安装记录-LED Control Activex控件安装 2013-12-01 22:06:36 最近在研究Matlab GUI技术,准备用于制作上位机程序:在Matlab GUI的技术 ...
- Arch Linux 安装记录
Arch Linux 安装记录 基本上参考wiki上的新手指南,使用arch 2014.6.1 iso安装 设置网络 有线网络 Arch Linux 默认开启DHCP. 静态ip 首先关闭DHCP:s ...
- redis5.0.3单实例简单安装记录
redis5.0.3单实例简单安装记录 日常需要测试使用,索性记录下来,免得临时又麻烦的找资料. yum -y install make gcc-c++ cmake bison-devel ncurs ...
- mysql5.7安装记录
mysql安装记录 版本5.7 windows系统 一.缺少my.ini文件 [mysql]# 设置mysql客户端默认字符集default-character-set=utf8 [mysqld]#设 ...
- Liunx/RHEL6.5 Oracle11 安装记录
1.创建用户组 groupadd oinstall #创建用户组oinstall groupadd dba #创建用户组dba useradd -g oinstall -g dba -m oracle ...
随机推荐
- javascript面向对象的写法01
类和对象 其他面向对象的语言类的语法是内置的,自然而然的事.javascript中有对象,但没有类的语法,类的实现需要模拟出来. 只需要把对象想成一个容器,里面存放一些属性或方法,把类想象成一个对象的 ...
- 再学UML-Bug管理系统UML2.0建模实例(二)
2.3 BMS顺序图(需求模型) 在UML中,我们将顺序图分为两类,一类用于描述系统需求,构造系统的需求模型(分析模型):另一类用于指导设计与实现,构造系统的实现模型(设计模型). ...
- 2018中国大学生程序设计竞赛 - 网络选拔赛 1010 YJJ's Salesman 【离散化+树状数组维护区间最大值】
题目传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6447 YJJ's Salesman Time Limit: 4000/2000 MS (Java/O ...
- mysql(安装、启动、删除)服务
必须在管理身份下运行 方式一: 安装服务 将 MySQL 安装为服务的方式: "C:\Program Files\MariaDB 10.3\bin\mysqld.exe" inst ...
- CGAL 4.6 - Surface Reconstruction from Point Sets
http://doc.cgal.org/latest/Surface_reconstruction_points_3/ The following example reads a point set, ...
- Java基础——线程复习总结
线程 T ...
- C# http post、get请求
public string HttpPostJson(string Url, string paramData, Dictionary<string, string> headerDic ...
- 使用 seafile搭建私有云盘
一.系统环境 系统:CentOS7-1708IP地址:192.168.159.33 二.安装seafile [root@seafile ~]# yum -y install epel-release[ ...
- 微信小程序腾讯云配置Tomcat https端口
在个人开发微信小程序时,发布之前要配置微信小程序的域名https及域名的SSL证书的申请及安装 我用的是腾讯云,SSL证书申请好之后,点击下载,解压文件夹,会有如图,根据你要配置的服务器是哪种,我是t ...
- spring入门(三) 使用spring mvc
1.建立project / module 新建空的project:springMvcStudy 新建module:type maven-webapp,名字mvcStudy 2.为module设置Sou ...