基于OSSIM平台的漏洞扫描详解

安全 应用安全
Openvas是一套开源漏洞扫描系统,如果手动搭建需要复杂的过程,花费不少人力和时间成本,因为它是套免费的漏洞扫描系统,功能上不逊色于商业版的漏洞扫描器,受到不少用户的青睐。

Openvas是一套开源漏洞扫描系统,如果手动搭建需要复杂的过程,花费不少人力和时间成本,因为它是套免费的漏洞扫描系统,功能上不逊色于商业版的漏洞扫描器,受到不少用户的青睐,下表对比了NeXpose、RSAS和启明的漏洞扫描器的主要功能。

wKioL1ZmSn-DvJ1AAA0R5JyJkC4100.jpg

有了以上背景之后,下文主要针对OSSIM平台下如何以图形化方式操作漏洞扫描的过程。

准备工作:首先确保没有运行的扫描进程和任务

wKiom1XtftnAx7HPAAF1CBy1EHI820.jpg

扫描漏洞同时升级漏洞库会导致升级失败。

第一步:同步插件

  1. #openvas-nvt-sync 
  2. [i] This script synchronizes an NVT collection with the 'OpenVAS NVT Feed'. 
  3. [i] The 'OpenVAS NVT Feed' is provided by 'The OpenVAS Project'. 
  4. [i] Online information about this feed: 'http://www.openvas.org/openvas-nvt-feed.html'. 
  5. [i] NVT dir: /var/lib/openvas/plugins 
  6. [i] Will use rsync 
  7. [i] Using rsync: /usr/bin/rsync 
  8. [i] Configured NVT rsync feed: rsync://feed.openvas.org:/nvt-feed 
  9. OpenVAS feed server - http://www.openvas.org/ 
  10. This service is hosted by Intevation GmbH - http://intevation.de/ 
  11. All transactions are logged. 
  12. Please report synchronization problems to openvas-feed@intevation.de. 
  13. If you have any other questions, please use the OpenVAS mailing lists 
  14. or the OpenVAS IRC chat. See http://www.openvas.org/ for details. 
  15. receiving incremental file list 
  16. deleting gb_openssl_38562.nasl.asc 
  17. deleting gb_openssl_38562.nasl 
  18. ./ 
  19. COPYING 
  20.          588 100%  574.22kB/s    0:00:00 (xfer#1, to-check=13347/13355) 
  21. COPYING.GPLv2 
  22.        18002 100%   17.17MB/s    0:00:00 (xfer#2, to-check=13346/13355) 
  23. COPYING.files 
  24.      1819904 100%    1.77MB/s    0:00:00 (xfer#3, to-check=13345/13355) 
  25. DDI_Directory_Scanner.nasl 
  26.        32957 100%   32.74kB/s    0:00:00 (xfer#4, to-check=13342/13355) 
  27. DDI_Directory_Scanner.nasl.asc 
  28.          198 100%    0.20kB/s    0:00:00 (xfer#5, to-check=13341/13355) 
  29. ... ... 

同步数万个插件时间比较长,消耗资源不大,可以去喝杯咖啡啦,或者了解一下插件的组成。

表1 Openvas主要脚本分类及分布情况

 

 

 

第二步:更新插件(做这一步操作,建议在轻负载下进行)

#perl /usr/share/ossim/scripts/vulnmeter/updateplugins.pl migrate /* 比较消耗CPU和磁盘I/O */

2015-09-07 07:27:33 Framework profile has been found...

2015-09-07 07:27:33 Deleting all tasks in 192.168.11.150 ...

2015-09-07 07:27:33 updateplugins: configured to not updateplugins

2015-09-07 07:27:33 updateplugins: configured to not repair DB

2015-09-07 07:27:33 BEGIN - DUMP PLUGINS

2015-09-07 07:29:01 FINISH - DUMP PLUGINS [ Process took 88 seconds ]

2015-09-07 07:29:01 BEGIN - IMPORT PLUGINS

2015-09-07 07:30:00 FINISH - IMPORT PLUGINS [ 40473 plugins - Process took 59 seconds ]

2015-09-07 07:30:00 BEGIN - UPDATE CATEGORIES

2015-09-07 07:30:00 FINISH - UPDATE CATEGORIES [ Process took 0 seconds ]

2015-09-07 07:30:00 BEGIN - UPDATE FAMILIES

2015-09-07 07:30:00 FINISH - UPDATE FAMILIES [ Process took 0 seconds ]

2015-09-07 07:30:00 BEGIN - UPDATE OPENVAS_PLUGINS

2015-09-07 07:30:03 FINISH - UPDATE OPENVAS_PLUGINS [ Process took 3 seconds ]

2015-09-07 07:30:03 BEGIN - UPDATE NESSUS_PREFERENCES

2015-09-07 07:30:03 show tables like "vuln_nessus_preferences_defaults"

2015-09-07 07:30:03 updateprefs: Getting plugin preferences

2015-09-07 07:30:05 FINISH - UPDATE NESSUS_PREFERENCES [ Process took 2 seconds ]

2015-09-07 07:30:06 Creating Deep profile...

2015-09-07 07:30:06 Filling categories...............

2015-09-07 07:30:06 Done

2015-09-07 07:30:06 Filling families.............................................................

2015-09-07 07:30:06 Done

2015-09-07 07:30:06 Filling plugins...

2015-09-07 07:30:13 Filling preferences in Alienvault DB...

2015-09-07 07:30:14 Done

2015-09-07 07:30:14 Deep profile inserted

2015-09-07 07:30:15 Creating Default profile...

2015-09-07 07:30:15 Filling categories...............

2015-09-07 07:30:15 Done

2015-09-07 07:30:15 Filling families.............................................................

2015-09-07 07:30:15 Done

2015-09-07 07:30:15 Filling plugins...

2015-09-07 07:30:23 Filling preferences in Alienvault DB...

2015-09-07 07:30:24 Done

2015-09-07 07:30:24 Default profile inserted

2015-09-07 07:30:24 Creating Ultimate profile...

2015-09-07 07:30:24 Filling categories...............

2015-09-07 07:30:24 Done

2015-09-07 07:30:24 Filling families.............................................................

2015-09-07 07:30:24 Done

2015-09-07 07:30:24 Filling plugins...

2015-09-07 07:30:32 Filling preferences in Alienvault DB...

2015-09-07 07:30:33 Done

2015-09-07 07:30:33 Ultimate profile inserted

2015-09-07 07:30:33 BEGIN - UPDATE PORT SCANNER

2015-09-07 07:30:35 FINISH - UPDATE PORT SCANNER [ Process took 2 seconds ]

Updating plugin_sid vulnerabilities scanner ids

plugins fetched

Updating...

Script id:94151, Name:IT-Grundschutz M4.288: Sichere Administration von VoIP-Endger?ten, Priority:0

Script id:703073, Name:Debian Security Advisory DSA 3073-1 (libgcrypt11 - security update), Priority:1

Script id:804624, Name:Adobe Reader Plugin Signature Bypass Vulnerability (Windows), Priority:2

Script id:868149, Name:Fedora Update for kernel FEDORA-2014-9959, Priority:5

Script id:95048, Name:IT-Grundschutz M5.145: Sicherer Einsatz von CUPS, Priority:0

Script id:842216, Name:Ubuntu Update for linux USN-2616-1, Priority:4

Script id:105036, Name:OpenVPN Detection, Priority:0

Script id:868005, Name:Fedora Update for audacious-plugins FEDORA-2014-8183, Priority:1

Script id:869350, Name:Fedora Update for springframework FEDORA-2015-6862, Priority:5

… …

Script id:105084, Name:Multiple ManageEngine Products Arbitrary File Upload Vulnerability, Priority:3

Script id:867751, Name:Fedora Update for python-keystoneclient FEDORA-2014-5555, Priority:3

Script id:882209, Name:CentOS Update for nss CESA-2015:1185 centos6, Priority:2

Script id:842209, Name:Ubuntu Update for libmodule-signature-perl USN-2607-1, Priority:5

经过一刻钟等待终于更新完成。注意,该过程需要一气呵成,中途不能强制退出。

下面用时间轴表示每个步骤的演进顺序和所花费的时间,如下图所示。从某日的00:34:34开始到00:38:50结束的过程。

wKiom1XunICxpgxEAAIHATM9vVg625.jpg

如果有些用户不习惯在CLI下操作升级命令,这一工作同样可以在WebUI中完成。

wKioL1X0vLfA3pxgAAU5hxIK-AE652.jpg

第三步:验证更新

wKioL1XtgIbA2ed0AAR2Om_EnAw841.jpg

我们看到最后一行显示总数为40473,这个数值和下载的插件数量一直,代表升级完成。

注意:漏洞升级视频大家可访问:http://www.tudou.com/programs/view/kyTmc42Ky14/

第四步:开始漏洞扫描-定制策略

首先扫描资产,建立资源池,这里就不详细介绍。在OSSIM系统里默认定义了三种策略,默认为Default,该策略最为常用。

wKioL1XtgxnBYERyAAFhgWecCV8590.jpg

如果需要更改策略,请点击CREATE NEW PROFILE按钮。

wKiom1XtgaeySCgUAAPyD_PqcrQ798.jpg

接着开始扫描,填写任务名称,选择Sensor,选择策略,选择资源池内的主机,最后点击新建任务按钮。

wKioL1XthFPw2OLmAAbfSbhMeXQ389.jpg

扫描准备

wKioL1XthifBwPEPAAIscflNE6o315.jpg

漏洞扫描时那些进程最繁忙?

Htop是Linux系统中的一个互动的进程查看工具,该命令可以帮助管理员了解扫描发生的变化。#htop -d 50

wKiom1XunnSB3E1pAAJIvu_AV9k860.jpg

一次扫描多少机器合适?

如果所监控网段服务器数量超过25台,这里假设是100台,那么至少分4次扫描,例如直接输入“192.168.11.0/24”,这样表示一个网段,那么OSSIM系统负载将会明显增大,扫描等待时间明显延长,可能会长达数天,直到超过一个计划任务的周期,这样可能造成一个恶性循环,直到拖垮整个系统。

wKiom1YMif6xBpKLAAJ3eeK0270268.jpg

进过300多分钟都没有结束的任务最后逃脱不了失败的命运。

wKioL1XuoFGDWCkTAAL-c7u2q-c994.jpg

扫描结果分析

wKiom1XtgtLD69KEAAMHdkgxZ68595.jpg

 

 

wKioL1XthPyyMvQxAANaYKVbrOs014.jpg

不过在分析时,谈到“过时”的漏洞问题,在一些古老些操作系统Windows NT/2000、Solaris7/8、Linux(2.2 、2.4内核)曾经存在的那些系统漏洞、网络服务器漏洞,在现代系统中已经绝迹,受影响系统已经被修复,这种漏洞变得没有任何价值。对这些系统进行漏洞扫描变得没有意义。

责任编辑:赵宁宁 来源: 51CTO博客
相关推荐

2016-10-07 21:56:28

2010-12-01 11:36:44

2015-05-19 09:53:41

AWS漏洞管理云漏洞管理

2010-09-25 10:25:23

2013-01-11 09:41:34

2010-09-17 16:16:28

2022-04-26 07:41:24

网络日志关联

2010-09-25 10:34:20

2010-09-26 13:25:16

2017-06-20 15:51:02

RED HAWK渗透测试漏洞

2024-02-27 09:00:00

2009-07-02 14:13:41

JSP网络

2010-09-17 15:36:24

2017-05-12 14:25:09

2013-05-20 11:54:55

2017-08-25 16:00:15

2021-06-18 06:12:37

docker scan镜像漏洞Docker

2024-01-18 09:00:00

漏洞Docker工具

2013-06-05 14:07:45

XssScanerxss

2014-10-28 09:11:10

点赞
收藏

51CTO技术栈公众号