###############################################################################
# OpenVAS Vulnerability Test
# $Id: gb_flock_addr_bar_spoofing_vuln_lin.nasl 4375 2009-08-31 17:03:29Z aug $
#
# Flock Address Bar Spoofing Vulnerability (Linux)
#
# Authors:
# Sharath S <sharaths@secpod.com>
#
# Copyright:
# Copyright (c) 2009 Intevation GmbH, http://www.intevation.net
#
# 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(800880);
  script_version("$Revision: 1.0 $");
  script_tag(name:"cvss_base", value:"4.3");
  script_tag(name:"risk_factor", value:"Medium");
  script_cve_id("CVE-2009-3007");
  script_name("Flock Address Bar Spoofing Vulnerability (Linux)");
  desc = "
  Overview: This host is installed with Flock Browser and is prone to Address
  Bar Spoofing vulnerability.

  Vulnerability Insight:
  Error exists when opening a new window using 'window.open()', which can be
  exploited to display spoofed content in the browser window while the address
  bar shows an arbitrary path on a possibly trusted host.

  Impact:
  Successful exploitation lets the attackers to spoof parts of the address bar
  and modify page content on a host that a user may consider partly trusted.

  Impact Level: Application

  Affected Software/OS:
  Flock version 2.5.1 on Linux.

  Fix: No solution or patch is available as on 02nd September, 2009. Information
  regarding this issue will be updated once the solution details are available.
  For updates refer, http://www.mozilla.com/en-US/

  References:
  http://lostmon.blogspot.com/2009/08/multiple-browsers-fake-url-folder-file.html

  CVSS Score:
    CVSS Base Score     : 4.3 (AV:N/AC:M/Au:NR/C:N/I:P/A:N)
    CVSS Temporal Score : 3.9
  Risk factor: Medium";

  script_description(desc);
  script_summary("Check for the version of Flock Browser");
  script_category(ACT_GATHER_INFO);
  script_copyright("Copyright (C) 2009 Intevation GmbH");
  script_family("General");
  script_dependencies("gb_flock_detect_lin.nasl");
  script_require_keys("Flock/Linux/Ver");
  exit(0);
}


include("version_func.inc");

# Flock Check
flockVer = get_kb_item("Flock/Linux/Ver");

if(flockVer != NULL)
{
  # Grep for Flock version 2.5.1
  if(version_is_equal(version:flockVer, test_version:"2.5.1")){
    security_warning(0);
  }
}
