标签:测试 找不到 serve 扫描工具 env erro loading user art
cvechecker的目标是通过扫描已安装的软件并将结果与CVE数据库进行匹配来报告系统上可能存在的漏洞。
官方提示:
cvechecker的核心功能就是拿到软件的版本号,然后根据规则去匹配cve漏洞库,cvechecker没有依赖于包版本管理器,而是直接通过查找软件包的版本号,然后构造CPE信息,通过在cve数据库中查找给CPE信息来提取CVE信息, 开发者维护了一个软件包和各个命令的映射关系表。内容类似于:
,perlivp,1,perlivp$,# perlivp v([0-9][0-9](.[0-9]+)+),a,perl,perl,\1,,,
,libvorbis.so,1,libvorbis.so.,Xiph.Org libVorbis ([0-9][0-9]*(.[0-9]+)+),a,xiph,libvorbis,\1,,,
用户自己也可以定义添加这种映射表,同时这也是作者所提议的,而默认的映射表是由开发者维护的,默认只有651条,因此这里就是漏报的一处主要原因。另外一个原因就是上面提到的,无法检测补丁。
支持的数据库:
测试机器:CentOS 7
环境要求
1.工具安装
# sudo yum -y install libxslt libconfig sqlite
2.安装
先下载release版,最新版是4.0 https://github.com/sjvermeu/cvechecker/releases/tag/cvechecker-4.0
# tar zxvf cvechecker-cvechecker-4.0.tar.gz
# cd cvechecker-cvechecker-4.0
# ./configure -prefix=/root/cve/ --enable-sqlite3
# make
# make install
踩坑
1 ./configure -prefix=/root/cve/ --enable-sqlite3 过程中失败 已安装sqlite,却提示失败
...
checking for pkg-config... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for CONFIG... yes
checking for SQLITE3... no
configure: error: Package requirements (sqlite3 >= 3.6.16) were not met:
No package ‘sqlite3‘ found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables SQLITE3_CFLAGS
and SQLITE3_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
解决办法:
# yum -y install sqlite-devel
2 ./configure -prefix=/root/cve/ --enable-sqlite3 过程中失败 找不到Makefile.in文件
config.status: error: cannot find input file: `Makefile.in‘
解决办法:
# aclocal
# autoheader
# automake --add-missing
3 make过程失败 libbsd
configure: error: Package requirements (libbsd) were not met:
No package ‘libbsd‘ found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables BSD_CFLAGS
and BSD_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
解决办法:
# yum -y install libbsd-devel
3.修改配置文件
# cp ./conf/cvechecker.conf /etc
根据自己环境配置,mysql的在这里配置用户名等
#
# Generic settings
#
dbtype = "sqlite";
#dbtype="mysql";
cvecache = "/usr/local/var/cvechecker/cache";
datadir = "/usr/local/share/cvechecker";
stringcmd = "/usr/bin/strings -n 3 ‘@file@‘";
version_url = "https://raw.github.com/sjvermeu/cvechecker/master/versions.dat";
#userkey = "servertag";
#
# For Sqlite3
#
sqlite3: {
localdb = "/usr/local/var/cvechecker/local";
globaldb = "/usr/local/var/cvechecker/global.db";
};
#
# For MySQL
#
mysql: {
dbname = "cvechecker";
dbuser = "cvechecker_rw";
dbpass = "password4cvechecker_rw";
dbhost = "mysql.company.com";
};
4.初始化表
# cvechecker -i
5.获取漏洞数据
# pullcves pull
6.生成扫描文件列表
# find / -type f -perm -o+x > scanlist.txt
# echo "/proc/version" >> scanlist.txt
7.执行扫描
# cvechecker -b scanlist.txt
8.输出匹配条目
# cvechecker -r
# cvechecker -r -C // 以cvs格式输出
9.生成web UI报告 cvereport -D 生成文件的目标目录 acknowledgements.xml所在目录
# cvereport -D /root/ /root/cvechecker-cvechecker-4.0/data/acknowledgements.xml
ps:已经获取的最近的cve数据库,但是只扫描到2018年左右的漏洞,尚还不清楚是使用问题还是bug。
时间:03/05/2021
作者:HsinTsao
标签:测试 找不到 serve 扫描工具 env erro loading user art
原文地址:https://www.cnblogs.com/HsinTsao/p/14772506.html