![openVAS 扫描新实例失败(可能为误报)如何调试插件](https://linux22.com/image/574671/openVAS%20%E6%89%AB%E6%8F%8F%E6%96%B0%E5%AE%9E%E4%BE%8B%E5%A4%B1%E8%B4%A5%EF%BC%88%E5%8F%AF%E8%83%BD%E4%B8%BA%E8%AF%AF%E6%8A%A5%EF%BC%89%E5%A6%82%E4%BD%95%E8%B0%83%E8%AF%95%E6%8F%92%E4%BB%B6.png)
我有开放增值业务系统安装自原子公司 YUM 仓库,一切似乎都运行良好,但是我看到一个“安全漏洞”,即 OpenVAS 检测到系统上安装了“arora”(但实际上并没有)
我得到了“Arora 通用名称 SSL 证书欺骗漏洞(Linux)”的肯定结果,这是记录在这里;
我拉出了脚本,它似乎正在搜索文件名为“arora”的二进制文件;(
modName = find_file(file_name:"arora", file_path:"/usr/bin/",
useregex:TRUE, regexpar:"$", sock:sock);
但是,所讨论的目标没有安装任何名为 arora 的二进制文件,甚至没有任何带有文件的文档,甚至在区分大小写的搜索中也没有子字符串“arora”;
[root@52-56-149-11 ~]# locate Arora
[root@52-56-149-11 ~]# locate rora
[root@52-56-149-11 ~]# locate arora
[root@52-56-149-11 ~]# find / | grep -i arora
全部无结果。
我可以手动运行这个测试并检查值或其他内容吗?
(我是 openvas nasl 脚本的新手,所以任何指向文档的提示都会有帮助,我确实查看了1.0.1 纲要,但我无法弄清楚如何将 SSH 凭证作为参数发送到 nasl 脚本)
我安装的测试副本的完整源代码如下;
###############################################################################
# Openvas Vulnerability Test
# $id: secpod_arora_cn_ssl_cert_spoofing_vuln_lin.nasl 2011-12-15 14:01:47z dec $
#
# Arora Common Name SSL Certificate Spoofing Vulnerability (Linux)
#
# Authors:
# Madhuri D<[email protected] <mailto:[email protected]>>
#
# Copyright:
# Copyright (c) 2011 SecPod,http://www.secpod.com <http://www.secpod.com/>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the gnu general public license version 2
# (or any later version), as published by the free software foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
###############################################################################
if(description)
{
script_id(902764);
script_version("$Revision$");
script_cve_id("CVE-2011-3367");
script_bugtraq_id(49925);
script_tag(name:"cvss_base", value:"5.0");
script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:P/A:N");
script_tag(name:"risk_factor", value:"Medium");
script_tag(name:"last_modification", value:"$Date$");
script_tag(name:"creation_date", value:"2011-12-15 14:01:47 +0530 (Thu, 15 Dec 2011)");
script_name("Arora Common Name SSL Certificate Spoofing Vulnerability (Linux)");
desc = "
Overview: This host is installed with Arora and is prone common name SSL
certificate spoofing vulnerability.
Vulnerability Insight:
The flaw is caused due to not using a certain font when rendering certificate
fields in a security dialog.
Impact:
Successful exploitation will allow remote attackers to spoof the common name
(CN) of a certificate via rich text.
Impact Level: Application.
Affected Software :
Arora version 0.11 and prior
Fix: No solution or patch is available as on 15th December 2011. Information
regarding this issue will be updated once the solution details are available
For updates refer,http://code.google.com/p/arora/downloads/list
References:
http://secunia.com/advisories/46269
http://www.securityfocus.com/archive/1/520041
https://bugzilla.redhat.com/show_bug.cgi?id=746875
http://archives.neohapsis.com/archives/fulldisclosure/2011-10/att-0353/NDSA20111003.txt.asc ";
script_description(desc);
script_summary("Check for the version of Arora");
script_category(ACT_GATHER_INFO);
script_copyright("Copyright (C) 2011 SecPod");
script_family("General");
script_dependencies("find_service.nes");
script_mandatory_keys("login/SSH/success");
exit(0);
}
include("ssh_func.inc");
include("version_func.inc");
## Open SSH Login connection
sock = ssh_login_or_reuse_connection();
if(!sock){
exit(0);
}
## Confirm Linux, as SSH can be instslled on Windows as well
result = ssh_cmd(socket:sock, cmd:"uname");
if("Linux">!< result){
exit(0);
}
grep = find_bin(prog_name:"grep", sock:sock);
grep = chomp(grep[0]);
garg[0] = "-o";
garg[1] = "-m1";
garg[2] = "-a";
garg[3] = string("[0]\\.[0-9][0-9]\\.[0-9]");
## Getting arora file path
modName = find_file(file_name:"arora", file_path:"/usr/bin/",
useregex:TRUE, regexpar:"$", sock:sock);
foreach binaryName (modName)
{
binaryName = chomp(binaryName);
arg = garg[0] + " " + garg[1] + " " + garg[2] + " " + raw_string(0x22) +
garg[3] + raw_string(0x22) + " " + binaryName;
}
## Grep the version
arrVer = get_bin_version(full_prog_name:grep, version_argv:arg,
ver_pattern:"([0-9.]+)", sock:sock);
if(arrVer)
{
## Check the arora version
if(version_is_less_equal(version:arrVer[0], test_version:"0.11.0")){
security_warning(0);
}
}
ssh_close_connection();
[1]: http://wald.intevation.org/scm/viewvc.php/trunk/openvas-plugins/scripts/secpod_arora_cn_ssl_cert_spoofing_vuln_lin.nasl?root=openvas&view=markup
答案1
大多数 NASL 脚本都很简单,可以使用“print”语句进行调试。使用 NASL 函数display( var )
在屏幕上显示变量的内容。
然后只需针对目标运行脚本
nasl -s -t ipaddress myscript.nasl
请记住,这不会运行依赖项。如果依赖项的效果对于您的测试是必要的,您可以使用该选项指定您自己的知识库文件-k kbfile
。
如果您想要完整跟踪每个函数调用、请求和响应,那么还可以添加开关-a
。这可能非常有用,但会产生大量输出。
熟悉手动的。它基本上是可靠的,但不要期望其中的所有内容都是事实准确、完整或表现出自指完整性 :-)